Fix room icon
This commit is contained in:
@@ -1,11 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Hashtag from "@assets/icons/hashtag.svg?dataurl"
|
import Hashtag from "@assets/icons/hashtag.svg?dataurl"
|
||||||
import Volume from "@assets/icons/volume.svg?dataurl"
|
import Volume from "@assets/icons/volume.svg?dataurl"
|
||||||
import VolumeLoud from "@assets/icons/volume-loud.svg?dataurl"
|
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
import ImageIcon from "@lib/components/ImageIcon.svelte"
|
import ImageIcon from "@lib/components/ImageIcon.svelte"
|
||||||
import {deriveRoom} from "@app/core/state"
|
import {deriveRoom} from "@app/core/state"
|
||||||
import {currentVoiceSession} from "@app/voice"
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
h: string
|
h: string
|
||||||
@@ -18,17 +16,11 @@
|
|||||||
|
|
||||||
const room = deriveRoom(url, h)
|
const room = deriveRoom(url, h)
|
||||||
const isVoiceRoom = $derived($room.livekit)
|
const isVoiceRoom = $derived($room.livekit)
|
||||||
const isVoiceRoomActive = $derived(
|
|
||||||
$currentVoiceSession?.url === url && $currentVoiceSession?.h === h,
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if isVoiceRoom}
|
{#if isVoiceRoom}
|
||||||
<div class="flex shrink-0 items-center gap-1.5">
|
<div class="flex shrink-0 items-center gap-1.5">
|
||||||
<Icon
|
<Icon size={size + 1} icon={Volume} />
|
||||||
size={size + 1}
|
|
||||||
icon={isVoiceRoomActive ? VolumeLoud : Volume}
|
|
||||||
class={isVoiceRoomActive ? "text-primary -translate-x-0.5" : ""} />
|
|
||||||
{#if $room.picture}
|
{#if $room.picture}
|
||||||
<span class="text-base">/</span>
|
<span class="text-base">/</span>
|
||||||
<ImageIcon src={$room.picture} {size} alt="" class="rounded-lg" />
|
<ImageIcon src={$room.picture} {size} alt="" class="rounded-lg" />
|
||||||
|
|||||||
@@ -363,10 +363,8 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SpaceBar>
|
<SpaceBar>
|
||||||
{#snippet icon()}
|
|
||||||
<RoomImage {url} {h} />
|
|
||||||
{/snippet}
|
|
||||||
{#snippet title()}
|
{#snippet title()}
|
||||||
|
<RoomImage {url} {h} />
|
||||||
<RoomName {url} {h} />
|
<RoomName {url} {h} />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet action()}
|
{#snippet action()}
|
||||||
|
|||||||
Reference in New Issue
Block a user