From 0746b20089189de7b82a32d06b2c7c3084e1bab0 Mon Sep 17 00:00:00 2001 From: TimofeyBoyko Date: Tue, 14 Jun 2022 16:34:07 +0300 Subject: [PATCH] Web:Files: add context options for virtual rooms page --- .../Client/src/store/ContextOptionsStore.js | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/products/ASC.Files/Client/src/store/ContextOptionsStore.js b/products/ASC.Files/Client/src/store/ContextOptionsStore.js index 8dd6236ebd..3618ba741f 100644 --- a/products/ASC.Files/Client/src/store/ContextOptionsStore.js +++ b/products/ASC.Files/Client/src/store/ContextOptionsStore.js @@ -339,6 +339,58 @@ class ContextOptionsStore { setIsVisible(true); }; + onClickEditRoom = (room) => { + console.log("edit room"); + }; + + onClickPinRoom = (room) => { + console.log("pin room"); + }; + + onClickMoveRoomToArchive = (room) => { + console.log("move room to archive"); + }; + + onClickDeleteRoom = (room) => { + console.log("delete room"); + }; + + getRoomsContextOptions = (room, t) => { + const contextOptions = [ + { + key: "edit", + label: "Edit room", + icon: "images/settings.react.svg", + onClick: () => this.onClickEditRoom(room), + disabled: false, + }, + { + key: "pin", + label: "Pin to top", + icon: "images/pin.react.svg", + onClick: () => this.onClickPinRoom(room), + disabled: false, + }, + { key: "separator", isSeparator: true }, + { + key: "archive", + label: "Move to archive", + icon: "images/room.archive.svg", + onClick: () => this.onClickMoveRoomToArchive(room), + disabled: false, + }, + { + key: "delete", + label: "Delete", + icon: "images/trash.react.svg", + onClick: () => this.onClickDeleteRoom(room), + disabled: false, + }, + ]; + + return contextOptions; + }; + getFilesContextOptions = (item, t) => { const { contextOptions } = item; const isRootThirdPartyFolder =