fix(playlists): buttons in list view also trigger goto
This commit is contained in:
@@ -2,9 +2,7 @@
|
|||||||
import type { Track } from '$lib/proto/library';
|
import type { Track } from '$lib/proto/library';
|
||||||
import { Button } from '$lib/components/ui/button';
|
import { Button } from '$lib/components/ui/button';
|
||||||
import Trash2 from 'virtual:icons/lucide/trash-2';
|
import Trash2 from 'virtual:icons/lucide/trash-2';
|
||||||
import { enhance } from '$app/forms';
|
|
||||||
import Play from 'virtual:icons/lucide/play';
|
import Play from 'virtual:icons/lucide/play';
|
||||||
import type { SubmitFunction } from '../../../routes/playlists/[id]/$types';
|
|
||||||
import { getLibraryState } from '$lib/library.svelte';
|
import { getLibraryState } from '$lib/library.svelte';
|
||||||
import { getPlayerState } from '$lib/player.svelte';
|
import { getPlayerState } from '$lib/player.svelte';
|
||||||
import PlaylistCover from './PlaylistCover.svelte';
|
import PlaylistCover from './PlaylistCover.svelte';
|
||||||
@@ -54,7 +52,10 @@
|
|||||||
type="submit"
|
type="submit"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="icon"
|
size="icon"
|
||||||
onclick={() => player.playPlaylist(id, fetch)}
|
onclick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
player.playPlaylist(id, fetch);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Play />
|
<Play />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -63,7 +64,10 @@
|
|||||||
type="submit"
|
type="submit"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="icon"
|
size="icon"
|
||||||
onclick={() => library.deletePlaylist(id, fetch)}
|
onclick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
library.deletePlaylist(id, fetch);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Trash2 />
|
<Trash2 />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user