mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 21:28:49 +01:00
add currentSetting to ReactiveCache
This commit is contained in:
parent
c6ee58ef88
commit
b7dbeba7de
13 changed files with 59 additions and 55 deletions
|
|
@ -42,10 +42,6 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
|
||||
currentSetting() {
|
||||
return Settings.findOne();
|
||||
},
|
||||
|
||||
boards() {
|
||||
return Boards.find(
|
||||
{
|
||||
|
|
@ -60,16 +56,16 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
toggleForgotPassword() {
|
||||
this.setLoading(true);
|
||||
const forgotPasswordClosed = this.currentSetting().disableForgotPassword;
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
const forgotPasswordClosed = Utils.getCurrentSetting().disableForgotPassword;
|
||||
Settings.update(Utils.getCurrentSetting()._id, {
|
||||
$set: { disableForgotPassword: !forgotPasswordClosed },
|
||||
});
|
||||
this.setLoading(false);
|
||||
},
|
||||
toggleRegistration() {
|
||||
this.setLoading(true);
|
||||
const registrationClosed = this.currentSetting().disableRegistration;
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
const registrationClosed = Utils.getCurrentSetting().disableRegistration;
|
||||
Settings.update(Utils.getCurrentSetting()._id, {
|
||||
$set: { disableRegistration: !registrationClosed },
|
||||
});
|
||||
this.setLoading(false);
|
||||
|
|
@ -165,7 +161,7 @@ BlazeComponent.extendComponent({
|
|||
.trim();
|
||||
const from = this.checkField('#mail-server-from');
|
||||
const tls = $('#mail-server-tls.is-checked').length > 0;
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
Settings.update(Utils.getCurrentSetting()._id, {
|
||||
$set: {
|
||||
'mailServer.host': host,
|
||||
'mailServer.port': port,
|
||||
|
|
@ -245,7 +241,7 @@ BlazeComponent.extendComponent({
|
|||
const spinnerName = $('#spinnerName').val();
|
||||
|
||||
try {
|
||||
Settings.update(Settings.findOne()._id, {
|
||||
Settings.update(Utils.getCurrentSetting()._id, {
|
||||
$set: {
|
||||
productName,
|
||||
hideLogo: hideLogoChange,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue