From b7fc07f100aaaa579e27b28aff4ed520cc941da9 Mon Sep 17 00:00:00 2001 From: Timofey Boyko Date: Mon, 15 Jul 2024 17:52:14 +0300 Subject: [PATCH] Client:Store:ContextOptionsStore: group move, copy and duplicate for info panel --- .../client/src/store/ContextOptionsStore.js | 131 +++++++++--------- 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/packages/client/src/store/ContextOptionsStore.js b/packages/client/src/store/ContextOptionsStore.js index 4b087a521d..adf2ffa40a 100644 --- a/packages/client/src/store/ContextOptionsStore.js +++ b/packages/client/src/store/ContextOptionsStore.js @@ -1312,72 +1312,71 @@ class ContextOptionsStore { disabled: false, }, ]; - const moveActions = - isDesktop() && !isInfoPanel - ? [ - { - id: "option_move-or-copy", - key: "move", - label: t("MoveOrCopy"), - icon: CopyReactSvgUrl, - items: [ - { - id: "option_move-to", - key: "move-to", - label: t("Common:MoveTo"), - icon: MoveReactSvgUrl, - onClick: isEditing - ? () => this.onShowEditingToast(t) - : () => this.onMoveAction(item), - disabled: false, - }, - { - id: "option_copy-to", - key: "copy-to", - label: t("Common:Copy"), - icon: CopyReactSvgUrl, - onClick: () => this.onCopyAction(item), - disabled: false, - }, - { - id: "option_create-duplicate", - key: "duplicate", - label: t("Common:Duplicate"), - icon: DuplicateReactSvgUrl, - onClick: () => this.onDuplicate(item, t), - disabled: false, - }, - ], - }, - ] - : [ - { - id: "option_move-to", - key: "move-to", - label: t("Common:MoveTo"), - icon: MoveReactSvgUrl, - onClick: isEditing - ? () => this.onShowEditingToast(t) - : () => this.onMoveAction(item), - disabled: false, - }, - { - id: "option_copy-to", - key: "copy-to", - label: t("Common:Copy"), - icon: CopyReactSvgUrl, - onClick: () => this.onCopyAction(item), - disabled: false, - }, - { - id: "option_create-duplicate", - key: "duplicate", - label: t("Common:Duplicate"), - icon: DuplicateReactSvgUrl, - onClick: () => this.onDuplicate(item, t), - disabled: false, - }, - ]; + const moveActions = isDesktop() + ? [ + { + id: "option_move-or-copy", + key: "move", + label: t("MoveOrCopy"), + icon: CopyReactSvgUrl, + items: [ + { + id: "option_move-to", + key: "move-to", + label: t("Common:MoveTo"), + icon: MoveReactSvgUrl, + onClick: isEditing + ? () => this.onShowEditingToast(t) + : () => this.onMoveAction(item), + disabled: false, + }, + { + id: "option_copy-to", + key: "copy-to", + label: t("Common:Copy"), + icon: CopyReactSvgUrl, + onClick: () => this.onCopyAction(item), + disabled: false, + }, + { + id: "option_create-duplicate", + key: "duplicate", + label: t("Common:Duplicate"), + icon: DuplicateReactSvgUrl, + onClick: () => this.onDuplicate(item, t), + disabled: false, + }, + ], + }, + ] + : [ + { + id: "option_move-to", + key: "move-to", + label: t("Common:MoveTo"), + icon: MoveReactSvgUrl, + onClick: isEditing + ? () => this.onShowEditingToast(t) + : () => this.onMoveAction(item), + disabled: false, + }, + { + id: "option_copy-to", + key: "copy-to", + label: t("Common:Copy"), + icon: CopyReactSvgUrl, + onClick: () => this.onCopyAction(item), + disabled: false, + }, + { + id: "option_create-duplicate", + key: "duplicate", + label: t("Common:Duplicate"), + icon: DuplicateReactSvgUrl, + onClick: () => this.onDuplicate(item, t), + disabled: false, + }, + ]; const { pinOptions, muteOptions } = this.getRoomsRootContextOptions( item,