Skip to content

Commit 5fd85ba

Browse files
authored
Merge pull request #29 from shivero/feature/development
align channels with icon
2 parents 279b029 + 2bda31c commit 5fd85ba

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

src/components/Channel.vue

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<template>
22
<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">
65
<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>
89
</div>
9-
10+
1011
<div v-else-if="props.channel.type == 'text'">
11-
<div><TextChannelIcon class="fill-gray-500" /></div>
12+
<TextChannelIcon class="fill-gray-500" />
1213
</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">
1615
{{ props.channel.name }}
1716
</div>
1817
</div>
@@ -29,13 +28,13 @@ import { useChannelStore } from "@/store/channelStore";
2928
const channelStore = useChannelStore();
3029
3130
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";
3534
});
3635
let unreadClass =
3736
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
3938
before:rounded-full before:bg-white before:h-3 before:w-2 before:block before:-translate-x-1
4039
overflow-hidden before:overflow-auto` : "";
4140
</script>

src/components/ChannelHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const muteNotificationOptions = [
8383
</MenuButton>
8484

8585
<MenuItems
86-
class="absolute right-0 top-10 flex w-min max-w-sm flex-col rounded-lg bg-zinc-900 px-2 py-2">
86+
class="absolute z-10 right-0 top-10 flex w-min max-w-sm flex-col rounded-lg bg-zinc-900 px-2 py-2">
8787
<MenuItem class="mb-1">
8888
<span>
8989
<Menu as="div" class="relative" v-slot="{ open }">

0 commit comments

Comments
 (0)