1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-31 01:27:26 +01:00

Merge pull request #277 from h3poteto/iss-256

closes #256 Show favourites count in toot
This commit is contained in:
AkiraFukushima 2018-04-29 10:22:10 +09:00 committed by GitHub
commit 07d510ccac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,9 @@
<el-button type="text" @click="changeFavourite(originalMessage(message))" :class="originalMessage(message).favourited ? 'favourited animated bounceIn' : 'favourite'">
<icon name="star" scale="0.9"></icon>
</el-button>
<span class="count">
{{ favouritesCount(message) }}
</span>
<popper trigger="click" :options="{placement: 'bottom'}">
<div class="popper toot-menu">
<ul class="menu-list">
@ -215,6 +218,12 @@ export default {
return this.originalMessage(message).reblogs_count
}
return ''
},
favouritesCount (message) {
if (this.originalMessage(message).favourites_count > 0) {
return this.originalMessage(message).favourites_count
}
return ''
}
}
}