mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
- Fix lint errors.
Thanks to xet7 !
This commit is contained in:
parent
c2118f4830
commit
de9965213a
5 changed files with 15 additions and 20 deletions
|
|
@ -28,7 +28,7 @@ Template.userFormsLayout.onCreated(function() {
|
||||||
onReady() {
|
onReady() {
|
||||||
instance.currentSetting.set(Settings.findOne());
|
instance.currentSetting.set(Settings.findOne());
|
||||||
return this.stop();
|
return this.stop();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -140,16 +140,16 @@ function getUserAuthenticationMethod(defaultAuthenticationMethod, match) {
|
||||||
Meteor.subscribe('user-authenticationMethod', match, {
|
Meteor.subscribe('user-authenticationMethod', match, {
|
||||||
onReady() {
|
onReady() {
|
||||||
const user = Users.findOne();
|
const user = Users.findOne();
|
||||||
|
|
||||||
const authenticationMethod = user
|
const authenticationMethod = user
|
||||||
? user.authenticationMethod
|
? user.authenticationMethod
|
||||||
: defaultAuthenticationMethod;
|
: defaultAuthenticationMethod;
|
||||||
|
|
||||||
resolve(authenticationMethod);
|
resolve(authenticationMethod);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
resolve(defaultAuthenticationMethod);
|
resolve(defaultAuthenticationMethod);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ BlazeComponent.extendComponent({
|
||||||
customHTMLafterBodyStart,
|
customHTMLafterBodyStart,
|
||||||
customHTMLbeforeBodyEnd,
|
customHTMLbeforeBodyEnd,
|
||||||
displayAuthenticationMethod,
|
displayAuthenticationMethod,
|
||||||
defaultAuthenticationMethod
|
defaultAuthenticationMethod,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
@ -171,17 +171,14 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
sendSMTPTestEmail() {
|
sendSMTPTestEmail() {
|
||||||
Meteor.call('sendSMTPTestEmail', (err, ret) => {
|
Meteor.call('sendSMTPTestEmail', (err, ret) => {
|
||||||
if (!err && ret) { /* eslint-disable no-console */
|
if (!err && ret) {
|
||||||
const message = `${TAPi18n.__(ret.message)}: ${ret.email}`;
|
const message = `${TAPi18n.__(ret.message)}: ${ret.email}`;
|
||||||
console.log(message);
|
|
||||||
alert(message);
|
alert(message);
|
||||||
} else {
|
} else {
|
||||||
const reason = err.reason || '';
|
const reason = err.reason || '';
|
||||||
const message = `${TAPi18n.__(err.error)}\n${reason}`;
|
const message = `${TAPi18n.__(err.error)}\n${reason}`;
|
||||||
console.log(message, err);
|
|
||||||
alert(message);
|
alert(message);
|
||||||
}
|
}
|
||||||
/* eslint-enable no-console */
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -196,7 +193,7 @@ BlazeComponent.extendComponent({
|
||||||
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
|
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
|
||||||
'click a.js-toggle-hide-logo': this.toggleHideLogo,
|
'click a.js-toggle-hide-logo': this.toggleHideLogo,
|
||||||
'click button.js-save-layout': this.saveLayout,
|
'click button.js-save-layout': this.saveLayout,
|
||||||
'click a.js-toggle-display-authentication-method': this.toggleDisplayAuthenticationMethod
|
'click a.js-toggle-display-authentication-method': this.toggleDisplayAuthenticationMethod,
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
}).register('setting');
|
}).register('setting');
|
||||||
|
|
@ -292,8 +289,6 @@ Template.selectAuthenticationMethod.helpers({
|
||||||
return Template.instance().authenticationMethods.get();
|
return Template.instance().authenticationMethods.get();
|
||||||
},
|
},
|
||||||
isSelected(match) {
|
isSelected(match) {
|
||||||
console.log('this : ', this);
|
|
||||||
console.log('instance : ', Template.instance());
|
|
||||||
return Template.instance().data.authenticationMethod === match;
|
return Template.instance().data.authenticationMethod === match;
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ if (Meteor.isServer) {
|
||||||
const from = `Boards Support <support@${domain}>`;
|
const from = `Boards Support <support@${domain}>`;
|
||||||
const defaultSetting = {disableRegistration: false, mailServer: {
|
const defaultSetting = {disableRegistration: false, mailServer: {
|
||||||
username: '', password: '', host: '', port: '', enableTLS: false, from,
|
username: '', password: '', host: '', port: '', enableTLS: false, from,
|
||||||
}, createdAt: now, modifiedAt: now, displayAuthenticationMethod: true,
|
}, createdAt: now, modifiedAt: now, displayAuthenticationMethod: true,
|
||||||
defaultAuthenticationMethod: 'password'};
|
defaultAuthenticationMethod: 'password'};
|
||||||
Settings.insert(defaultSetting);
|
Settings.insert(defaultSetting);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,7 @@ Migrations.add('add-displayAuthenticationMethod', () => {
|
||||||
$set: {
|
$set: {
|
||||||
displayAuthenticationMethod: true,
|
displayAuthenticationMethod: true,
|
||||||
},
|
},
|
||||||
}, noValidateMulti)
|
}, noValidateMulti);
|
||||||
});
|
});
|
||||||
|
|
||||||
Migrations.add('add-defaultAuthenticationMethod', () => {
|
Migrations.add('add-defaultAuthenticationMethod', () => {
|
||||||
|
|
@ -420,5 +420,5 @@ Migrations.add('add-defaultAuthenticationMethod', () => {
|
||||||
$set: {
|
$set: {
|
||||||
defaultAuthenticationMethod: 'password',
|
defaultAuthenticationMethod: 'password',
|
||||||
},
|
},
|
||||||
}, noValidateMulti)
|
}, noValidateMulti);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ Meteor.publish('setting', () => {
|
||||||
customHTMLafterBodyStart: 1,
|
customHTMLafterBodyStart: 1,
|
||||||
customHTMLbeforeBodyEnd: 1,
|
customHTMLbeforeBodyEnd: 1,
|
||||||
displayAuthenticationMethod: 1,
|
displayAuthenticationMethod: 1,
|
||||||
defaultAuthenticationMethod: 1
|
defaultAuthenticationMethod: 1,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue