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
+39 -38
View File
@@ -1,48 +1,12 @@
import { create } from 'zustand';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
import { PlaylistListSort, SortOrder } from '/@/renderer/api/types';
import { PlaylistListFilter, SongListFilter } from '/@/renderer/store/list.store';
import { DataTableProps } from '/@/renderer/store/settings.store';
import { ListDisplayType, TableColumn, TablePagination } from '/@/renderer/types';
import { mergeOverridingColumns } from '/@/renderer/store/utils';
type TableProps = {
pagination: TablePagination;
scrollOffset: number;
} & DataTableProps;
type ListProps<T> = {
display: ListDisplayType;
filter: T;
table: TableProps;
};
type DetailPaginationProps = TablePagination & {
scrollOffset: number;
};
type DetailTableProps = DataTableProps & {
id: {
[key: string]: DetailPaginationProps & { filter: SongListFilter };
};
};
type DetailProps = {
display: ListDisplayType;
table: DetailTableProps;
};
type ListGridProps = {
itemsPerRow?: number;
scrollOffset?: number;
};
interface PlaylistState {
detail: DetailProps;
grid: ListGridProps;
list: ListProps<PlaylistListFilter>;
}
import { ListDisplayType, TableColumn, TablePagination } from '/@/renderer/types';
export interface PlaylistSlice extends PlaylistState {
actions: {
@@ -57,6 +21,43 @@ export interface PlaylistSlice extends PlaylistState {
};
}
type DetailPaginationProps = TablePagination & {
scrollOffset: number;
};
type DetailProps = {
display: ListDisplayType;
table: DetailTableProps;
};
type DetailTableProps = DataTableProps & {
id: {
[key: string]: DetailPaginationProps & { filter: SongListFilter };
};
};
type ListGridProps = {
itemsPerRow?: number;
scrollOffset?: number;
};
type ListProps<T> = {
display: ListDisplayType;
filter: T;
table: TableProps;
};
interface PlaylistState {
detail: DetailProps;
grid: ListGridProps;
list: ListProps<PlaylistListFilter>;
}
type TableProps = DataTableProps & {
pagination: TablePagination;
scrollOffset: number;
};
export const usePlaylistStore = create<PlaylistSlice>()(
persist(
devtools(