mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-03 14:22:19 +02:00
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:
parent
a8be84028c
commit
6a2e7c2ab8
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue