chore: show space relay icon in mobile SpaceBar headers

This commit is contained in:
2026-05-25 23:27:07 +05:30
parent 6d27d4ef9c
commit 41b782c2eb
9 changed files with 31 additions and 9 deletions
+7 -1
View File
@@ -7,17 +7,19 @@
import Icon from "@lib/components/Icon.svelte" import Icon from "@lib/components/Icon.svelte"
import Button from "@lib/components/Button.svelte" import Button from "@lib/components/Button.svelte"
import PageBar from "@lib/components/PageBar.svelte" import PageBar from "@lib/components/PageBar.svelte"
import RelayIcon from "@app/components/RelayIcon.svelte"
import {decodeRelay} from "@app/core/state" import {decodeRelay} from "@app/core/state"
import {makeSpacePath} from "@app/util/routes" import {makeSpacePath} from "@app/util/routes"
interface Props { interface Props {
back?: () => unknown back?: () => unknown
leading?: Snippet
title?: Snippet title?: Snippet
action?: Snippet action?: Snippet
[key: string]: any [key: string]: any
} }
const {back = () => goto(makeSpacePath(url)), title, action, ...props}: Props = $props() const {back = () => goto(makeSpacePath(url)), leading, title, action, ...props}: Props = $props()
const url = decodeRelay($page.params.relay!) const url = decodeRelay($page.params.relay!)
</script> </script>
@@ -30,6 +32,10 @@
<div class="ellipsize whitespace-nowrap flex grow items-center justify-between gap-4"> <div class="ellipsize whitespace-nowrap flex grow items-center justify-between gap-4">
<div class="flex flex-col"> <div class="flex flex-col">
<div class="flex gap-2 items-center"> <div class="flex gap-2 items-center">
<RelayIcon {url} size={5} class="rounded-full md:hidden" />
<div class="hidden md:contents">
{@render leading?.()}
</div>
{@render title?.()} {@render title?.()}
</div> </div>
<div class="text-xs text-primary md:hidden"> <div class="text-xs text-primary md:hidden">
+3 -1
View File
@@ -430,8 +430,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<RoomImage {url} {h} /> <RoomImage {url} {h} />
{/snippet}
{#snippet title()}
<RoomName {url} {h} /> <RoomName {url} {h} />
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}
@@ -111,8 +111,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<Icon icon={CalendarMinimalistic} /> <Icon icon={CalendarMinimalistic} />
{/snippet}
{#snippet title()}
<strong>Calendar</strong> <strong>Calendar</strong>
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}
+3 -1
View File
@@ -307,8 +307,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<Icon icon={ChatRound} /> <Icon icon={ChatRound} />
{/snippet}
{#snippet title()}
<strong>Chat</strong> <strong>Chat</strong>
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}
@@ -63,8 +63,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<Icon icon={CaseMinimalistic} /> <Icon icon={CaseMinimalistic} />
{/snippet}
{#snippet title()}
<strong>Classifieds</strong> <strong>Classifieds</strong>
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}
+3 -1
View File
@@ -62,8 +62,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<Icon icon={StarFallMinimalistic} /> <Icon icon={StarFallMinimalistic} />
{/snippet}
{#snippet title()}
<strong>Goals</strong> <strong>Goals</strong>
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}
+3 -1
View File
@@ -62,8 +62,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<Icon icon={PollIcon} /> <Icon icon={PollIcon} />
{/snippet}
{#snippet title()}
<strong>Polls</strong> <strong>Polls</strong>
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}
@@ -211,8 +211,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<Icon icon={History} /> <Icon icon={History} />
{/snippet}
{#snippet title()}
<strong>Recent Activity</strong> <strong>Recent Activity</strong>
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}
@@ -63,8 +63,10 @@
</script> </script>
<SpaceBar> <SpaceBar>
{#snippet title()} {#snippet leading()}
<Icon icon={NotesMinimalistic} /> <Icon icon={NotesMinimalistic} />
{/snippet}
{#snippet title()}
<strong>Threads</strong> <strong>Threads</strong>
{/snippet} {/snippet}
{#snippet action()} {#snippet action()}