Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuka Trovic <luka@nextcloud.com>2021-11-24 20:08:36 +0300
committerLuka Trovic <luka@nextcloud.com>2021-11-24 20:08:36 +0300
commitae26b8a1d58d6d877fb0b1c81d438485698dd510 (patch)
tree51eccc813475efce4a10197459d852f12603e0c2 /src
parent99197764302afc6b2bd578de919a873e79cdf3f6 (diff)
add button to remove link
Signed-off-by: Luka Trovic <luka@nextcloud.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/MenuBubble.vue13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/MenuBubble.vue b/src/components/MenuBubble.vue
index 1b85ccd8f..cfddf738f 100644
--- a/src/components/MenuBubble.vue
+++ b/src/components/MenuBubble.vue
@@ -58,6 +58,16 @@
<span class="icon-file" />
<span class="menububble__buttontext">{{ t('text', 'Link file') }}</span>
</button>
+ <button
+ v-if="isActive.link()"
+ class="menububble__button"
+ :class="{ 'is-active': isActive.link() }"
+ @click="removeLinkUrl(commands.link, linkUrl)">
+ <span class="icon-delete" />
+ <span class="menububble__buttontext">
+ {{ t('text', 'Remove Link') }}
+ </span>
+ </button>
</template>
</div>
</EditorMenuBubble>
@@ -142,6 +152,9 @@ export default {
command({ href: url })
this.hideLinkMenu()
},
+ removeLinkUrl(command, url) {
+ command({ href: null })
+ },
bubblePosition(menu) {
// below the first line, above all others
const vertical = menu.top < 45