Design Prot Merge #1
@@ -380,46 +380,50 @@
|
|||||||
<ChevronRight class="h-4 w-4 shrink-0 text-neutral-500" />
|
<ChevronRight class="h-4 w-4 shrink-0 text-neutral-500" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="invisible absolute top-0 z-50 w-56 rounded-2xl border border-white/10 bg-neutral-900 p-1.5 opacity-0 shadow-[0_12px_28px_-10px_rgba(0,0,0,0.8)] transition group-hover/addmenu:visible group-hover/addmenu:opacity-100 {contextMenu.openLeft
|
class="invisible absolute top-0 z-50 opacity-0 transition group-hover/addmenu:visible group-hover/addmenu:opacity-100 {contextMenu.openLeft
|
||||||
? 'right-full mr-1'
|
? 'right-full pr-1'
|
||||||
: 'left-full ml-1'}"
|
: 'left-full pl-1'}"
|
||||||
>
|
>
|
||||||
<div class="max-h-72 overflow-y-auto">
|
<div
|
||||||
{#each data.playlists as playlist (playlist.id)}
|
class="w-56 rounded-2xl border border-white/10 bg-neutral-900 p-1.5 shadow-[0_12px_28px_-10px_rgba(0,0,0,0.8)]"
|
||||||
<form
|
>
|
||||||
method="POST"
|
<div class="max-h-72 overflow-y-auto">
|
||||||
action={contextMenu.kind === 'youtube' ? '?/addYouTubeToPlaylist' : '?/addTrack'}
|
{#each data.playlists as playlist (playlist.id)}
|
||||||
use:enhance={() =>
|
<form
|
||||||
({ update }) => {
|
method="POST"
|
||||||
closeContextMenu();
|
action={contextMenu.kind === 'youtube' ? '?/addYouTubeToPlaylist' : '?/addTrack'}
|
||||||
return update({ reset: false });
|
use:enhance={() =>
|
||||||
}}
|
({ update }) => {
|
||||||
>
|
closeContextMenu();
|
||||||
<input type="hidden" name="playlistId" value={playlist.id} />
|
return update({ reset: false });
|
||||||
{#if contextMenu.kind === 'youtube'}
|
}}
|
||||||
<input type="hidden" name="videoId" value={contextMenu.song.videoId} />
|
|
||||||
<input type="hidden" name="title" value={contextMenu.song.title} />
|
|
||||||
<input type="hidden" name="artist" value={contextMenu.song.artist} />
|
|
||||||
<input type="hidden" name="durationSeconds" value={contextMenu.song.durationSeconds} />
|
|
||||||
<input type="hidden" name="thumbnailUrl" value={contextMenu.song.thumbnailUrl} />
|
|
||||||
{:else}
|
|
||||||
<input type="hidden" name="trackId" value={contextMenu.track.id} />
|
|
||||||
{/if}
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
class="flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-sm text-neutral-200 transition hover:bg-white/5"
|
|
||||||
>
|
>
|
||||||
<PlaylistArt
|
<input type="hidden" name="playlistId" value={playlist.id} />
|
||||||
playlistId={playlist.id}
|
{#if contextMenu.kind === 'youtube'}
|
||||||
trackIds={[]}
|
<input type="hidden" name="videoId" value={contextMenu.song.videoId} />
|
||||||
hue={hueFor(playlist.id)}
|
<input type="hidden" name="title" value={contextMenu.song.title} />
|
||||||
size="small"
|
<input type="hidden" name="artist" value={contextMenu.song.artist} />
|
||||||
class="h-8 w-8 flex-shrink-0 rounded-lg"
|
<input type="hidden" name="durationSeconds" value={contextMenu.song.durationSeconds} />
|
||||||
/>
|
<input type="hidden" name="thumbnailUrl" value={contextMenu.song.thumbnailUrl} />
|
||||||
<span class="truncate">{playlist.name}</span>
|
{:else}
|
||||||
</button>
|
<input type="hidden" name="trackId" value={contextMenu.track.id} />
|
||||||
</form>
|
{/if}
|
||||||
{/each}
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-sm text-neutral-200 transition hover:bg-white/5"
|
||||||
|
>
|
||||||
|
<PlaylistArt
|
||||||
|
playlistId={playlist.id}
|
||||||
|
trackIds={[]}
|
||||||
|
hue={hueFor(playlist.id)}
|
||||||
|
size="small"
|
||||||
|
class="h-8 w-8 flex-shrink-0 rounded-lg"
|
||||||
|
/>
|
||||||
|
<span class="truncate">{playlist.name}</span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user