Add profile.keyboardShortcuts to User model

This commit is contained in:
Nadav Tasher 2024-12-25 00:22:37 +02:00
parent 41b1227b17
commit 658e43ab54

View file

@ -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 {