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