mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 17:48:49 +01:00
Hide minicard label text: per user checkbox setting at sidebar.
Thanks to xet7 ! Closes #1466, closes #2561
This commit is contained in:
parent
9e60b41438
commit
f7e0b837d3
56 changed files with 36308 additions and 36205 deletions
|
|
@ -109,7 +109,14 @@ Users.attachSchema(
|
|||
},
|
||||
'profile.hiddenSystemMessages': {
|
||||
/**
|
||||
* does the user wants to hide system messages?
|
||||
* does the user want to hide system messages?
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
'profile.hiddenMinicardLabelText': {
|
||||
/**
|
||||
* does the user want to hide minicard label texts?
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
|
|
@ -359,6 +366,11 @@ Users.helpers({
|
|||
return profile.hiddenSystemMessages || false;
|
||||
},
|
||||
|
||||
hasHiddenMinicardLabelText() {
|
||||
const profile = this.profile || {};
|
||||
return profile.hiddenMinicardLabelText || false;
|
||||
},
|
||||
|
||||
getEmailBuffer() {
|
||||
const { emailBuffer = [] } = this.profile || {};
|
||||
return emailBuffer;
|
||||
|
|
@ -462,6 +474,14 @@ Users.mutations({
|
|||
};
|
||||
},
|
||||
|
||||
toggleLabelText(value = false) {
|
||||
return {
|
||||
$set: {
|
||||
'profile.hiddenMinicardLabelText': !value,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
addNotification(activityId) {
|
||||
return {
|
||||
$addToSet: {
|
||||
|
|
@ -525,6 +545,10 @@ Meteor.methods({
|
|||
const user = Meteor.user();
|
||||
user.toggleSystem(user.hasHiddenSystemMessages());
|
||||
},
|
||||
toggleMinicardLabelText() {
|
||||
const user = Meteor.user();
|
||||
user.toggleLabelText(user.hasHiddenMinicardLabelText());
|
||||
},
|
||||
changeLimitToShowCardsCount(limit) {
|
||||
check(limit, Number);
|
||||
Meteor.user().setShowCardsCountAt(limit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue