2024-11-14 18:53:13 +00:00
|
|
|
<script lang="ts">
|
2026-04-06 16:08:02 +00:00
|
|
|
import {deriveRelayDisplay} from "@welshman/app"
|
2024-11-14 18:53:13 +00:00
|
|
|
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
|
2025-11-11 21:39:32 +00:00
|
|
|
import RelayIcon from "@app/components/RelayIcon.svelte"
|
2025-11-05 00:14:32 +00:00
|
|
|
import {makeSpacePath, goToSpace} from "@app/util/routes"
|
2025-08-21 22:01:31 +00:00
|
|
|
import {notifications} from "@app/util/notifications"
|
2024-11-14 18:53:13 +00:00
|
|
|
|
2025-11-14 23:02:23 +00:00
|
|
|
type Props = {
|
|
|
|
|
url: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {url}: Props = $props()
|
2024-11-14 18:53:13 +00:00
|
|
|
|
2025-11-05 00:14:32 +00:00
|
|
|
const onClick = () => goToSpace(url)
|
2026-04-06 16:08:02 +00:00
|
|
|
|
|
|
|
|
const display = $derived(deriveRelayDisplay(url))
|
2024-11-14 18:53:13 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<PrimaryNavItem
|
2025-10-06 18:23:19 +00:00
|
|
|
onclick={onClick}
|
2026-04-06 16:08:02 +00:00
|
|
|
title={$display}
|
2024-11-14 18:53:13 +00:00
|
|
|
class="tooltip-right"
|
2025-11-05 00:14:32 +00:00
|
|
|
notification={$notifications.has(makeSpacePath(url))}>
|
2026-01-16 19:33:03 +00:00
|
|
|
<RelayIcon {url} size={10} class="rounded-full" />
|
2024-11-14 18:53:13 +00:00
|
|
|
</PrimaryNavItem>
|