mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-31 09:35:16 +01:00
Merge pull request #277 from h3poteto/iss-256
closes #256 Show favourites count in toot
This commit is contained in:
commit
07d510ccac
@ -42,6 +42,9 @@
|
|||||||
<el-button type="text" @click="changeFavourite(originalMessage(message))" :class="originalMessage(message).favourited ? 'favourited animated bounceIn' : 'favourite'">
|
<el-button type="text" @click="changeFavourite(originalMessage(message))" :class="originalMessage(message).favourited ? 'favourited animated bounceIn' : 'favourite'">
|
||||||
<icon name="star" scale="0.9"></icon>
|
<icon name="star" scale="0.9"></icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<span class="count">
|
||||||
|
{{ favouritesCount(message) }}
|
||||||
|
</span>
|
||||||
<popper trigger="click" :options="{placement: 'bottom'}">
|
<popper trigger="click" :options="{placement: 'bottom'}">
|
||||||
<div class="popper toot-menu">
|
<div class="popper toot-menu">
|
||||||
<ul class="menu-list">
|
<ul class="menu-list">
|
||||||
@ -215,6 +218,12 @@ export default {
|
|||||||
return this.originalMessage(message).reblogs_count
|
return this.originalMessage(message).reblogs_count
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
},
|
||||||
|
favouritesCount (message) {
|
||||||
|
if (this.originalMessage(message).favourites_count > 0) {
|
||||||
|
return this.originalMessage(message).favourites_count
|
||||||
|
}
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user