aboutsummaryrefslogtreecommitdiff
path: root/src/components/extra_buttons
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2022-07-31 17:57:32 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2022-07-31 17:57:32 +0000
commit33ad712852088f8b99a82ec561733d41d63b0034 (patch)
tree75eea24b29b4204b57e38aec8223e91a1f1526fe /src/components/extra_buttons
parent0b88c56aa674ad19be7e7e883a3687ec89569940 (diff)
parent36aae1635ad370ecf4d22ae6d62cbbba6af19fd3 (diff)
Merge branch 'disjointed-popovers' into 'develop'
Disjointed popovers See merge request pleroma/pleroma-fe!1540
Diffstat (limited to 'src/components/extra_buttons')
-rw-r--r--src/components/extra_buttons/extra_buttons.js3
-rw-r--r--src/components/extra_buttons/extra_buttons.vue50
2 files changed, 29 insertions, 24 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index dd45b6b9..2f534896 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -89,6 +89,9 @@ const ExtraButtons = {
canMute () {
return !!this.currentUser
},
+ canBookmark () {
+ return !!this.currentUser
+ },
statusLink () {
return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}`
}
diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue
index a3c3c767..2ea86201 100644
--- a/src/components/extra_buttons/extra_buttons.vue
+++ b/src/components/extra_buttons/extra_buttons.vue
@@ -51,28 +51,30 @@
icon="thumbtack"
/><span>{{ $t("status.unpin") }}</span>
</button>
- <button
- v-if="!status.bookmarked"
- class="button-default dropdown-item dropdown-item-icon"
- @click.prevent="bookmarkStatus"
- @click="close"
- >
- <FAIcon
- fixed-width
- :icon="['far', 'bookmark']"
- /><span>{{ $t("status.bookmark") }}</span>
- </button>
- <button
- v-if="status.bookmarked"
- class="button-default dropdown-item dropdown-item-icon"
- @click.prevent="unbookmarkStatus"
- @click="close"
- >
- <FAIcon
- fixed-width
- icon="bookmark"
- /><span>{{ $t("status.unbookmark") }}</span>
- </button>
+ <template v-if="canBookmark">
+ <button
+ v-if="!status.bookmarked"
+ class="button-default dropdown-item dropdown-item-icon"
+ @click.prevent="bookmarkStatus"
+ @click="close"
+ >
+ <FAIcon
+ fixed-width
+ :icon="['far', 'bookmark']"
+ /><span>{{ $t("status.bookmark") }}</span>
+ </button>
+ <button
+ v-if="status.bookmarked"
+ class="button-default dropdown-item dropdown-item-icon"
+ @click.prevent="unbookmarkStatus"
+ @click="close"
+ >
+ <FAIcon
+ fixed-width
+ icon="bookmark"
+ /><span>{{ $t("status.unbookmark") }}</span>
+ </button>
+ </template>
<button
v-if="canDelete"
class="button-default dropdown-item dropdown-item-icon"
@@ -119,12 +121,12 @@
</div>
</template>
<template v-slot:trigger>
- <button class="button-unstyled popover-trigger">
+ <span class="button-unstyled popover-trigger">
<FAIcon
class="fa-scale-110 fa-old-padding"
icon="ellipsis-h"
/>
- </button>
+ </span>
</template>
</Popover>
</template>