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