-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[npm] Add npm command to generate organization configuration file
Closes #54
- Loading branch information
1 parent
f9c486f
commit fcec334
Showing
7 changed files
with
1,322 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const organizationGenerator = require('./organization/index'); | ||
|
||
module.exports = (plop) => { | ||
plop.setGenerator('organization', organizationGenerator); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,348 @@ | ||
--- | ||
name: "{{name}}" | ||
slug: "{{slug}}" | ||
# configuration variables for the server app | ||
server: | ||
# put the URL of openwisp-radius here | ||
host: "http://127.0.0.1:8000" | ||
proxy_urls: | ||
password_change: "/api/v1/{org_slug}/account/password/change" | ||
password_reset: "/api/v1/{org_slug}/account/password/reset" | ||
password_reset_confirm: "/api/v1/{org_slug}/account/password/reset/confirm" | ||
registration: "/api/v1/{org_slug}/account" | ||
user_auth_token: "/api/v1/{org_slug}/account/token" | ||
validate_auth_token: "/api/v1/{org_slug}/account/token/validate" | ||
authorize: "/api/v1/authorize" | ||
uuid: "{{uuid}}" | ||
secret_key: "{{secret_key}}" | ||
timeout: 2 #request timeout period in seconds | ||
# configuration variables for the client | ||
# Path of all the assets should be defined relative to the organization's folder | ||
# in assets directory. | ||
client: | ||
# <title> value | ||
title: "Wifi Login" | ||
auto_login: True | ||
# path of favicon | ||
{{#if assets_confirm}} | ||
favicon: "favicon.png" | ||
{{else}} | ||
favicon: null | ||
{{/if}} | ||
# path of the custom css file relative to organization's folder in | ||
# assets directory. | ||
{{#if assets_confirm}} | ||
css_path: "index.css" | ||
{{else}} | ||
css_path: null | ||
{{/if}} | ||
languages: | ||
- text: "english" | ||
slug: "en" | ||
default_language: "en" | ||
components: | ||
header: | ||
logo: | ||
{{#if assets_confirm}} | ||
url: "openwisp-logo-black.svg" # logo url | ||
alternate_text: "{{name}}" | ||
{{else}} | ||
url: null # logo url | ||
alternate_text: "{{name}}" | ||
{{/if}} | ||
links: | ||
- text: | ||
en: "Sign In" #link text in english | ||
url: "/{{slug}}/login" | ||
- text: | ||
en: "Sign Up" | ||
url: "/{{slug}}/registration" | ||
footer: | ||
links: | ||
- text: [] | ||
# secondary text to be displayed in smaller size in next line. | ||
# Eg. copyright text | ||
secondary_text: | ||
en: null | ||
registration_form: | ||
input_fields: | ||
username: | ||
type: "text" | ||
pattern: '[a-zA-Z@.+\-_\d]{1,150}' | ||
pattern_description: | ||
en: "only letters, numbers, and @/./+/-/_ characters" | ||
placeholder: | ||
en: "enter username" | ||
label: | ||
en: "username" | ||
email: | ||
type: "email" | ||
pattern: '.+@.+\..+' | ||
pattern_description: | ||
en: null | ||
placeholder: | ||
en: "email address" | ||
label: | ||
en: "email" | ||
password: | ||
type: "password" | ||
pattern: ".{6,}" | ||
pattern_description: | ||
en: "password must be a minimum of 6 characters" | ||
placeholder: | ||
en: "password" | ||
label: | ||
en: "password" | ||
password_confirm: | ||
type: "password" | ||
pattern: null | ||
pattern_description: | ||
en: null | ||
placeholder: | ||
en: "confirm password" | ||
label: | ||
en: "confirm" | ||
buttons: | ||
register: | ||
label: null | ||
text: | ||
en: "sign up" | ||
additional_info_text: | ||
en: "By signing up, you accept the {terms_and_conditions} and the {privacy_policy} of this WiFi service. " | ||
links: | ||
login: | ||
en: "Already have an account? Log in" | ||
reset_form: | ||
heading: | ||
en: "reset your password" | ||
additional_text: | ||
en: "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." | ||
input_fields: | ||
email: | ||
type: "email" | ||
pattern: '.+@.+\..+' | ||
pattern_description: | ||
en: null | ||
placeholder: | ||
en: "email address" | ||
label: | ||
en: "email" | ||
buttons: | ||
send: | ||
en: "Reset My Password" | ||
contact_text: | ||
en: "Please contact us if you have any trouble resetting your password." | ||
login_page_link: | ||
text: | ||
en: "Take me Back to Sign In" | ||
confirm_form: | ||
heading: | ||
en: "reset your password" | ||
additional_text: | ||
en: "please enter your new password" | ||
input_fields: | ||
password: | ||
type: "password" | ||
pattern: ".{6,}" | ||
pattern_description: | ||
en: "password must be a minimum of 6 characters" | ||
placeholder: | ||
en: "password" | ||
label: | ||
en: "password" | ||
password_confirm: | ||
type: "password" | ||
pattern: null | ||
pattern_description: | ||
en: null | ||
placeholder: | ||
en: "confirm password" | ||
label: | ||
en: "confirm" | ||
buttons: | ||
submit: | ||
en: "change password" | ||
contact_text: | ||
en: "Please contact us if you have any trouble resetting your password." | ||
login_page_link: | ||
text: | ||
en: "Take me Back to Sign In" | ||
contact_page: | ||
email: | ||
label: | ||
en: "E-mail" | ||
value: | ||
en: "support@openwisp.co" | ||
helpdesk: | ||
label: | ||
en: "Helpdesk" | ||
value: | ||
en: "+789 948 564" | ||
{{#if assets_confirm}} | ||
social_links: | ||
- alt: | ||
en: "twitter" | ||
icon: "twitter.svg" | ||
url: "https://twitter.com/openwisp" | ||
- alt: | ||
en: "facebook" | ||
icon: "facebook.svg" | ||
url: "https://facebook.com/openwisp" | ||
{{else}} | ||
social_links: [] | ||
{{/if}} | ||
status_page: | ||
content: | ||
en: | | ||
WiFi Login Successful! | ||
You can now use the internet. | ||
You may leave this page open in case you want to log out. | ||
links: | ||
- text: | ||
en: "Change your password" | ||
url: "/{orgSlug}/change-password/" | ||
buttons: | ||
logout: | ||
label: null | ||
text: | ||
en: "Logout" | ||
login_form: | ||
social_login: | ||
links: | ||
{{#if assets_confirm}} | ||
- text: | ||
en: "Login with Facebook" | ||
url: "#" | ||
icon: "facebook.svg" | ||
- text: | ||
en: "Login with google" | ||
icon: "google.svg" | ||
url: "#" | ||
- text: | ||
en: "Login with Twitter" | ||
icon: "twitter.svg" | ||
url: "#" | ||
{{else}} | ||
- text: | ||
en: "Login with Facebook" | ||
url: "#" | ||
icon: null | ||
- text: | ||
en: "Login with google" | ||
icon: null | ||
url: "#" | ||
- text: | ||
en: "Login with Twitter" | ||
icon: null | ||
url: "#" | ||
{{/if}} | ||
input_fields: | ||
email: | ||
type: "email" | ||
pattern: '.+@.+\..+' | ||
pattern_description: | ||
en: null | ||
placeholder: | ||
en: "email address" | ||
label: | ||
en: "email" | ||
password: | ||
type: "password" | ||
pattern: ".{6,}" | ||
pattern_description: | ||
en: "password must be a minimum of 6 characters" | ||
placeholder: | ||
en: "password" | ||
label: | ||
en: "password" | ||
additional_info_text: | ||
en: "By logging in, you accept the {terms_and_conditions} and the {privacy_policy} of this WiFi service. " | ||
buttons: | ||
login: | ||
label: null | ||
text: | ||
en: "Login" | ||
register: | ||
label: | ||
en: "Not registered yet?" | ||
text: | ||
en: "Sign up" | ||
links: | ||
forget_password: | ||
en: "Forgot your password?" | ||
password_change_page: | ||
title: | ||
en: "Change your password" | ||
input_fields: | ||
password1: | ||
type: "password" | ||
pattern: ".{6,}" | ||
pattern_description: | ||
en: "New password must be a minimum of 6 characters" | ||
label: | ||
en: "New Password" | ||
placeholder: | ||
en: "Your new password" | ||
password2: | ||
type: "password" | ||
pattern: ".{6,}" | ||
pattern_description: | ||
en: "New password must be a minimum of 6 characters" | ||
label: | ||
en: "Confirm new password" | ||
placeholder: | ||
en: "Re-enter new password" | ||
buttons: | ||
submit_button: | ||
label: null | ||
text: | ||
en: "Change Password" | ||
404_page: | ||
heading: | ||
en: "404" | ||
sub_heading: | ||
en: "Not Found" | ||
message: | ||
en: "Sorry, we couldn't find the page you were looking for." | ||
homepage_link: | ||
text: | ||
en: "Go back to homepage" | ||
{{#if assets_confirm}} | ||
privacy_policy: | ||
title: | ||
en: "privacy policy" | ||
content: | ||
en: "privacy-en.md" | ||
terms_and_conditions: | ||
title: | ||
en: "terms and conditions" | ||
content: | ||
en: "terms-en.md" | ||
{{else}} | ||
privacy_policy: | ||
title: | ||
en: "privacy policy" | ||
content: | ||
en: null | ||
terms_and_conditions: | ||
title: | ||
en: "terms and conditions" | ||
content: | ||
en: null | ||
{{/if}} |
Oops, something went wrong.