mirror of
https://github.com/wekan/wekan.git
synced 2025-12-19 17:00: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: {},
|
defaultValue: {},
|
||||||
blackbox: true,
|
blackbox: true,
|
||||||
},
|
},
|
||||||
|
'profile.keyboardShortcuts': {
|
||||||
|
/**
|
||||||
|
* User-specified state of keyboard shortcut activation.
|
||||||
|
*/
|
||||||
|
type: Boolean,
|
||||||
|
defaultValue: true,
|
||||||
|
},
|
||||||
services: {
|
services: {
|
||||||
/**
|
/**
|
||||||
* services field of the user
|
* services field of the user
|
||||||
|
|
@ -954,6 +961,11 @@ Users.helpers({
|
||||||
return 'templates';
|
return 'templates';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isKeyboardShortcuts() {
|
||||||
|
const { keyboardShortcuts = false } = this.profile || {};
|
||||||
|
return keyboardShortcuts;
|
||||||
|
},
|
||||||
|
|
||||||
remove() {
|
remove() {
|
||||||
User.remove({
|
User.remove({
|
||||||
_id: this._id,
|
_id: this._id,
|
||||||
|
|
@ -1018,6 +1030,14 @@ Users.mutations({
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
toggleKeyboardShortcuts() {
|
||||||
|
const { keyboardShortcuts = false } = this.profile || {};
|
||||||
|
return {
|
||||||
|
$set: {
|
||||||
|
'profile.keyboardShortcuts': !keyboardShortcuts,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
addInvite(boardId) {
|
addInvite(boardId) {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue