UPDATE: New cdn, assets
Gitea Auto Deploy / Deploy-Container (push) Successful in 39s

This commit is contained in:
2026-02-17 23:27:25 +07:00
parent b5713c3138
commit f5541c9527
66 changed files with 56590 additions and 237 deletions
+18 -7
View File
@@ -1,19 +1,30 @@
import { AvatarHakushiType, EnemyHakushiType } from '@/types';
import { CharacterBasic, MonsterBasic } from '@/types';
import { create } from 'zustand'
interface AvatarDataState {
listAvatar: AvatarHakushiType[];
listEnemy: EnemyHakushiType[];
setListAvatar: (list: AvatarHakushiType[]) => void;
setListEnemy: (list: EnemyHakushiType[]) => void;
listAvatar: CharacterBasic[];
mapAvatar: Record<string, CharacterBasic>;
listEnemy: MonsterBasic[];
mapEnemy: Record<string, MonsterBasic>;
setListAvatar: (list: CharacterBasic[]) => void;
setMapAvatar: (data: Record<string, CharacterBasic>) => void;
setListEnemy: (list: MonsterBasic[]) => void;
setMapEnemy: (data: Record<string, MonsterBasic>) => void;
}
const useAvatarDataStore = create<AvatarDataState>((set) => ({
listAvatar: [],
listEnemy: [],
setListAvatar: (list: AvatarHakushiType[]) => set({ listAvatar: list }),
setListEnemy: (list: EnemyHakushiType[]) => set({ listEnemy: list }),
mapAvatar: {},
mapEnemy: {},
setListAvatar: (list: CharacterBasic[]) => set({ listAvatar: list }),
setMapAvatar: (data: Record<string, CharacterBasic>) => set({ mapAvatar: data }),
setListEnemy: (list: MonsterBasic[]) => set({ listEnemy: list }),
setMapEnemy: (data: Record<string, MonsterBasic>) => set({ mapEnemy: data })
}));
export default useAvatarDataStore;
+15 -5
View File
@@ -1,15 +1,25 @@
import { create } from 'zustand'
import { createJSONStorage, persist } from 'zustand/middleware';
interface LocaleState {
locale: string;
theme: string
setTheme: (newTheme: string) => void;
setLocale: (newLocale: string) => void;
}
const useLocaleStore = create<LocaleState>((set) => ({
locale: "en",
setLocale: (newLocale: string) => set({ locale: newLocale }),
}));
const useLocaleStore = create<LocaleState>()(persist(
(set) => ({
locale: "en",
theme: "night",
setTheme: (newTheme: string) => set({ theme: newTheme }),
setLocale: (newLocale: string) => set({ locale: newLocale }),
}),
{
name: 'locale-storage',
storage: createJSONStorage(() => localStorage),
}
));
export default useLocaleStore;