feat(quick-4): add 'Set as Default Playlist' context menu option
- Add 'set-default' case in onPlaylistContextAction handler - Add wa-dropdown-item with star icon in single-select guard block - Option only appears when right-clicking a single playlist
This commit is contained in:
@@ -1731,6 +1731,16 @@ export class PlaylistView
|
||||
},
|
||||
);
|
||||
break;
|
||||
case 'set-default':
|
||||
void this.favCtrl
|
||||
.setDefaultPlaylist(entry.summary.ID)
|
||||
.catch((err: unknown) => {
|
||||
console.error(
|
||||
'Failed to set default playlist:',
|
||||
err,
|
||||
);
|
||||
});
|
||||
break;
|
||||
case 'delete': {
|
||||
if (this.selectedPlaylists.size > 1) {
|
||||
const ids = [...this.selectedPlaylists]
|
||||
@@ -2352,6 +2362,18 @@ export class PlaylistView
|
||||
></wa-icon>
|
||||
Rename
|
||||
</wa-dropdown-item>
|
||||
<wa-dropdown-item
|
||||
@click=${() =>
|
||||
void this.onPlaylistContextAction(
|
||||
'set-default',
|
||||
)}
|
||||
>
|
||||
<wa-icon
|
||||
slot="icon"
|
||||
name="star"
|
||||
></wa-icon>
|
||||
Set as Default Playlist
|
||||
</wa-dropdown-item>
|
||||
`
|
||||
: nothing}
|
||||
<wa-dropdown-item
|
||||
|
||||
Reference in New Issue
Block a user