Archived
2
0
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
neko-custom/client/src/components/emotes.vue

77 lines
1.8 KiB
Vue
Raw Normal View History

2020-01-23 06:16:40 +13:00
<template>
2020-01-24 04:23:26 +13:00
<div class="emotes">
<ul v-if="!muted">
2020-01-24 05:54:32 +13:00
<li><div @click.stop.prevent="click('heart')" class="heart" /></li>
<li><div @click.stop.prevent="click('sleep')" class="sleep" /></li>
<li><div @click.stop.prevent="click('laughing')" class="laughing" /></li>
<li><div @click.stop.prevent="click('celebrate')" class="celebrate" /></li>
<li><div @click.stop.prevent="click('exclam')" class="exclam" /></li>
<li><div @click.stop.prevent="click('clap')" class="clap" /></li>
2020-01-23 06:16:40 +13:00
</ul>
</div>
</template>
<style lang="scss" scoped>
2020-01-24 04:23:26 +13:00
.emotes {
2020-01-23 06:16:40 +13:00
ul {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
li {
font-size: 24px;
margin: 0 5px;
2020-01-24 05:54:32 +13:00
div {
width: 24px;
height: 24px;
2020-01-23 06:16:40 +13:00
cursor: pointer;
2020-01-24 05:54:32 +13:00
background-size: contain;
&.celebrate {
background-image: url('../assets/celebrate.png');
}
&.clap {
background-image: url('../assets/clap.png');
}
&.exclam {
background-image: url('../assets/exclam.png');
}
&.heart {
background-image: url('../assets/heart.png');
}
&.laughing {
background-image: url('../assets/laughing.png');
}
&.sleep {
background-image: url('../assets/sleep.png');
}
2020-01-23 06:16:40 +13:00
}
}
}
}
</style>
<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
@Component({
2020-01-24 04:23:26 +13:00
name: 'neko-emotes',
2020-01-23 06:16:40 +13:00
})
export default class extends Vue {
2020-01-24 04:23:26 +13:00
get muted() {
return this.$accessor.user.muted
}
click(emote: string) {
this.$accessor.chat.sendEmote(emote)
2020-01-23 06:16:40 +13:00
}
}
</script>