feat: add username modes

This adds username modes on both the chat message and the user list for to allow css styling.
This commit is contained in:
snowfudge 2024-02-07 13:47:03 +07:00
parent a8be84028c
commit 6a2e7c2ab8

View file

@ -1,6 +1,11 @@
<template>
<span
:class="['user', {[nickColor]: store.state.settings.coloredNicks}, {active: active}]"
:class="[
'user ',
{[nickColor]: store.state.settings.coloredNicks},
{active: active},
[mode ? userModes[mode] : ''],
]"
:data-name="user.nick"
role="button"
v-on="onHover ? {mouseenter: hover} : {}"
@ -72,7 +77,18 @@ export default defineComponent({
const store = useStore();
const userModes = {
"~": "owner",
"&": "admin",
"!": "admin",
"@": "op",
"%": "half-op",
"+": "voice",
"": "normal",
};
return {
userModes,
mode,
nickColor,
hover,