chore: show space relay icon in mobile topbar headers (#283)

Co-authored-by: userAdityaa <aditya.chaudhary1558@gmail.com>
Co-committed-by: userAdityaa <aditya.chaudhary1558@gmail.com>
This commit was merged in pull request #283.
This commit is contained in:
2026-05-25 19:18:51 +00:00
committed by hodlbod
parent 45df132dc6
commit 6dbe9c0ebb
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 Button from "@lib/components/Button.svelte"
import PageBar from "@lib/components/PageBar.svelte"
import RelayIcon from "@app/components/RelayIcon.svelte"
import {decodeRelay} from "@app/core/state"
import {makeSpacePath} from "@app/util/routes"
interface Props {
back?: () => unknown
leading?: Snippet
title?: Snippet
action?: Snippet
[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!)
</script>
@@ -30,6 +32,10 @@
<div class="ellipsize whitespace-nowrap flex grow items-center justify-between gap-4">
<div class="flex flex-col">
<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?.()}
</div>
<div class="text-xs text-primary md:hidden">