#468 - show pin for own statuses only

This commit is contained in:
dave 2019-04-04 12:56:13 -04:00 committed by taehoon
parent 1aa0e8d7e0
commit e28b19645a
2 changed files with 5 additions and 2 deletions

View file

@ -269,6 +269,9 @@ const Status = {
this.statusFromGlobalRepository.rebloggedBy this.statusFromGlobalRepository.rebloggedBy
) )
return uniqBy(combinedUsers, 'id') return uniqBy(combinedUsers, 'id')
},
ownStatus () {
return this.status.user.id === this.$store.state.users.currentUser.id
} }
}, },
components: { components: {

View file

@ -52,10 +52,10 @@
<a :href="status.external_url" target="_blank" v-if="!status.is_local && !isPreview" class="source_url" title="Source"> <a :href="status.external_url" target="_blank" v-if="!status.is_local && !isPreview" class="source_url" title="Source">
<i class="button-icon icon-link-ext-alt"></i> <i class="button-icon icon-link-ext-alt"></i>
</a> </a>
<div class="button-icon button-action-icon" v-if="!status.pinned" @click.prevent="pinStatus" title="Pin"> <div class="button-icon button-action-icon" v-if="!status.pinned && ownStatus" @click.prevent="pinStatus" title="Pin">
<i class="fa icon-pin"></i> <i class="fa icon-pin"></i>
</div> </div>
<div class="button-icon button-action-icon" v-else @click.prevent="unpinStatus" title="Unpin"> <div class="button-icon button-action-icon" v-if="status.pinned && ownStatus" @click.prevent="unpinStatus" title="Unpin">
<i class="fa icon-cancel"></i> <i class="fa icon-cancel"></i>
</div> </div>
<div class="button-icon button-action-icon" v-if="expandable && !isPreview" @click.prevent="toggleExpanded" title="Expand"> <div class="button-icon button-action-icon" v-if="expandable && !isPreview" @click.prevent="toggleExpanded" title="Expand">