mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
fix(search,ctx): enqueue on live-search click + reposition CM with right-click (#298)
Two coupled UX fixes around the header live search and the global context menu, born from the same testing pass. LiveSearch / MobileSearchOverlay - Single click on a song no longer calls playTrack(track) without a queue argument. The store fell back to the existing queue, didn't find the new track, and ended up playing something the user couldn't navigate or see in the queue list — the player header showed metadata but the queue itself didn't contain it. - New behaviour: enqueue([track]) + "Added to queue" toast. Whatever was playing keeps playing; the new track lands at the bottom and is visible/navigable. Mobile gets the same behaviour (tap-only). - Desktop also gets a right-click context menu on song rows for users who want immediate playback or different routing (Play Now, Play Next, Add to Playlist, etc.). The dropdown stays open while the CM is up, and the row picks up the .context-active highlight so the user can see which song the menu refers to. ContextMenu - Removed the transparent fullscreen backdrop (z-index 998) that previously caught outside clicks. It also blocked right-clicks from reaching elements *underneath* it — so right-clicking a different song row to reposition the menu hit the backdrop instead, closed the menu, and never opened a new one for the row the user actually pointed at. - Replaced with a document-level mousedown listener (gated on `contextMenu.isOpen`) that closes the menu when the click lands outside `menuRef`. Standard outside-click pattern, doesn't occlude the underlying UI, and right-clicking another row now naturally pivots the CM to that row. i18n: new search.addedToQueueToast key in 8 locales. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
67d51a0975
commit
93b724fc65
@@ -58,6 +58,7 @@ export const deTranslation = {
|
||||
albums: 'Alben',
|
||||
songs: 'Songs',
|
||||
clearLabel: 'Suche leeren',
|
||||
addedToQueueToast: '„{{title}}" zur Warteschlange hinzugefügt',
|
||||
title: 'Suche',
|
||||
resultsFor: 'Ergebnisse für „{{query}}"',
|
||||
album: 'Album',
|
||||
|
||||
@@ -60,6 +60,7 @@ export const enTranslation = {
|
||||
albums: 'Albums',
|
||||
songs: 'Songs',
|
||||
clearLabel: 'Clear search',
|
||||
addedToQueueToast: 'Added "{{title}}" to queue',
|
||||
title: 'Search',
|
||||
resultsFor: 'Results for "{{query}}"',
|
||||
album: 'Album',
|
||||
|
||||
@@ -59,6 +59,7 @@ export const esTranslation = {
|
||||
albums: 'Álbumes',
|
||||
songs: 'Canciones',
|
||||
clearLabel: 'Limpiar búsqueda',
|
||||
addedToQueueToast: '"{{title}}" añadido a la cola',
|
||||
title: 'Buscar',
|
||||
resultsFor: 'Resultados para "{{query}}"',
|
||||
album: 'Álbum',
|
||||
|
||||
@@ -58,6 +58,7 @@ export const frTranslation = {
|
||||
albums: 'Albums',
|
||||
songs: 'Morceaux',
|
||||
clearLabel: 'Effacer la recherche',
|
||||
addedToQueueToast: '« {{title}} » ajouté à la file',
|
||||
title: 'Recherche',
|
||||
resultsFor: 'Résultats pour « {{query}} »',
|
||||
album: 'Album',
|
||||
|
||||
@@ -58,6 +58,7 @@ export const nbTranslation = {
|
||||
albums: 'Album',
|
||||
songs: 'Sanger',
|
||||
clearLabel: 'Fjern søk',
|
||||
addedToQueueToast: '«{{title}}» lagt til i køen',
|
||||
title: 'Søk',
|
||||
resultsFor: 'Resultater for "{{query}}"',
|
||||
album: 'Album',
|
||||
|
||||
@@ -58,6 +58,7 @@ export const nlTranslation = {
|
||||
albums: 'Albums',
|
||||
songs: 'Nummers',
|
||||
clearLabel: 'Zoekopdracht wissen',
|
||||
addedToQueueToast: '"{{title}}" toegevoegd aan de wachtrij',
|
||||
title: 'Zoeken',
|
||||
resultsFor: 'Resultaten voor "{{query}}"',
|
||||
album: 'Album',
|
||||
|
||||
@@ -60,6 +60,7 @@ export const ruTranslation = {
|
||||
albums: 'Альбомы',
|
||||
songs: 'Треки',
|
||||
clearLabel: 'Очистить поиск',
|
||||
addedToQueueToast: '«{{title}}» добавлен в очередь',
|
||||
title: 'Поиск',
|
||||
resultsFor: 'Результаты по «{{query}}»',
|
||||
album: 'Альбом',
|
||||
|
||||
@@ -58,6 +58,7 @@ export const zhTranslation = {
|
||||
albums: '专辑',
|
||||
songs: '歌曲',
|
||||
clearLabel: '清除搜索',
|
||||
addedToQueueToast: '已将"{{title}}"加入队列',
|
||||
title: '搜索',
|
||||
resultsFor: '"{{query}}" 的搜索结果',
|
||||
album: '专辑',
|
||||
|
||||
Reference in New Issue
Block a user