diff options
author | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-10-13 15:56:31 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-10-14 11:36:11 +0300 |
commit | a902b89e0f0e65b9158172a8bb73755d053304dc (patch) | |
tree | c673b5a2d6e2655efd624c07d5237328d744febe | |
parent | d6fd40403bb7fc4e7251ec9209930f74c9f1a062 (diff) |
🩹 formatting-help must only be in extra options
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
-rw-r--r-- | src/components/Menu/ActionFormattingHelp.vue | 45 | ||||
-rw-r--r-- | src/components/Menu/ActionList.vue | 13 | ||||
-rw-r--r-- | src/components/Menu/MenuBar.vue | 6 |
3 files changed, 50 insertions, 14 deletions
diff --git a/src/components/Menu/ActionFormattingHelp.vue b/src/components/Menu/ActionFormattingHelp.vue new file mode 100644 index 000000000..de19b2533 --- /dev/null +++ b/src/components/Menu/ActionFormattingHelp.vue @@ -0,0 +1,45 @@ +<!-- + - @copyright Copyright (c) 2022 Vinicius Reis <vinicius@nextcloud.com> + - + - @author Vinicius Reis <vinicius@nextcloud.com> + - + - @license GNU AGPL version 3 or any later version + - + - This program is free software: you can redistribute it and/or modify + - it under the terms of the GNU Affero General Public License as + - published by the Free Software Foundation, either version 3 of the + - License, or (at your option) any later version. + - + - This program is distributed in the hope that it will be useful, + - but WITHOUT ANY WARRANTY; without even the implied warranty of + - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + - GNU Affero General Public License for more details. + - + - You should have received a copy of the GNU Affero General Public License + - along with this program. If not, see <http://www.gnu.org/licenses/>. + - + --> +<template> + <NcActionButton close-after-click + data-text-action-entry="formatting-help" + v-on="$listeners"> + <template #icon> + <Help /> + </template> + {{ t('text', 'Formatting help') }} + </NcActionButton> +</template> + +<script> +import { defineComponent } from 'vue' +import { NcActionButton } from '@nextcloud/vue' +import { Help } from '../icons.js' + +export default defineComponent({ + name: 'ActionFormattingHelp', + components: { + NcActionButton, + Help, + }, +}) +</script> diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index eb7621fb2..1a50b0ac1 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -41,35 +41,24 @@ :action-entry="child" v-on="$listeners" @trigged="onTrigger" /> - <NcActionButton close-after-click - data-text-action-entry="formatting-help" - @click="$emit('call:help')"> - <template #icon> - <Help /> - </template> - {{ t('text', 'Formatting help') }} - </NcActionButton> <slot name="lastAction" /> </NcActions> </template> <script> -import { NcActions, NcActionButton } from '@nextcloud/vue' +import { NcActions } from '@nextcloud/vue' import { BaseActionEntry } from './BaseActionEntry.js' import ActionSingle from './ActionSingle.vue' import { getIsActive } from './utils.js' import { useOutlineStateMixin } from '../Editor/Wrapper.provider.js' import useStore from '../../mixins/store.js' import { useMenuIDMixin } from './MenuBar.provider.js' -import { Help } from '../icons.js' export default { name: 'ActionList', components: { NcActions, - NcActionButton, ActionSingle, - Help, }, extends: BaseActionEntry, mixins: [useStore, useOutlineStateMixin, useMenuIDMixin], diff --git a/src/components/Menu/MenuBar.vue b/src/components/Menu/MenuBar.vue index 1cbc3904c..5897f19a0 100644 --- a/src/components/Menu/MenuBar.vue +++ b/src/components/Menu/MenuBar.vue @@ -45,9 +45,9 @@ :key="`text-action--${actionEntry.key}`" /> <ActionList key="text-action--remain" :action-entry="hiddenEntries" - @update:open="refreshWordCount" - @call:help="showHelp"> + @update:open="refreshWordCount"> <template #lastAction> + <ActionFormattingHelp @click="showHelp" /> <NcActionSeparator /> <NcActionText data-text-action-entry="character-count"> <template #icon> @@ -83,11 +83,13 @@ import { useIsRichEditorMixin, useIsRichWorkspaceMixin, } from '../Editor.provider.js' +import ActionFormattingHelp from './ActionFormattingHelp.vue' export default { name: 'MenuBar', components: { ActionEntry, + ActionFormattingHelp, ActionList, AlphabeticalVariant, HelpModal, |