restructure files onto electron-vite boilerplate

This commit is contained in:
jeffvli 2025-05-18 14:03:18 -07:00
parent 91ce2cd8a1
commit 1cf587bc8f
457 changed files with 9927 additions and 11705 deletions

View file

@ -3,27 +3,28 @@ import { nanoid } from 'nanoid/non-secure';
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
import { ServerListItem } from '/@/renderer/api/types';
import { useAlbumArtistListDataStore } from '/@/renderer/store/album-artist-list-data.store';
import { useAlbumListDataStore } from '/@/renderer/store/album-list-data.store';
import { useListStore } from '/@/renderer/store/list.store';
import { ServerListItem } from '/@/renderer/api/types';
export interface AuthState {
currentServer: ServerListItem | null;
deviceId: string;
serverList: Record<string, ServerListItem>;
}
export interface AuthSlice extends AuthState {
actions: {
addServer: (args: ServerListItem) => void;
deleteServer: (id: string) => void;
getServer: (id: string) => ServerListItem | null;
setCurrentServer: (server: ServerListItem | null) => void;
getServer: (id: string) => null | ServerListItem;
setCurrentServer: (server: null | ServerListItem) => void;
updateServer: (id: string, args: Partial<ServerListItem>) => void;
};
}
export interface AuthState {
currentServer: null | ServerListItem;
deviceId: string;
serverList: Record<string, ServerListItem>;
}
export const useAuthStore = create<AuthSlice>()(
persist(
devtools(