mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +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
@@ -60,6 +60,7 @@ export const ruTranslation = {
|
||||
albums: 'Альбомы',
|
||||
songs: 'Треки',
|
||||
clearLabel: 'Очистить поиск',
|
||||
addedToQueueToast: '«{{title}}» добавлен в очередь',
|
||||
title: 'Поиск',
|
||||
resultsFor: 'Результаты по «{{query}}»',
|
||||
album: 'Альбом',
|
||||
|
||||
Reference in New Issue
Block a user