mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-13 13:00:34 +00:00
feat: add a warning when trying to open now playing navigation
while there are no anime currently playing
This commit is contained in:
parent
7ab159462b
commit
270a13c852
1 changed files with 6 additions and 1 deletions
|
|
@ -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 @@
|
|||
<div
|
||||
class='navbar-link navbar-link-with-icon pointer overflow-hidden mx-auto'
|
||||
use:click={close}>
|
||||
<span class='material-symbols-outlined rounded'>home</span>
|
||||
<span class='material-symbols-outlined rounded' class:filled={page === 'home'}>home</span>
|
||||
</div>
|
||||
|
||||
{#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;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue