fix(ui): keep the NowPlayingPanel badge in sync.

Introduced a new event, EVENT_STREAM_RECONNECTED, to track the last
timestamp of stream reconnections. This change updates the activity
reducer to handle the new event and modifies the NowPlayingPanel to
refresh data based on server and stream status.

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2025-06-29 11:35:10 -04:00
parent dce7705999
commit 4f83987840
6 changed files with 197 additions and 22 deletions
+6
View File
@@ -2,6 +2,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 EVENT_STREAM_RECONNECTED = 'streamReconnected'
export const processEvent = (type, data) => ({
type,
@@ -21,3 +22,8 @@ export const serverDown = () => ({
type: EVENT_SERVER_START,
data: {},
})
export const streamReconnected = () => ({
type: EVENT_STREAM_RECONNECTED,
data: {},
})