Skip to content

Commit

Permalink
fix: Display URL if title is empty
Browse files Browse the repository at this point in the history
fixes #2156

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Jun 6, 2024
1 parent 031ef94 commit 2f129a5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Bookmark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NcPopover popup-role="dialog" :shown="popoverShown">
<template #trigger>
<div @mouseenter="(![routes.FOLDER, routes.HOME].includes($route.name)) && (popoverShown = true)" @mouseleave="popoverShown = false">
<Item :title="bookmark.title || url"
<Item :title="bookmark.title"
:tags="bookmark.tags"
:rename-placeholder="t('bookmarks', 'Enter new title')"
:select-label="t('bookmarks', 'Select bookmark')"
Expand All @@ -33,8 +33,8 @@
</template>
<template #title>
<div class="bookmark__title">
<h3 :title="bookmark.title">
{{ bookmark.title }}
<h3 :title="displayTitle">
{{ displayTitle }}
</h3>
<span v-if="bookmark.description"
v-tooltip="bookmark.description"
Expand Down Expand Up @@ -188,6 +188,9 @@ export default {
url() {
return this.bookmark.url
},
displayTitle() {
return this.bookmark.title || this.bookmark.url
},
isOpen() {
return this.$store.state.sidebar
&& this.$store.state.sidebar.type === 'bookmark'
Expand Down

0 comments on commit 2f129a5

Please sign in to comment.