2025-02-04 00:37:14 +00:00
|
|
|
<script lang="ts">
|
2025-03-19 17:30:36 +00:00
|
|
|
import type {Snippet} from "svelte"
|
2026-02-09 16:42:30 +00:00
|
|
|
import {displayRelayUrl} from "@welshman/util"
|
|
|
|
|
import {page} from "$app/stores"
|
|
|
|
|
import {decodeRelay} from "@app/core/state"
|
2025-03-19 17:30:36 +00:00
|
|
|
|
2025-02-04 00:37:14 +00:00
|
|
|
interface Props {
|
2025-03-19 17:30:36 +00:00
|
|
|
icon?: Snippet
|
|
|
|
|
title?: Snippet
|
|
|
|
|
action?: Snippet
|
2025-02-04 00:37:14 +00:00
|
|
|
[key: string]: any
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-04 01:21:46 +00:00
|
|
|
const {...props}: Props = $props()
|
2025-02-04 00:37:14 +00:00
|
|
|
</script>
|
|
|
|
|
|
2025-11-10 21:20:42 +00:00
|
|
|
<div data-component="PageBar" class="cw top-sai fixed z-nav p-2 {props.class}">
|
2026-02-09 16:42:30 +00:00
|
|
|
<div class="rounded-xl bg-base-100 p-4 shadow-md h-20 md:h-12 flex flex-col justify-center">
|
|
|
|
|
<div class="flex items-center justify-between gap-4">
|
|
|
|
|
<div class="ellipsize flex items-center gap-4 whitespace-nowrap">
|
|
|
|
|
{@render props.icon?.()}
|
|
|
|
|
{@render props.title?.()}
|
|
|
|
|
</div>
|
|
|
|
|
{@render props.action?.()}
|
2024-10-09 23:11:23 +00:00
|
|
|
</div>
|
2026-02-09 16:42:30 +00:00
|
|
|
{#if $page.params.relay}
|
|
|
|
|
<div class="text-xs text-primary md:hidden">
|
|
|
|
|
{displayRelayUrl(decodeRelay($page.params.relay))}
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
2024-10-09 23:11:23 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|