feat(ui): add Now Playing panel for admins (#4209)

* feat(ui): add Now Playing panel and integrate now playing count updates

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: check return value in test to satisfy linter

* fix: format React code with prettier

* fix: resolve race condition in play tracker test

* fix: log error when fetching now playing data fails

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): refactor Now Playing panel with new components and error handling

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ui): adjust padding and height in Now Playing panel for improved layout

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(cache): add automatic cleanup to prevent goroutine leak on cache garbage collection

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan Quintão
2025-06-10 17:22:13 -04:00
committed by GitHub
parent a65140b965
commit 76042ba173
16 changed files with 744 additions and 3 deletions
+6
View File
@@ -1,6 +1,7 @@
export const EVENT_SCAN_STATUS = 'scanStatus'
export const EVENT_SERVER_START = 'serverStart'
export const EVENT_REFRESH_RESOURCE = 'refreshResource'
export const EVENT_NOW_PLAYING_COUNT = 'nowPlayingCount'
export const processEvent = (type, data) => ({
type,
@@ -11,6 +12,11 @@ export const scanStatusUpdate = (data) => ({
data: data,
})
export const nowPlayingCountUpdate = (data) => ({
type: EVENT_NOW_PLAYING_COUNT,
data: data,
})
export const serverDown = () => ({
type: EVENT_SERVER_START,
data: {},