Pulls the compound "enabled && (not admin-only or is admin)" condition out
of the JSX into a canViewNowPlaying variable, so the AppBar render reads as
intent rather than a multi-operator boolean. No behavior change.
Signed-off-by: Deluan <deluan@navidrome.org>
Replaces the boolean EnableNowPlaying option with a more flexible NowPlaying configuration structure containing Enabled and AdminOnly flags. This allows three visibility modes: disabled, admin-only, and all users.
The new configuration uses nowplayingOptions struct similar to jukeboxOptions, with the following defaults:
- NowPlaying.Enabled: true (feature enabled)
- NowPlaying.AdminOnly: false (visible to all users)
The old EnableNowPlaying option is deprecated and automatically migrated to NowPlaying.Enabled with a warning message.
Frontend changes update the AppBar component to conditionally render NowPlayingPanel based on both the enabled state and the admin-only permission check. Server-side enforcement of the AdminOnly setting is added in a follow-up commit.
Signed-off-by: Deluan <deluan@navidrome.org>
* 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>
* chore(ui): Fix minor inconsistencies
1. The icons in the user menu are a mix of MUI and react-icons. Move them all to react-icons, and use a standard size (24px)
2. On missing files page, provide a custom Empty component that just removes 'yet'
* use RA's builtin support for custom empty message
Signed-off-by: Deluan <deluan@navidrome.org>
---------
Signed-off-by: Deluan <deluan@navidrome.org>
Co-authored-by: Deluan <deluan@navidrome.org>