Skip to content

Commit

Permalink
fix: hide menu Link to file for direct editing
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <luka@nextcloud.com>
  • Loading branch information
luka-nextcloud authored and backportbot[bot] committed Aug 30, 2024
1 parent 0a99136 commit 47c9bd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Menu/ActionInsertLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
</template>
{{ t('text', 'Remove link') }}
</NcActionButton>
<NcActionButton ref="buttonFile"
<NcActionButton v-if="!isUsingDirectEditing"
ref="buttonFile"
:data-text-action-entry="`${actionEntry.key}-file`"
@click="linkFile">
<template #icon>
Expand Down Expand Up @@ -67,6 +68,7 @@ import { NcActions, NcActionButton, NcActionInput } from '@nextcloud/vue'
import { getLinkWithPicker } from '@nextcloud/vue/dist/Components/NcRichText.js'
import { FilePickerType, getFilePickerBuilder } from '@nextcloud/dialogs'
import { generateUrl } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'

import { getMarkAttributes, isActive } from '@tiptap/core'

Expand Down Expand Up @@ -99,6 +101,7 @@ export default {
startPath: null,
/** Open state of the actions menu */
menuOpen: false,
isUsingDirectEditing: loadState('text', 'directEditingToken', null) !== null,
}
},
computed: {
Expand Down

0 comments on commit 47c9bd9

Please sign in to comment.