emotes sending on mouse down holding.
This commit is contained in:
parent
4f0819b3f8
commit
8f0115e7b0
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="emotes">
|
||||
<div class="emotes" @mouseleave="stopSendingEmotes" @mouseup="stopSendingEmotes">
|
||||
<ul v-if="!muted">
|
||||
<li v-for="emote in recent" :key="emote">
|
||||
<div @click.stop.prevent="sendEmote(emote)" :class="['emote', emote]" />
|
||||
<div :class="['emote', emote]" @mousedown.stop.prevent="startSendingEmotes(emote)" />
|
||||
</li>
|
||||
<li>
|
||||
<i @click.stop.prevent="open" class="fas fa-grin-beam"></i>
|
||||
@ -171,5 +171,22 @@
|
||||
}
|
||||
this.$accessor.chat.sendEmote(emote)
|
||||
}
|
||||
|
||||
private interval!: number
|
||||
|
||||
startSendingEmotes(emote: string) {
|
||||
this.$accessor.chat.sendEmote(emote)
|
||||
this.stopSendingEmotes()
|
||||
|
||||
this.interval = window.setInterval(() => {
|
||||
this.$accessor.chat.sendEmote(emote)
|
||||
}, 350)
|
||||
}
|
||||
|
||||
stopSendingEmotes() {
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -6,6 +6,7 @@
|
||||
- Lock controls for users, globally.
|
||||
- Ability to set locks from config `NEKO_LOCKS=control login`.
|
||||
- Added control protection - users can gain control only if at least one admin is in the room `NEKO_CONTROL_PROTECTION=true`.
|
||||
- Emotes sending on mouse down holding.
|
||||
|
||||
### Misc
|
||||
- ARM-based images not bound to Raspberry Pi only.
|
||||
|
Reference in New Issue
Block a user