don't show bookmark button for anon visitors
This commit is contained in:
parent
3d4d694b49
commit
e6ed00ea1c
|
@ -89,6 +89,9 @@ const ExtraButtons = {
|
||||||
canMute () {
|
canMute () {
|
||||||
return !!this.currentUser
|
return !!this.currentUser
|
||||||
},
|
},
|
||||||
|
canBookmark () {
|
||||||
|
return !!this.currentUser
|
||||||
|
},
|
||||||
statusLink () {
|
statusLink () {
|
||||||
return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}`
|
return `${this.$store.state.instance.server}${this.$router.resolve({ name: 'conversation', params: { id: this.status.id } }).href}`
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,28 +51,30 @@
|
||||||
icon="thumbtack"
|
icon="thumbtack"
|
||||||
/><span>{{ $t("status.unpin") }}</span>
|
/><span>{{ $t("status.unpin") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<template v-if="canBookmark">
|
||||||
v-if="!status.bookmarked"
|
<button
|
||||||
class="button-default dropdown-item dropdown-item-icon"
|
v-if="!status.bookmarked"
|
||||||
@click.prevent="bookmarkStatus"
|
class="button-default dropdown-item dropdown-item-icon"
|
||||||
@click="close"
|
@click.prevent="bookmarkStatus"
|
||||||
>
|
@click="close"
|
||||||
<FAIcon
|
>
|
||||||
fixed-width
|
<FAIcon
|
||||||
:icon="['far', 'bookmark']"
|
fixed-width
|
||||||
/><span>{{ $t("status.bookmark") }}</span>
|
:icon="['far', 'bookmark']"
|
||||||
</button>
|
/><span>{{ $t("status.bookmark") }}</span>
|
||||||
<button
|
</button>
|
||||||
v-if="status.bookmarked"
|
<button
|
||||||
class="button-default dropdown-item dropdown-item-icon"
|
v-if="status.bookmarked"
|
||||||
@click.prevent="unbookmarkStatus"
|
class="button-default dropdown-item dropdown-item-icon"
|
||||||
@click="close"
|
@click.prevent="unbookmarkStatus"
|
||||||
>
|
@click="close"
|
||||||
<FAIcon
|
>
|
||||||
fixed-width
|
<FAIcon
|
||||||
icon="bookmark"
|
fixed-width
|
||||||
/><span>{{ $t("status.unbookmark") }}</span>
|
icon="bookmark"
|
||||||
</button>
|
/><span>{{ $t("status.unbookmark") }}</span>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
<button
|
<button
|
||||||
v-if="canDelete"
|
v-if="canDelete"
|
||||||
class="button-default dropdown-item dropdown-item-icon"
|
class="button-default dropdown-item dropdown-item-icon"
|
||||||
|
|
Loading…
Reference in New Issue