summaryrefslogtreecommitdiff
path: root/ui/lib/components/Channel.svelte
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-23 21:52:24 -0400
committerKit La Touche <kit@transneptune.net>2024-10-23 21:52:24 -0400
commit8f360dd9cc45bb14431238ccc5e3d137c020fa7b (patch)
treefcb65190ba06932cdba79b91513e74155aaa912e /ui/lib/components/Channel.svelte
parent56e16e29db55dae84549229d24b971f8bcf7da21 (diff)
Do a big mobile app design thing
Mobile-friendly anyway. Thanks to [Miriam](https://www.miriamsuzanne.com/) for the CSS that enables a sliding menu on mobile size, constant menu on larger.
Diffstat (limited to 'ui/lib/components/Channel.svelte')
-rw-r--r--ui/lib/components/Channel.svelte8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/lib/components/Channel.svelte b/ui/lib/components/Channel.svelte
index e62f0f3..bbe9ff7 100644
--- a/ui/lib/components/Channel.svelte
+++ b/ui/lib/components/Channel.svelte
@@ -1,14 +1,20 @@
<script>
+ import { showMenu } from '$lib/store';
+
export let id;
export let name;
export let active = false;
+
+ function hideMenu() {
+ showMenu.update(() => false);
+ }
</script>
<li
class="rounded-full"
class:bg-slate-400={active}
>
-<a href="/ch/{id}">
+<a href="/ch/{id}" on:click={hideMenu}>
<span class="badge bg-primary-500">#</span>
<span class="flex-auto">{name}</span>
</a>