diff options
author | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-05-26 16:09:54 +0300 |
---|---|---|
committer | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-05-26 16:09:54 +0300 |
commit | 1d699f508dca112ff709c03a4649efe76a3d0da3 (patch) | |
tree | fdd1f31fc3393b7feac875567a34c963981075c3 | |
parent | 5615e73a823cc5de19fc84cc9fcb107da7f1c696 (diff) |
♻️ (#2345): rename _key -> key
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
-rw-r--r-- | src/components/Menu/ActionImageUpload.vue | 6 | ||||
-rw-r--r-- | src/components/Menu/ActionList.vue | 4 | ||||
-rw-r--r-- | src/components/Menu/ActionSingle.vue | 2 | ||||
-rw-r--r-- | src/components/Menu/EmojiPickerAction.vue | 2 | ||||
-rw-r--r-- | src/components/Menu/MenuBar.vue | 4 | ||||
-rw-r--r-- | src/components/Menu/entries.js | 54 | ||||
-rw-r--r-- | src/components/Menu/utils.js | 2 |
7 files changed, 37 insertions, 37 deletions
diff --git a/src/components/Menu/ActionImageUpload.vue b/src/components/Menu/ActionImageUpload.vue index 99e97344e..cfbdac5a2 100644 --- a/src/components/Menu/ActionImageUpload.vue +++ b/src/components/Menu/ActionImageUpload.vue @@ -21,7 +21,7 @@ --> <template> <Actions class="entry-action entry-action__image-upload" - :data-text-action-entry="actionEntry._key" + :data-text-action-entry="actionEntry.key" :title="actionEntry.label" :aria-label="actionEntry.label" aria-haspopup> @@ -33,7 +33,7 @@ </template> <ActionButton close-after-click :disabled="isUploadingImages" - :data-text-action-entry="`${actionEntry._key}-upload`" + :data-text-action-entry="`${actionEntry.key}-upload`" @click="$callChooseLocalImage"> <template #icon> <Upload /> @@ -43,7 +43,7 @@ <ActionButton v-if="!$isPublic" close-after-click :disabled="isUploadingImages" - :data-text-action-entry="`${actionEntry._key}-insert`" + :data-text-action-entry="`${actionEntry.key}-insert`" @click="$callImagePrompt"> <template #icon> <Folder /> diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue index 156f3eddd..7f3d75a94 100644 --- a/src/components/Menu/ActionList.vue +++ b/src/components/Menu/ActionList.vue @@ -25,13 +25,13 @@ class="entry-list-action entry-action" v-bind="state" :title="actionEntry.label" - :data-text-action-entry="actionEntry._key" + :data-text-action-entry="actionEntry.key" v-on="$listeners"> <template #icon> <component :is="icon" /> </template> <ActionSingle v-for="child in actionEntry.children" - :key="`child-${child._key}`" + :key="`child-${child.key}`" is-item :action-entry="child" @trigged="refocus" /> diff --git a/src/components/Menu/ActionSingle.vue b/src/components/Menu/ActionSingle.vue index a7868f82f..46d854e18 100644 --- a/src/components/Menu/ActionSingle.vue +++ b/src/components/Menu/ActionSingle.vue @@ -117,7 +117,7 @@ export default { attrs: { title, type: 'tertiary', - 'data-text-action-entry': actionEntry._key, + 'data-text-action-entry': actionEntry.key, ...attrs, }, on: { diff --git a/src/components/Menu/EmojiPickerAction.vue b/src/components/Menu/EmojiPickerAction.vue index e8bf0d474..cb23fabde 100644 --- a/src/components/Menu/EmojiPickerAction.vue +++ b/src/components/Menu/EmojiPickerAction.vue @@ -21,7 +21,7 @@ --> <template> <EmojiPicker class="entry-action entry-action__emoji" - :data-text-action-entry="actionEntry._key" + :data-text-action-entry="actionEntry.key" @selectData="addEmoji"> <button v-tooltip="actionEntry.label" class="entry-action__button" diff --git a/src/components/Menu/MenuBar.vue b/src/components/Menu/MenuBar.vue index 86bc67be5..17025f96c 100644 --- a/src/components/Menu/MenuBar.vue +++ b/src/components/Menu/MenuBar.vue @@ -32,7 +32,7 @@ <div v-if="$isRichEditor" ref="menubar" class="text-menubar__entries"> <ActionEntry v-for="actionEntry of visibleEntries" v-bind="{ actionEntry }" - :key="`text-action--${actionEntry._key}`" /> + :key="`text-action--${actionEntry.key}`" /> </div> <div class="text-menubar__slot"> <slot /> @@ -123,7 +123,7 @@ export default { }, remainAction() { return { - _key: 'remain', + key: 'remain', label: this.t('text', 'Remaining Actions'), icon: DotsHorizontal, children: this.hiddenEntries, diff --git a/src/components/Menu/entries.js b/src/components/Menu/entries.js index 0b0b98299..efbc5efcd 100644 --- a/src/components/Menu/entries.js +++ b/src/components/Menu/entries.js @@ -52,7 +52,7 @@ import ActionImageUpload from './ActionImageUpload.vue' export default [ { - _key: 'undo', + key: 'undo', label: t('text', 'Undo'), keyChar: 'z', keyModifiers: ['ctrl'], @@ -61,7 +61,7 @@ export default [ priority: 5, }, { - _key: 'redo', + key: 'redo', label: t('text', 'Redo'), keyChar: 'y', keyModifiers: ['ctrl'], @@ -70,7 +70,7 @@ export default [ priority: 11, }, { - _key: 'bold', + key: 'bold', label: t('text', 'Bold'), keyChar: 'b', keyModifiers: ['ctrl'], @@ -82,7 +82,7 @@ export default [ priority: 6, }, { - _key: 'italic', + key: 'italic', label: t('text', 'Italic'), keyChar: 'i', keyModifiers: ['ctrl'], @@ -94,7 +94,7 @@ export default [ priority: 7, }, { - _key: 'underline', + key: 'underline', label: t('text', 'Underline'), keyChar: 'u', keyModifiers: ['ctrl'], @@ -106,7 +106,7 @@ export default [ priority: 14, }, { - _key: 'strikethrough', + key: 'strikethrough', label: t('text', 'Strikethrough'), keyChar: 'd', keyModifiers: ['ctrl'], @@ -118,7 +118,7 @@ export default [ priority: 15, }, { - _key: 'headings', + key: 'headings', label: t('text', 'Headings'), keyChar: '1…6', keyModifiers: ['ctrl', 'shift'], @@ -127,7 +127,7 @@ export default [ isActive: 'heading', children: [ { - _key: 'headings-h1', + key: 'headings-h1', label: t('text', 'Heading 1'), icon: FormatHeader1, isActive: ['heading', { level: 1 }], @@ -136,7 +136,7 @@ export default [ }, }, { - _key: 'headings-h2', + key: 'headings-h2', label: t('text', 'Heading 2'), icon: FormatHeader2, isActive: ['heading', { level: 2 }], @@ -145,7 +145,7 @@ export default [ }, }, { - _key: 'headings-h3', + key: 'headings-h3', label: t('text', 'Heading 3'), icon: FormatHeader3, isActive: ['heading', { level: 3 }], @@ -154,7 +154,7 @@ export default [ }, }, { - _key: 'headings-h4', + key: 'headings-h4', label: t('text', 'Heading 4'), isActive: ['heading', { level: 4 }], icon: FormatHeader4, @@ -163,7 +163,7 @@ export default [ }, }, { - _key: 'headings-h5', + key: 'headings-h5', label: t('text', 'Heading 5'), isActive: ['heading', { level: 5 }], icon: FormatHeader5, @@ -172,7 +172,7 @@ export default [ }, }, { - _key: 'headings-h6', + key: 'headings-h6', label: t('text', 'Heading 6'), isActive: ['heading', { level: 6 }], icon: FormatHeader6, @@ -184,7 +184,7 @@ export default [ priority: 1, }, { - _key: 'unordered-list', + key: 'unordered-list', label: t('text', 'Unordered list'), keyChar: '8', keyModifiers: ['ctrl', 'shift'], @@ -196,7 +196,7 @@ export default [ priority: 8, }, { - _key: 'ordered-list', + key: 'ordered-list', label: t('text', 'Ordered list'), keyChar: '9', keyModifiers: ['ctrl', 'shift'], @@ -208,7 +208,7 @@ export default [ priority: 9, }, { - _key: 'task-list', + key: 'task-list', label: t('text', 'ToDo list'), isActive: 'taskList', icon: FormatListCheckbox, @@ -216,7 +216,7 @@ export default [ priority: 10, }, { - _key: 'blockquote', + key: 'blockquote', label: t('text', 'Blockquote'), keyChar: '>', keyModifiers: ['ctrl'], @@ -228,14 +228,14 @@ export default [ priority: 12, }, { - _key: 'callouts', + key: 'callouts', label: t('text', 'Callouts'), visible: false, icon: Info, isActive: 'callout', children: [ { - _key: 'callout-info', + key: 'callout-info', label: t('text', 'Info'), isActive: ['callout', { type: 'info' }], icon: Info, @@ -244,7 +244,7 @@ export default [ }, }, { - _key: 'callout-success', + key: 'callout-success', label: t('text', 'Success'), isActive: ['callout', { type: 'success' }], icon: Positive, @@ -253,7 +253,7 @@ export default [ }, }, { - _key: 'callout-warn', + key: 'callout-warn', label: t('text', 'Warning'), isActive: ['callout', { type: 'warn' }], icon: Warn, @@ -262,7 +262,7 @@ export default [ }, }, { - _key: 'callout-error', + key: 'callout-error', label: t('text', 'Danger'), isActive: ['callout', { type: 'error' }], icon: Danger, @@ -274,7 +274,7 @@ export default [ priority: 3, }, { - _key: 'code-block', + key: 'code-block', label: t('text', 'Code block'), isActive: 'codeBlock', icon: CodeTags, @@ -284,7 +284,7 @@ export default [ priority: 13, }, { - _key: 'table', + key: 'table', label: t('text', 'Table'), isActive: 'table', icon: Table, @@ -294,7 +294,7 @@ export default [ priority: 16, }, { - _key: 'emoji-picker', + key: 'emoji-picker', label: t('text', 'Insert emoji'), icon: Emoticon, component: EmojiPickerAction, @@ -304,14 +304,14 @@ export default [ priority: 4, }, { - _key: 'insert-image', + key: 'insert-image', label: t('text', 'Insert image'), icon: Images, component: ActionImageUpload, priority: 2, }, { - _key: 'formatting-help', + key: 'formatting-help', label: t('text', 'Formatting help'), icon: Help, click: (view) => view.$emit('show-help'), diff --git a/src/components/Menu/utils.js b/src/components/Menu/utils.js index 2b3f85887..6b23db0e7 100644 --- a/src/components/Menu/utils.js +++ b/src/components/Menu/utils.js @@ -29,7 +29,7 @@ const translations = { const getEntryClasses = (actionEntry, isActive) => { return { 'is-active': isActive, - [`action-menu-${actionEntry._key}`]: true, + [`action-menu-${actionEntry.key}`]: true, } } |