Merge pull request #5643 from NadavTasher/feature/optional-vertical-scrollbars

Allow vertical scrollbars to be disabled (new preference)
This commit is contained in:
Lauri Ojansivu 2024-12-30 23:44:33 +02:00 committed by GitHub
commit b537f9b20a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 {