2024-11-15 22:03:54 +00:00
|
|
|
<script lang="ts">
|
2025-09-10 22:26:39 +00:00
|
|
|
import MenuDots from "@assets/icons/menu-dots.svg?dataurl"
|
2024-11-15 22:03:54 +00:00
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
|
|
|
|
import Button from "@lib/components/Button.svelte"
|
|
|
|
|
import MenuSpace from "@app/components/MenuSpace.svelte"
|
2025-08-21 22:01:31 +00:00
|
|
|
import {notifications} from "@app/util/notifications"
|
|
|
|
|
import {makeSpacePath} from "@app/util/routes"
|
|
|
|
|
import {pushDrawer} from "@app/util/modal"
|
2024-11-15 22:03:54 +00:00
|
|
|
|
2025-02-04 01:21:46 +00:00
|
|
|
const {url} = $props()
|
2024-11-15 22:03:54 +00:00
|
|
|
|
2025-10-06 18:23:19 +00:00
|
|
|
const path = makeSpacePath(url) + ":mobile"
|
2024-11-15 22:03:54 +00:00
|
|
|
|
2024-12-16 19:24:10 +00:00
|
|
|
const openMenu = () => pushDrawer(MenuSpace, {url})
|
2024-11-15 22:03:54 +00:00
|
|
|
</script>
|
|
|
|
|
|
2025-02-04 01:21:46 +00:00
|
|
|
<Button onclick={openMenu} class="btn btn-neutral btn-sm relative md:hidden">
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon icon={MenuDots} />
|
2024-12-16 19:24:10 +00:00
|
|
|
{#if $notifications.has(path)}
|
2025-02-03 23:01:42 +00:00
|
|
|
<div class="absolute right-0 top-0 -mr-1 -mt-1 h-2 w-2 rounded-full bg-primary"></div>
|
2024-11-15 22:03:54 +00:00
|
|
|
{/if}
|
|
|
|
|
</Button>
|