From 07944e59eeb2ffd10514bff19200d75cb51696d4 Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Tue, 30 Jan 2024 21:51:00 +0100 Subject: [PATCH] fix(menubar): separate NcActionButton from ActionSingle - ActionSingle was used in 2 places: 1. As a single button in the menu 2. As an item in NcActions - NcActions doesn't fully support non-direct NcAction* children - Move NcActionButton usage from ActionSingle to a new component - This new component is named NcActionButton so that NcActions will consider it to be a valid NcAction* component Signed-off-by: Grigorii K. Shartsev --- src/components/Menu/ActionList.vue | 6 +- src/components/Menu/ActionSingle.vue | 49 +++++----------- src/components/Menu/NcActionButton.vue | 81 ++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 37 deletions(-) create mode 100644 src/components/Menu/NcActionButton.vue diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index 18528d941f0..0299c833d2c 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -34,7 +34,7 @@ - import { NcActions } from '@nextcloud/vue' import { BaseActionEntry } from './BaseActionEntry.js' -import ActionSingle from './ActionSingle.vue' +import NcActionButton from './NcActionButton.vue' import { getIsActive } from './utils.js' import { useOutlineStateMixin } from '../Editor/Wrapper.provider.js' import useStore from '../../mixins/store.js' @@ -58,7 +58,7 @@ export default { name: 'ActionList', components: { NcActions, - ActionSingle, + NcActionButton, }, extends: BaseActionEntry, mixins: [useStore, useOutlineStateMixin, useMenuIDMixin], diff --git a/src/components/Menu/ActionSingle.vue b/src/components/Menu/ActionSingle.vue index 162f82b8ba5..6a4fd8172d1 100644 --- a/src/components/Menu/ActionSingle.vue +++ b/src/components/Menu/ActionSingle.vue @@ -21,65 +21,46 @@ -->