Allow vertical scrollbars to be disabled (user preferences, visible by default)

This commit is contained in:
Nadav Tasher 2024-12-30 23:22:54 +02:00
parent f1810e47e0
commit 3e01231874
11 changed files with 61 additions and 4 deletions

View file

@ -451,6 +451,13 @@ Users.attachSchema(
type: Boolean,
defaultValue: false,
},
'profile.verticalScrollbars': {
/**
* User-specified state of vertical scrollbars visibility.
*/
type: Boolean,
defaultValue: true,
},
services: {
/**
* services field of the user
@ -966,6 +973,11 @@ Users.helpers({
return keyboardShortcuts;
},
isVerticalScrollbars() {
const { verticalScrollbars = true } = this.profile || {};
return verticalScrollbars;
},
remove() {
User.remove({
_id: this._id,
@ -1038,6 +1050,14 @@ Users.mutations({
},
};
},
toggleVerticalScrollbars() {
const { verticalScrollbars = true } = this.profile || {};
return {
$set: {
'profile.verticalScrollbars': !verticalScrollbars,
},
};
},
addInvite(boardId) {
return {