Collapse Lists to be per user, not per board. In Progress.

Related #5388

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2024-05-01 23:58:57 +03:00
parent e73a44d15b
commit 902f86d363
7 changed files with 74 additions and 44 deletions

View file

@ -31,14 +31,14 @@ BlazeComponent.extendComponent({
return !status;
}
},
collapsed(check = undefined) {
const list = Template.currentData();
const status = list.isCollapsed();
listCollapsed(check = undefined) {
const user = Meteor.user();
const status = user.hasCollapsedList(this._id);
if (check === undefined) {
// just check
return status;
} else {
list.collapse(!status);
user.toggleCollapseList(this._id);
return !status;
}
},
@ -115,9 +115,9 @@ BlazeComponent.extendComponent({
event.preventDefault();
this.starred(!this.starred());
},
'click .js-collapse'(event) {
'click .js-collapse-list'(event) {
event.preventDefault();
this.collapsed(!this.collapsed());
this.listCollapsed(!this.listCollapsed());
},
'click .js-open-list-menu': Popup.open('listAction'),
'click .js-add-card.list-header-plus-top'(event) {