a simple web player for subsonic tinysub.devins.page
subsonic navidrome javascript
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: make "clear" consistent

intergrav ce937768 ec797d6a

+9 -9
+1 -1
src/js/constants.js
··· 18 18 QUEUE_PLAY_NEXT: "queue-play-next", 19 19 QUEUE_MOVE_UP: "queue-move-up", 20 20 QUEUE_MOVE_DOWN: "queue-move-down", 21 - QUEUE_REMOVE: "queue-remove", 21 + QUEUE_CLEAR: "queue-clear", 22 22 QUEUE_COVER: "queue-cover", 23 23 FAVORITED: "favorited", 24 24 ERROR: "error",
+1 -1
src/js/contextmenu.js
··· 104 104 ); 105 105 } 106 106 }, 107 - Delete: removeSelectedRows, 107 + Clear: clearSelectedRows, 108 108 }); 109 109 }); 110 110
+3 -3
src/js/events.js
··· 56 56 moveQueueItems(state.queue, [idx], idx + 2, queueCallbacks); 57 57 } 58 58 }, 59 - // remove from queue 60 - [CLASSES.QUEUE_REMOVE]: (idx) => { 59 + // clear from queue 60 + [CLASSES.QUEUE_CLEAR]: (idx) => { 61 61 state.queue.splice(idx, 1); 62 62 updateQueue(); 63 63 }, ··· 127 127 selected[0], 128 128 state.queue.length - selected.length - 1, 129 129 ); 130 - removeSelectedRows(); 130 + clearSelectedRows(); 131 131 if (nextIdx >= 0 && state.queue.length > 0) { 132 132 selectionManager.select(nextIdx); 133 133 }
+4 -4
src/js/queue.js
··· 251 251 handleVirtualScroll(true); 252 252 } 253 253 254 - // remove all selected rows with smart index adjustment 255 - function removeSelectedRows() { 254 + // clear selected rows 255 + function clearSelectedRows() { 256 256 const toRemove = getSelectedIndices(); 257 257 if (toRemove.length === 0) return; 258 258 ··· 333 333 icon: ICONS.MOVE_DOWN, 334 334 }, 335 335 { 336 - className: CLASSES.QUEUE_REMOVE, 337 - label: "remove", 336 + className: CLASSES.QUEUE_CLEAR, 337 + label: "clear", 338 338 icon: ICONS.REMOVE, 339 339 }, 340 340 ];