diff options
author | Justin Reynolds <justinr1234@gmail.com> | 2019-06-28 12:52:09 -0500 |
---|---|---|
committer | Justin Reynolds <justinr1234@gmail.com> | 2019-06-28 12:56:51 -0500 |
commit | 3eb4d2c341b712268bd321173909e0a7b19a88c9 (patch) | |
tree | 25a8fcb088f3984e72a5bd3ded9e6a45376e0693 /config | |
parent | a0a482aa8efb3255a523de4524c8e09453d5571f (diff) | |
download | wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.gz wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.tar.bz2 wekan-3eb4d2c341b712268bd321173909e0a7b19a88c9.zip |
Prettier & eslint project style update
Diffstat (limited to 'config')
-rw-r--r-- | config/accounts.js | 60 | ||||
-rw-r--r-- | config/router.js | 16 |
2 files changed, 48 insertions, 28 deletions
diff --git a/config/accounts.js b/config/accounts.js index e7faa4cd..f88f2d83 100644 --- a/config/accounts.js +++ b/config/accounts.js @@ -1,20 +1,25 @@ const passwordField = AccountsTemplates.removeField('password'); const emailField = AccountsTemplates.removeField('email'); -AccountsTemplates.addFields([{ - _id: 'username', - type: 'text', - displayName: 'username', - required: true, - minLength: 2, -}, emailField, passwordField, { - _id: 'invitationcode', - type: 'text', - displayName: 'Invitation Code', - required: false, - minLength: 6, - template: 'invitationCode', -}]); +AccountsTemplates.addFields([ + { + _id: 'username', + type: 'text', + displayName: 'username', + required: true, + minLength: 2, + }, + emailField, + passwordField, + { + _id: 'invitationcode', + type: 'text', + displayName: 'Invitation Code', + required: false, + minLength: 6, + template: 'invitationCode', + }, +]); AccountsTemplates.configure({ defaultLayout: 'userFormsLayout', @@ -34,7 +39,8 @@ AccountsTemplates.configure({ }); ['signIn', 'signUp', 'resetPwd', 'forgotPwd', 'enrollAccount'].forEach( - (routeName) => AccountsTemplates.configureRoute(routeName)); + routeName => AccountsTemplates.configureRoute(routeName), +); // We display the form to change the password in a popup window that already // have a title, so we unset the title automatically displayed by useraccounts. @@ -56,15 +62,25 @@ AccountsTemplates.configureRoute('changePwd', { }); if (Meteor.isServer) { - - ['resetPassword-subject', 'resetPassword-text', 'verifyEmail-subject', 'verifyEmail-text', 'enrollAccount-subject', 'enrollAccount-text'].forEach((str) => { + [ + 'resetPassword-subject', + 'resetPassword-text', + 'verifyEmail-subject', + 'verifyEmail-text', + 'enrollAccount-subject', + 'enrollAccount-text', + ].forEach(str => { const [templateName, field] = str.split('-'); Accounts.emailTemplates[templateName][field] = (user, url) => { - return TAPi18n.__(`email-${str}`, { - url, - user: user.getName(), - siteName: Accounts.emailTemplates.siteName, - }, user.getLanguage()); + return TAPi18n.__( + `email-${str}`, + { + url, + user: user.getName(), + siteName: Accounts.emailTemplates.siteName, + }, + user.getLanguage(), + ); }; }); } diff --git a/config/router.js b/config/router.js index 80e89e4c..ad76035b 100644 --- a/config/router.js +++ b/config/router.js @@ -1,7 +1,9 @@ let previousPath; -FlowRouter.triggers.exit([({path}) => { - previousPath = path; -}]); +FlowRouter.triggers.exit([ + ({ path }) => { + previousPath = path; + }, +]); FlowRouter.route('/', { name: 'home', @@ -192,9 +194,11 @@ const redirections = { _.each(redirections, (newPath, oldPath) => { FlowRouter.route(oldPath, { - triggersEnter: [(context, redirect) => { - redirect(FlowRouter.path(newPath, context.params)); - }], + triggersEnter: [ + (context, redirect) => { + redirect(FlowRouter.path(newPath, context.params)); + }, + ], }); }); |