mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Add profile.keyboardShortcuts to User model
This commit is contained in:
parent
41b1227b17
commit
658e43ab54
1 changed files with 20 additions and 0 deletions
|
|
@ -444,6 +444,13 @@ Users.attachSchema(
|
|||
defaultValue: {},
|
||||
blackbox: true,
|
||||
},
|
||||
'profile.keyboardShortcuts': {
|
||||
/**
|
||||
* User-specified state of keyboard shortcut activation.
|
||||
*/
|
||||
type: Boolean,
|
||||
defaultValue: true,
|
||||
},
|
||||
services: {
|
||||
/**
|
||||
* services field of the user
|
||||
|
|
@ -954,6 +961,11 @@ Users.helpers({
|
|||
return 'templates';
|
||||
},
|
||||
|
||||
isKeyboardShortcuts() {
|
||||
const { keyboardShortcuts = false } = this.profile || {};
|
||||
return keyboardShortcuts;
|
||||
},
|
||||
|
||||
remove() {
|
||||
User.remove({
|
||||
_id: this._id,
|
||||
|
|
@ -1018,6 +1030,14 @@ Users.mutations({
|
|||
},
|
||||
};
|
||||
},
|
||||
toggleKeyboardShortcuts() {
|
||||
const { keyboardShortcuts = false } = this.profile || {};
|
||||
return {
|
||||
$set: {
|
||||
'profile.keyboardShortcuts': !keyboardShortcuts,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
addInvite(boardId) {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue