mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-08 05:12:57 +02:00
Make ratings/favourites a bit more customizable (#2262)
* Replace show ratings toggle with favorite/rating controls setting Swap `genera.showRatings` (previously a simple bool) for a `favoriteRatingControls` enum, exposed via derived `useShowRatings` / `useShowFavorites` hooks. Settings switch becomes a select, with a migration to a new v32 schema mapping the old boolean forward with no user change. * Gate favorite controls on `favoriteRatingControls` setting Hide the playerbar and mobile fullscreen favorite buttons and the context-menu favorite action when the setting excludes favorites, mirroring how ratings are already gated. * Gate favorite controls on item cards and detail list Drill a `showFavorite` flag through the item-card tree (mirroring `showRating`), and gate the card/detail-list favorite badges and hover buttons on the `favoriteRatingControls` setting. * Gate favorite controls in detail headers and album group controls * Keep the original `showRatings` switch and add a `showFavorites` * Gate album header favorite hander at definition
This commit is contained in:
@@ -24,7 +24,6 @@ import {
|
||||
useAutoDJSettings,
|
||||
useCurrentServer,
|
||||
useFullScreenPlayerStore,
|
||||
useGeneralSettings,
|
||||
useHotkeySettings,
|
||||
usePlaybackSettings,
|
||||
usePlaybackType,
|
||||
@@ -34,6 +33,8 @@ import {
|
||||
usePlayerVolume,
|
||||
useSetFullScreenPlayerStore,
|
||||
useSettingsStoreActions,
|
||||
useShowFavorites,
|
||||
useShowRatings,
|
||||
useSidebarRightExpanded,
|
||||
useSideQueueType,
|
||||
useVolumeMax,
|
||||
@@ -86,7 +87,8 @@ const calculateVolumeDown = (volume: number, volumeWheelStep: number) => {
|
||||
};
|
||||
|
||||
export const RightControls = () => {
|
||||
const { showRatings } = useGeneralSettings();
|
||||
const showRatings = useShowRatings();
|
||||
const showFavorites = useShowFavorites();
|
||||
return (
|
||||
<Flex align="flex-end" direction="column" h="100%" px="1rem" py="0.5rem">
|
||||
<Group h="calc(100% / 3)">
|
||||
@@ -97,7 +99,7 @@ export const RightControls = () => {
|
||||
<SleepTimerButton />
|
||||
<PlayerConfig />
|
||||
<LyricsButton />
|
||||
<FavoriteButton />
|
||||
{showFavorites && <FavoriteButton />}
|
||||
<QueueButton />
|
||||
<VolumeButton />
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user