From 270a13c852233103a3e8a171d5766c8a2bb1666e Mon Sep 17 00:00:00 2001 From: NoCrypt <57245077+NoCrypt@users.noreply.github.com> Date: Sat, 10 Aug 2024 00:17:30 +0700 Subject: [PATCH] feat: add a warning when trying to open now playing navigation while there are no anime currently playing --- common/components/Navbar.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/components/Navbar.svelte b/common/components/Navbar.svelte index d1cf97bb..7f80de01 100644 --- a/common/components/Navbar.svelte +++ b/common/components/Navbar.svelte @@ -4,6 +4,7 @@ import { click } from '@/modules/click.js' import IPC from '@/modules/ipc.js' import { rss } from '@/views/TorrentSearch/TorrentModal.svelte' + import { toast } from 'svelte-sonner'; const view = getContext('view') export let page const links = [ @@ -34,6 +35,7 @@ return } if ($media) $view = $media.media + else toast.error('No anime currently playing', {duration: 1300}) $rss = null }, icon: 'queue_music', @@ -82,7 +84,7 @@ {#each links as { click: _click, icon, text, image, css, page: _page }, i (i)} @@ -180,4 +182,7 @@ img { margin-right: var(--sidebar-brand-image-margin-right); } + .opacity-50{ + opacity: 0.5; + }