Web:Files:Store: remove pin option from archived folder
This commit is contained in:
parent
602e4af0bb
commit
5926b22dbb
@ -780,20 +780,23 @@ class ContextOptionsStore {
|
|||||||
disabled: false,
|
disabled: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const options = [
|
const options = [];
|
||||||
pinOption,
|
|
||||||
{
|
if (!isArchiveFolder) {
|
||||||
|
options.push(pinOption);
|
||||||
|
options.push({
|
||||||
key: "separator0",
|
key: "separator0",
|
||||||
isSeparator: true,
|
isSeparator: true,
|
||||||
},
|
});
|
||||||
archiveOptions,
|
}
|
||||||
{
|
|
||||||
key: "delete-rooms",
|
options.push(archiveOptions);
|
||||||
label: t("Common:Delete"),
|
options.push({
|
||||||
icon: "images/trash.react.svg",
|
key: "delete-rooms",
|
||||||
onClick: deleteRooms,
|
label: t("Common:Delete"),
|
||||||
},
|
icon: "images/trash.react.svg",
|
||||||
];
|
onClick: deleteRooms,
|
||||||
|
});
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
@ -1374,21 +1374,10 @@ class FilesActionStore {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getArchiveRoomsFolderOptions = (itemsCollection, t) => {
|
getArchiveRoomsFolderOptions = (itemsCollection, t) => {
|
||||||
let pinName = "unpin";
|
|
||||||
const { selection } = this.filesStore;
|
|
||||||
|
|
||||||
selection.forEach((item) => {
|
|
||||||
if (!item.pinned) pinName = "pin";
|
|
||||||
});
|
|
||||||
|
|
||||||
const pin = this.getOption(pinName, t);
|
|
||||||
const archive = this.getOption("unarchive", t);
|
const archive = this.getOption("unarchive", t);
|
||||||
const deleteOption = this.getOption("delete-room", t);
|
const deleteOption = this.getOption("delete-room", t);
|
||||||
|
|
||||||
itemsCollection
|
itemsCollection.set("unarchive", archive).set("delete", deleteOption);
|
||||||
.set(pinName, pin)
|
|
||||||
.set("unarchive", archive)
|
|
||||||
.set("delete", deleteOption);
|
|
||||||
return this.convertToArray(itemsCollection);
|
return this.convertToArray(itemsCollection);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user