mirror of
https://github.com/wekan/wekan.git
synced 2025-12-22 18:30:13 +01:00
New option to set up minimum limit to show cards count for each list in board
This commit is contained in:
parent
1ad4107201
commit
606dbbbbf2
7 changed files with 53 additions and 0 deletions
|
|
@ -79,6 +79,10 @@ Users.attachSchema(new SimpleSchema({
|
|||
type: [String],
|
||||
optional: true,
|
||||
},
|
||||
'profile.showCardsCountAt': {
|
||||
type: Number,
|
||||
optional: true,
|
||||
},
|
||||
'profile.starredBoards': {
|
||||
type: [String],
|
||||
optional: true,
|
||||
|
|
@ -180,6 +184,11 @@ Users.helpers({
|
|||
}
|
||||
},
|
||||
|
||||
getLimitToShowCardsCount() {
|
||||
const profile = this.profile || {};
|
||||
return profile.showCardsCountAt;
|
||||
},
|
||||
|
||||
getName() {
|
||||
const profile = this.profile || {};
|
||||
return profile.fullname || this.username;
|
||||
|
|
@ -283,6 +292,10 @@ Users.mutations({
|
|||
setAvatarUrl(avatarUrl) {
|
||||
return { $set: { 'profile.avatarUrl': avatarUrl }};
|
||||
},
|
||||
|
||||
setShowCardsCountAt(limit) {
|
||||
return { $set: { 'profile.showCardsCountAt': limit } };
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
|
|
@ -299,6 +312,10 @@ Meteor.methods({
|
|||
const user = Meteor.user();
|
||||
user.toggleSystem(user.hasHiddenSystemMessages());
|
||||
},
|
||||
changeLimitToShowCardsCount(limit) {
|
||||
check(limit, Number);
|
||||
Meteor.user().setShowCardsCountAt(limit);
|
||||
}
|
||||
});
|
||||
|
||||
if (Meteor.isServer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue