mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-30 18:09:40 +05:00
feat: add dark theme
This commit is contained in:
parent
1588039542
commit
3e72866a08
22 changed files with 314 additions and 162 deletions
|
@ -1,10 +1,42 @@
|
|||
"use client";
|
||||
import { create } from "zustand";
|
||||
import { persist, createJSONStorage } from "zustand/middleware";
|
||||
import { persist } from "zustand/middleware";
|
||||
|
||||
export const usePreferencesStore = create(
|
||||
interface preferencesState {
|
||||
flags: {
|
||||
// saveSearchHistory: boolean;
|
||||
saveWatchHistory: boolean;
|
||||
// theme: "light" | "dark" | "black" | "system";
|
||||
};
|
||||
params: {
|
||||
isFirstLaunch: boolean;
|
||||
// color: {
|
||||
// primary: string;
|
||||
// secondary: string;
|
||||
// accent: string;
|
||||
// }
|
||||
};
|
||||
setFlags: (flags: preferencesState["flags"]) => void;
|
||||
setParams: (params: preferencesState["params"]) => void;
|
||||
}
|
||||
|
||||
export const usePreferencesStore = create<preferencesState>()(
|
||||
persist(
|
||||
(set, get) => ({
|
||||
flags: {
|
||||
// saveSearchHistory: true,
|
||||
saveWatchHistory: true,
|
||||
// theme: "light",
|
||||
},
|
||||
params: {
|
||||
isFirstLaunch: true,
|
||||
},
|
||||
setFlags(flags) {
|
||||
set({ flags });
|
||||
},
|
||||
setParams(params) {
|
||||
set({ params });
|
||||
},
|
||||
}),
|
||||
{
|
||||
name: "preferences",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue