"...src/services/chart/charts/entities/per-user-notes.ts" did not exist on "0e4a111f81cceed275d9bec2695f6e401fb654d8"
Newer
Older
:class="{ reacted: note.myReaction == reaction, canToggle }"
@click="toggleReaction(reaction)"
v-if="count > 0"
@mouseover="onMouseover"
@mouseleave="onMouseleave"
<XReactionIcon :reaction="reaction" :custom-emojis="note.emojis"/>
import XDetails from '@/components/reactions-viewer.details.vue';
import XReactionIcon from '@/components/reaction-icon.vue';
import * as os from '@/os';
props: {
reaction: {
type: String,
required: true,
},
count: {
type: Number,
required: true,
},
isInitial: {
type: Boolean,
required: true,
},
note: {
type: Object,
required: true,
},
},
count(newCount, oldCount) {
if (oldCount < newCount) this.anime();
mounted() {
if (!this.isInitial) this.anime();
},
methods: {
toggleReaction() {
if (!this.canToggle) return;
const oldReaction = this.note.myReaction;
noteId: this.note.id
}).then(() => {
if (oldReaction !== this.reaction) {
noteId: this.note.id,
reaction: this.reaction
});
}
});
} else {
noteId: this.note.id,
reaction: this.reaction
});
}
},
this.detailsTimeoutId = setTimeout(this.openDetails, 300);
},
onMouseleave() {
clearTimeout(this.detailsTimeoutId);
this.closeDetails();
},
openDetails() {
}).then((reactions: any[]) => {
.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime())
const showing = ref(true);
os.popup(XDetails, {
showing,
source: this.$refs.reaction
}, {}, 'closed');
this.close = () => {
showing.value = false;
};
});
},
closeDetails() {
if (this.close != null) {
this.close();
this.close = null;
anime() {
if (document.hidden) return;
display: inline-block;
height: 32px;
margin: 2px;
padding: 0 6px;
border-radius: 4px;