forked from AkkomaGang/akkoma-fe
#468 - shwo pin button for valid statuses (public & unlisted)
This commit is contained in:
parent
9fc997500e
commit
075ddc34f1
2 changed files with 5 additions and 2 deletions
|
@ -44,6 +44,9 @@ const ExtraButtons = {
|
||||||
},
|
},
|
||||||
ownStatus () {
|
ownStatus () {
|
||||||
return this.status.user.id === this.currentUser.id
|
return this.status.user.id === this.currentUser.id
|
||||||
|
},
|
||||||
|
canPin () {
|
||||||
|
return this.ownStatus && (this.status.visibility === 'public' || this.status.visibility === 'unlisted')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
>
|
>
|
||||||
<div class="popper-wrapper">
|
<div class="popper-wrapper">
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<button class="dropdown-item dropdown-item-icon" @click.prevent="pinStatus" v-if="!status.pinned && ownStatus">
|
<button class="dropdown-item dropdown-item-icon" @click.prevent="pinStatus" v-if="!status.pinned && canPin">
|
||||||
<i class="icon-pin"></i><span>{{$t("status.pin")}}</span>
|
<i class="icon-pin"></i><span>{{$t("status.pin")}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item dropdown-item-icon" @click.prevent="unpinStatus" v-if="status.pinned && ownStatus">
|
<button class="dropdown-item dropdown-item-icon" @click.prevent="unpinStatus" v-if="status.pinned && canPin">
|
||||||
<i class="icon-pin"></i><span>{{$t("status.unpin")}}</span>
|
<i class="icon-pin"></i><span>{{$t("status.unpin")}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="dropdown-item dropdown-item-icon" @click.prevent="deleteStatus" v-if="canDelete">
|
<button class="dropdown-item dropdown-item-icon" @click.prevent="deleteStatus" v-if="canDelete">
|
||||||
|
|
Loading…
Reference in a new issue