Hide voice rooms on mobile

This commit is contained in:
mplorentz
2026-03-09 11:19:10 -04:00
parent 7bf240e672
commit 393f85bc82
3 changed files with 10 additions and 14 deletions
+10 -6
View File
@@ -268,7 +268,9 @@
<SpaceMenuRoomItem notify {replaceState} {url} {h} /> <SpaceMenuRoomItem notify {replaceState} {url} {h} />
{/if} {/if}
{#if $roomsWithLivekit.has(h)} {#if $roomsWithLivekit.has(h)}
<VoiceRoomItem {url} {h} /> <div class="hidden md:block">
<VoiceRoomItem {url} {h} />
</div>
{/if} {/if}
{/each} {/each}
{#if $otherRooms.length > 0} {#if $otherRooms.length > 0}
@@ -293,12 +295,14 @@
{/if} {/if}
{/each} {/each}
{#if $otherVoiceRooms.length > 0} {#if $otherVoiceRooms.length > 0}
<div class="h-2"></div> <div class="hidden md:block">
<SecondaryNavHeader>Voice Rooms</SecondaryNavHeader> <div class="h-2"></div>
<SecondaryNavHeader>Voice Rooms</SecondaryNavHeader>
{#each $otherVoiceRooms as h (h)}
<VoiceRoomItem {url} {h} />
{/each}
</div>
{/if} {/if}
{#each $otherVoiceRooms as h (h)}
<VoiceRoomItem {url} {h} />
{/each}
{#if $canCreateRoom} {#if $canCreateRoom}
<SecondaryNavItem {replaceState} onclick={addRoom}> <SecondaryNavItem {replaceState} onclick={addRoom}>
<Icon icon={AddCircle} /> <Icon icon={AddCircle} />
-5
View File
@@ -5,7 +5,6 @@
import VolumeLoud from "@assets/icons/volume-loud.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 SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte" import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte"
import {isMobileViewport} from "@lib/html"
import ProfileCircle from "@app/components/ProfileCircle.svelte" import ProfileCircle from "@app/components/ProfileCircle.svelte"
import RoomName from "@app/components/RoomName.svelte" import RoomName from "@app/components/RoomName.svelte"
import {pushToast} from "@app/util/toast" import {pushToast} from "@app/util/toast"
@@ -30,10 +29,6 @@
let joinAbortController: AbortController | undefined let joinAbortController: AbortController | undefined
const handleClick = async () => { const handleClick = async () => {
if (isMobileViewport()) {
pushToast({theme: "error", message: "Voice rooms are not yet supported on mobile."})
return
}
if (isActive) { if (isActive) {
await leaveVoiceRoom() await leaveVoiceRoom()
return return
-3
View File
@@ -80,9 +80,6 @@ export const createScroller = ({
export const isMobile = "ontouchstart" in document.documentElement export const isMobile = "ontouchstart" in document.documentElement
// Remove this when we implement voice rooms on mobile
export const isMobileViewport = () => window.innerWidth <= 768
export const downloadText = (filename: string, text: string) => { export const downloadText = (filename: string, text: string) => {
const blob = new Blob([text], {type: "text/plain"}) const blob = new Blob([text], {type: "text/plain"})
const url = URL.createObjectURL(blob) const url = URL.createObjectURL(blob)