1
1
<template >
2
2
<div :class =" unreadClass" class =" " >
3
- <div
4
- :class =" isActive"
5
- class =" mx-2 flex h-8 items-center gap-2 rounded-md px-2 opacity-100 hover:cursor-pointer " >
3
+ <div :class =" isActive"
4
+ class =" mx-2 flex h-8 items-center gap-2 rounded-md px-2 opacity-100 hover:cursor-pointer leading-none" >
6
5
<div v-if =" props.channel.type == 'voice'" >
7
- <div ><VolumeChannelIcon class =" fill-gray-500" /></div >
6
+ <div >
7
+ <VolumeChannelIcon class =" fill-gray-500" />
8
+ </div >
8
9
</div >
9
-
10
+
10
11
<div v-else-if =" props.channel.type == 'text'" >
11
- <div >< TextChannelIcon class =" fill-gray-500" /></ div >
12
+ <TextChannelIcon class =" fill-gray-500" />
12
13
</div >
13
- <div
14
- :class =" props.channel.unread ? 'text-white' : ''"
15
- class =" w-[80%] -translate-y-0.5 truncate font-semibold" >
14
+ <div :class =" props.channel.unread ? 'text-white' : ''" class =" truncate font-semibold" >
16
15
{{ props.channel.name }}
17
16
</div >
18
17
</div >
@@ -29,13 +28,13 @@ import { useChannelStore } from "@/store/channelStore";
29
28
const channelStore = useChannelStore ();
30
29
31
30
const isActive = computed (() => {
32
- return ` ${channelStore .group }+${channelStore .name } ` === ` ${props .channel .group }+${props .channel .name } `
33
- ? " bg-gray-700 text-white hover:bg-gray-700"
34
- : " text-gray-500 hover:bg-gray-700 hover:text-gray-400" ;
31
+ return ` ${channelStore .group }+${channelStore .name } ` === ` ${props .channel .group }+${props .channel .name } `
32
+ ? " bg-gray-700 text-white hover:bg-gray-700"
33
+ : " text-gray-500 hover:bg-gray-700 hover:text-gray-400" ;
35
34
});
36
35
let unreadClass =
37
36
props .channel .unread ?
38
- ` before:content-[" "] relative before:absolute before:-translate-y-1/2 before:top-1/2
37
+ ` before:content-[" "] relative before:absolute before:-translate-y-1/2 before:top-1/2
39
38
before:rounded-full before:bg-white before:h-3 before:w-2 before:block before:-translate-x-1
40
39
overflow-hidden before:overflow-auto ` : " " ;
41
40
</script >
0 commit comments