Hide voice rooms on mobile

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