mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
add player autodj (#7)
This commit is contained in:
@@ -401,10 +401,17 @@ const QueryBuilderSettingsSchema = z.object({
|
||||
tag: z.array(QueryBuilderCustomFieldSchema),
|
||||
});
|
||||
|
||||
const AutoDJSettingsSchema = z.object({
|
||||
enabled: z.boolean(),
|
||||
itemCount: z.number(),
|
||||
timing: z.number(),
|
||||
});
|
||||
|
||||
/**
|
||||
* This schema is used for validation of the imported settings json
|
||||
*/
|
||||
export const ValidationSettingsStateSchema = z.object({
|
||||
autoDJ: AutoDJSettingsSchema,
|
||||
css: CssSettingsSchema,
|
||||
discord: DiscordSettingsSchema,
|
||||
font: FontSettingsSchema,
|
||||
@@ -659,6 +666,11 @@ const getPlatformDefaultWindowBarStyle = (): Platform => {
|
||||
const platformDefaultWindowBarStyle: Platform = getPlatformDefaultWindowBarStyle();
|
||||
|
||||
const initialState: SettingsState = {
|
||||
autoDJ: {
|
||||
enabled: false,
|
||||
itemCount: 10,
|
||||
timing: 3,
|
||||
},
|
||||
css: {
|
||||
content: '',
|
||||
enabled: false,
|
||||
@@ -1529,3 +1541,5 @@ export const usePrimaryColor = () => useSettingsStore((store) => store.general.a
|
||||
export const usePlayerbarSlider = () => useSettingsStore((store) => store.general.playerbarSlider);
|
||||
|
||||
export const useGenreTarget = () => useSettingsStore((store) => store.general.genreTarget);
|
||||
|
||||
export const useAutoDJSettings = () => useSettingsStore((store) => store.autoDJ, shallow);
|
||||
|
||||
Reference in New Issue
Block a user