Allow clicking voice widget to go back to call
This commit is contained in:
@@ -76,6 +76,14 @@
|
|||||||
pushModal(VoiceRoomJoinDialog, {url: targetRoom.url, h: targetRoom.h})
|
pushModal(VoiceRoomJoinDialog, {url: targetRoom.url, h: targetRoom.h})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const goToRoom = () => {
|
||||||
|
if (!targetRoom) return
|
||||||
|
const path = makeRoomPath(targetRoom.url, targetRoom.h)
|
||||||
|
if ($page.url.pathname !== path) {
|
||||||
|
void goto(path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const openCallSettings = () => {
|
const openCallSettings = () => {
|
||||||
pushModal(VoiceCallAudioSettingsDialog)
|
pushModal(VoiceCallAudioSettingsDialog)
|
||||||
}
|
}
|
||||||
@@ -138,27 +146,33 @@
|
|||||||
in:fly={{y: 60, duration: 350}}
|
in:fly={{y: 60, duration: 350}}
|
||||||
out:fly={{y: 60, duration: 250}}
|
out:fly={{y: 60, duration: 250}}
|
||||||
class="flex flex-col gap-2 rounded-box bg-base-100 p-3">
|
class="flex flex-col gap-2 rounded-box bg-base-100 p-3">
|
||||||
<div class="flex flex-col gap-0.5">
|
<div class="flex items-start justify-between gap-2">
|
||||||
<div class="flex items-center justify-between gap-2">
|
<button
|
||||||
{#if $voiceState === VoiceState.Joining}
|
type="button"
|
||||||
<span class="text-sm font-semibold text-warning">Joining...</span>
|
class="min-w-0 flex-1 rounded-lg px-1 py-0.5 text-left outline-none hover:bg-base-200/60 focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-base-100"
|
||||||
{:else if $voiceState === VoiceState.Connected}
|
onclick={goToRoom}
|
||||||
<span class="text-sm font-semibold text-success">Voice Connected</span>
|
aria-label="Open room {roomName}">
|
||||||
{:else}
|
<div class="flex flex-col gap-0.5">
|
||||||
<span class="text-sm font-semibold text-neutral-content">Disconnected</span>
|
{#if $voiceState === VoiceState.Joining}
|
||||||
{/if}
|
<span class="text-sm font-semibold text-warning">Joining...</span>
|
||||||
{#if showVoiceLayoutToggle}
|
{:else if $voiceState === VoiceState.Connected}
|
||||||
<Button
|
<span class="text-sm font-semibold text-success">Voice Connected</span>
|
||||||
data-tip="Toggle full-screen chat ↔ video (mobile) or split view (desktop)"
|
{:else}
|
||||||
class={cx(mediaToggleClass, "shrink-0", layoutToggleActive && "text-primary")}
|
<span class="text-sm font-semibold text-neutral-content">Disconnected</span>
|
||||||
onclick={onLayoutToggle}>
|
{/if}
|
||||||
<Icon icon={ChatRound} size={4} />
|
<span class="ellipsize text-xs opacity-70">
|
||||||
</Button>
|
{roomName} / {spaceName}
|
||||||
{/if}
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="ellipsize text-xs opacity-70">
|
</button>
|
||||||
{roomName} / {spaceName}
|
{#if showVoiceLayoutToggle}
|
||||||
</span>
|
<Button
|
||||||
|
data-tip="Toggle full-screen chat ↔ video (mobile) or split view (desktop)"
|
||||||
|
class={cx(mediaToggleClass, "shrink-0", layoutToggleActive && "text-primary")}
|
||||||
|
onclick={onLayoutToggle}>
|
||||||
|
<Icon icon={ChatRound} size={4} />
|
||||||
|
</Button>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap items-center gap-2">
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
{#if $voiceState === VoiceState.Joining}
|
{#if $voiceState === VoiceState.Joining}
|
||||||
|
|||||||
Reference in New Issue
Block a user