Skip to content

Commit

Permalink
backport refs #1975 don't show "Link file" button when using direct e…
Browse files Browse the repository at this point in the history
…dition

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
  • Loading branch information
Julien Veyssier committed Dec 7, 2021
1 parent b5b2c07 commit 20ab479
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/MenuBubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{{ t('text', isActive.link() ? 'Update Link' : 'Add Link') }}
</span>
</button>
<button
<button v-if="!isUsingDirectEditing"
class="menububble__button"
:class="{ 'is-active': isActive.link() }"
@click="selectFile(commands.link)">
Expand All @@ -65,6 +65,7 @@
import { EditorMenuBubble } from 'tiptap'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import { optimalPath } from './../helpers/files'
import { loadState } from '@nextcloud/initial-state'

export default {
name: 'MenuBubble',
Expand All @@ -90,6 +91,7 @@ export default {
return {
linkUrl: null,
linkMenuIsActive: false,
isUsingDirectEditing: loadState('text', 'directEditingToken', null) !== null,
}
},
methods: {
Expand Down

0 comments on commit 20ab479

Please sign in to comment.