mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
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
2856a8a841
commit
95cbe0fb5a
@ -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 New Issue
Block a user