forked from FoundKeyGang/FoundKey
Only show ellipsis if the button's interactable (#6373)
* Add an indicator to make the undo renote button look more interactable * Use faEllipsisH :art * Only show elipsis if it's interactable * Update note.vue Co-authored-by: DW <chocological00@gitlab.com> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
3ac3a45aa5
commit
9c8eb93446
1 changed files with 6 additions and 2 deletions
|
@ -22,7 +22,7 @@
|
|||
</i18n>
|
||||
<div class="info">
|
||||
<button class="_button time" @click="showRenoteMenu()" ref="renoteTime">
|
||||
<fa class="dropdownIcon" :icon="faEllipsisH"/>
|
||||
<fa class="dropdownIcon" v-if="isMyRenote" :icon="faEllipsisH"/>
|
||||
<mk-time :time="note.createdAt"/>
|
||||
</button>
|
||||
<span class="visibility" v-if="note.visibility !== 'public'">
|
||||
|
@ -196,6 +196,10 @@ export default Vue.extend({
|
|||
return this.$store.getters.isSignedIn && (this.$store.state.i.id === this.appearNote.userId);
|
||||
},
|
||||
|
||||
isMyRenote(): boolean {
|
||||
return this.$store.getters.isSignedIn && (this.$store.state.i.id === this.note.userId);
|
||||
},
|
||||
|
||||
canRenote(): boolean {
|
||||
return ['public', 'home'].includes(this.appearNote.visibility) || this.isMyNote;
|
||||
},
|
||||
|
@ -617,7 +621,7 @@ export default Vue.extend({
|
|||
},
|
||||
|
||||
showRenoteMenu(viaKeyboard = false) {
|
||||
if (!this.$store.getters.isSignedIn || (this.$store.state.i.id !== this.note.userId)) return;
|
||||
if (!this.isMyRenote) return;
|
||||
this.$root.menu({
|
||||
items: [{
|
||||
text: this.$t('unrenote'),
|
||||
|
|
Loading…
Reference in a new issue