Change computed to isMyMessage in toot
This commit is contained in:
parent
58db5c1b25
commit
1b2a3f725a
|
@ -115,10 +115,10 @@
|
|||
<li role="button" @click="block()">
|
||||
{{ $t('cards.toot.block') }}
|
||||
</li>
|
||||
<li role="button" @click="reportUser()" v-if="!isMyMessage()">
|
||||
<li role="button" @click="reportUser()" v-if="!isMyMessage">
|
||||
{{ $t('cards.toot.report') }}
|
||||
</li>
|
||||
<li role="button" class="separate" @click="deleteToot(message)" v-if="isMyMessage()">
|
||||
<li role="button" class="separate" @click="deleteToot(message)" v-if="isMyMessage">
|
||||
{{ $t('cards.toot.delete') }}
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -220,6 +220,9 @@ export default {
|
|||
return this.originalMessage.favourites_count
|
||||
}
|
||||
return ''
|
||||
},
|
||||
isMyMessage: function () {
|
||||
return this.$store.state.TimelineSpace.account.accountId === this.originalMessage.account.id
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
@ -410,9 +413,6 @@ export default {
|
|||
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
|
||||
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
|
||||
},
|
||||
isMyMessage () {
|
||||
return this.$store.state.TimelineSpace.account.accountId === this.originalMessage.account.id
|
||||
},
|
||||
deleteToot (message) {
|
||||
this.$store.dispatch('molecules/Toot/deleteToot', message)
|
||||
.then((message) => {
|
||||
|
|
Loading…
Reference in New Issue