feat(frontend): add queue option and enlarge first-level context menu text
The right-click menu now has a plain 'Añadir a la cola' item (appends the track to player.tracks via the new player.addToQueue) alongside the existing playlist submenu, and its first-level text is text-base to match the rest of the menu.
This commit is contained in:
@@ -333,6 +333,14 @@ class PlayerState {
|
||||
this.#loadCurrent();
|
||||
}
|
||||
|
||||
addToQueue(item: QueueItem) {
|
||||
if (this.currentId === null) {
|
||||
this.playQueue([item], 0);
|
||||
return;
|
||||
}
|
||||
this.tracks = [...this.tracks, toTrack(item)];
|
||||
}
|
||||
|
||||
playTrack(id: string | number) {
|
||||
if (this.currentId === id) {
|
||||
this.toggle();
|
||||
|
||||
Reference in New Issue
Block a user