Collapse Lists.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2024-04-26 07:33:06 +03:00
parent f22f470ba4
commit a601ba542a
9 changed files with 159 additions and 58 deletions

View file

@ -156,6 +156,13 @@ Lists.attachSchema(
type: String,
defaultValue: 'list',
},
collapsed: {
/**
* is the list collapsed
*/
type: Boolean,
defaultValue: false,
},
}),
);
@ -286,6 +293,10 @@ Lists.helpers({
return this.starred === true;
},
isCollapsed() {
return this.collapsed === true;
},
absoluteUrl() {
const card = ReactiveCache.getCard({ listId: this._id });
return card && card.absoluteUrl();
@ -306,6 +317,9 @@ Lists.mutations({
star(enable = true) {
return { $set: { starred: !!enable } };
},
collapse(enable = true) {
return { $set: { collapsed: !!enable } };
},
archive() {
if (this.isTemplateList()) {