Integrate new PageBar behavior
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if roomType === RoomType.Voice}
|
{#if roomType === RoomType.Voice}
|
||||||
<VoiceRoomItem {url} {h} />
|
<VoiceRoomItem {url} {h} {replaceState} />
|
||||||
{:else}
|
{:else}
|
||||||
<SecondaryNavItem
|
<SecondaryNavItem
|
||||||
href={path}
|
href={path}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
import RoomImage from "@app/components/RoomImage.svelte"
|
import RoomImage from "@app/components/RoomImage.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"
|
||||||
|
import {makeRoomPath} from "@app/util/routes"
|
||||||
import {
|
import {
|
||||||
deriveVoiceParticipants,
|
deriveVoiceParticipants,
|
||||||
joinVoiceRoom,
|
joinVoiceRoom,
|
||||||
@@ -19,9 +20,10 @@
|
|||||||
interface Props {
|
interface Props {
|
||||||
url: string
|
url: string
|
||||||
h: string
|
h: string
|
||||||
|
replaceState?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const {url, h}: Props = $props()
|
const {url, h, replaceState = false}: Props = $props()
|
||||||
|
|
||||||
const participants = deriveVoiceParticipants(url, h)
|
const participants = deriveVoiceParticipants(url, h)
|
||||||
const isActive = $derived($currentVoiceSession?.url === url && $currentVoiceSession?.h === h)
|
const isActive = $derived($currentVoiceSession?.url === url && $currentVoiceSession?.h === h)
|
||||||
@@ -55,6 +57,8 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SecondaryNavItem
|
<SecondaryNavItem
|
||||||
|
href={makeRoomPath(url, h)}
|
||||||
|
{replaceState}
|
||||||
onclick={handleClick}
|
onclick={handleClick}
|
||||||
class={cx("!items-start", isActive && "!bg-base-100 !text-base-content")}>
|
class={cx("!items-start", isActive && "!bg-base-100 !text-base-content")}>
|
||||||
<div class="flex w-full min-w-0 flex-col gap-2">
|
<div class="flex w-full min-w-0 flex-col gap-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user