mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
@@ -385,6 +385,11 @@ const VisualizerSettingsSchema = z.object({
|
||||
type: z.enum(['audiomotionanalyzer', 'butterchurn']),
|
||||
});
|
||||
|
||||
export enum HomeFeatureStyle {
|
||||
MULTIPLE = 'multiple',
|
||||
SINGLE = 'single',
|
||||
}
|
||||
|
||||
export const GeneralSettingsSchema = z.object({
|
||||
accent: z
|
||||
.string()
|
||||
@@ -409,6 +414,7 @@ export const GeneralSettingsSchema = z.object({
|
||||
followSystemTheme: z.boolean(),
|
||||
genreTarget: GenreTargetSchema,
|
||||
homeFeature: z.boolean(),
|
||||
homeFeatureStyle: z.nativeEnum(HomeFeatureStyle),
|
||||
homeItems: z.array(SortableItemSchema(HomeItemSchema)),
|
||||
imageRes: z.object({
|
||||
fullScreenPlayer: z.number(),
|
||||
@@ -964,6 +970,7 @@ const initialState: SettingsState = {
|
||||
followSystemTheme: false,
|
||||
genreTarget: GenreTarget.TRACK,
|
||||
homeFeature: true,
|
||||
homeFeatureStyle: HomeFeatureStyle.SINGLE,
|
||||
homeItems,
|
||||
imageRes: {
|
||||
fullScreenPlayer: 0,
|
||||
@@ -2143,6 +2150,9 @@ export const useExternalLinks = () =>
|
||||
|
||||
export const useHomeFeature = () => useSettingsStore((state) => state.general.homeFeature, shallow);
|
||||
|
||||
export const useHomeFeatureStyle = () =>
|
||||
useSettingsStore((state) => state.general.homeFeatureStyle);
|
||||
|
||||
export const useHomeItems = () => useSettingsStore((state) => state.general.homeItems, shallow);
|
||||
|
||||
export const useArtistItems = () => useSettingsStore((state) => state.general.artistItems, shallow);
|
||||
|
||||
Reference in New Issue
Block a user