mirror of
https://github.com/wekan/wekan.git
synced 2025-12-24 03:10:12 +01:00
Admin Panel/Settings/Accounts: Hide system messages of all users.
Thanks to bbyszio, r4nc0r and xet7 ! Related #3345
This commit is contained in:
parent
5f53f8cc01
commit
a249ffc805
4 changed files with 43 additions and 7 deletions
|
|
@ -274,7 +274,6 @@ BlazeComponent.extendComponent({
|
|||
$set: { booleanValue: allowUserDelete },
|
||||
});
|
||||
},
|
||||
|
||||
allowEmailChange() {
|
||||
return AccountSettings.findOne('accounts-allowEmailChange').booleanValue;
|
||||
},
|
||||
|
|
@ -284,12 +283,31 @@ BlazeComponent.extendComponent({
|
|||
allowUserDelete() {
|
||||
return AccountSettings.findOne('accounts-allowUserDelete').booleanValue;
|
||||
},
|
||||
allHideSystemMessages() {
|
||||
Meteor.call('setAllUsersHideSystemMessages', (err, ret) => {
|
||||
if (!err && ret) {
|
||||
if (ret === true) {
|
||||
const message = `${TAPi18n.__(
|
||||
'now-system-messages-of-all-users-are-hidden',
|
||||
)}`;
|
||||
alert(message);
|
||||
}
|
||||
} else {
|
||||
const reason = err.reason || '';
|
||||
const message = `${TAPi18n.__(err.error)}\n${reason}`;
|
||||
alert(message);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click button.js-accounts-save': this.saveAccountsChange,
|
||||
},
|
||||
{
|
||||
'click button.js-all-hide-system-messages': this.allHideSystemMessages,
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('accountSettings');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue