mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 19:01:40 +00:00
fix all imports for new structure
This commit is contained in:
parent
249eaf89f8
commit
930165d006
291 changed files with 2056 additions and 1894 deletions
|
|
@ -2,10 +2,10 @@ import { create } from 'zustand';
|
|||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { immer } from 'zustand/middleware/immer';
|
||||
|
||||
import { AlbumArtistListArgs, AlbumArtistListSort, SortOrder } from '/@/renderer/api/types';
|
||||
import { DataTableProps } from '/@/renderer/store/settings.store';
|
||||
import { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/renderer/types';
|
||||
import { AlbumArtistListArgs, AlbumArtistListSort, SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/shared/types/types';
|
||||
|
||||
export type AlbumArtistListFilter = Omit<AlbumArtistListArgs['query'], 'limit' | 'startIndex'>;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { create } from 'zustand';
|
|||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { immer } from 'zustand/middleware/immer';
|
||||
|
||||
import { Platform } from '/@/renderer/types';
|
||||
import { Platform } from '/@/shared/types/types';
|
||||
|
||||
export interface AppSlice extends AppState {
|
||||
actions: {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ 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 '/@/shared/types/domain-types';
|
||||
|
||||
export interface AuthSlice extends AuthState {
|
||||
actions: {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import { devtools, persist } from 'zustand/middleware';
|
|||
import { immer } from 'zustand/middleware/immer';
|
||||
import { shallow } from 'zustand/shallow';
|
||||
|
||||
import { DataTableProps, PersistedTableColumn } from '/@/renderer/store/settings.store';
|
||||
import { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import {
|
||||
AlbumArtistListArgs,
|
||||
AlbumArtistListSort,
|
||||
|
|
@ -17,10 +19,8 @@ import {
|
|||
SongListArgs,
|
||||
SongListSort,
|
||||
SortOrder,
|
||||
} from '/@/renderer/api/types';
|
||||
import { DataTableProps, PersistedTableColumn } from '/@/renderer/store/settings.store';
|
||||
import { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/renderer/types';
|
||||
} from '/@/shared/types/domain-types';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/shared/types/types';
|
||||
|
||||
export const generatePageKey = (page: string, id?: string) => {
|
||||
return id ? `${page}_${id}` : page;
|
||||
|
|
|
|||
|
|
@ -7,23 +7,8 @@ import { devtools, persist, subscribeWithSelector } from 'zustand/middleware';
|
|||
import { immer } from 'zustand/middleware/immer';
|
||||
import { shallow } from 'zustand/shallow';
|
||||
|
||||
import { QueueSong } from '/@/renderer/api/types';
|
||||
import { Play, PlayerRepeat, PlayerShuffle, PlayerStatus } from '/@/renderer/types';
|
||||
|
||||
export interface PlayerData {
|
||||
current: {
|
||||
index: number;
|
||||
nextIndex?: number;
|
||||
player: 1 | 2;
|
||||
previousIndex?: number;
|
||||
shuffledIndex: number;
|
||||
song?: QueueSong;
|
||||
status: PlayerStatus;
|
||||
};
|
||||
player1?: QueueSong;
|
||||
player2?: QueueSong;
|
||||
queue: QueueData;
|
||||
}
|
||||
import { PlayerData, QueueData, QueueSong } from '/@/shared/types/domain-types';
|
||||
import { Play, PlayerRepeat, PlayerShuffle, PlayerStatus } from '/@/shared/types/types';
|
||||
|
||||
export interface PlayerSlice extends PlayerState {
|
||||
actions: {
|
||||
|
|
@ -94,13 +79,6 @@ export interface PlayerState {
|
|||
volume: number;
|
||||
}
|
||||
|
||||
export interface QueueData {
|
||||
current?: QueueSong;
|
||||
length: number;
|
||||
next?: QueueSong;
|
||||
previous?: QueueSong;
|
||||
}
|
||||
|
||||
export const usePlayerStore = create<PlayerSlice>()(
|
||||
subscribeWithSelector(
|
||||
persist(
|
||||
|
|
@ -491,7 +469,7 @@ export const usePlayerStore = create<PlayerSlice>()(
|
|||
},
|
||||
incrementPlayCount: (ids) => {
|
||||
const { default: queue } = get().queue;
|
||||
const foundUniqueIds = [];
|
||||
const foundUniqueIds: string[] = [];
|
||||
|
||||
for (const id of ids) {
|
||||
const foundIndex = queue.findIndex((song) => song.id === id);
|
||||
|
|
@ -887,7 +865,7 @@ export const usePlayerStore = create<PlayerSlice>()(
|
|||
},
|
||||
setFavorite: (ids, favorite) => {
|
||||
const { default: queue } = get().queue;
|
||||
const foundUniqueIds = [];
|
||||
const foundUniqueIds: string[] = [];
|
||||
|
||||
for (const id of ids) {
|
||||
const foundIndex = queue.findIndex((song) => song.id === id);
|
||||
|
|
@ -926,7 +904,7 @@ export const usePlayerStore = create<PlayerSlice>()(
|
|||
},
|
||||
setRating: (ids, rating) => {
|
||||
const { default: queue } = get().queue;
|
||||
const foundUniqueIds = [];
|
||||
const foundUniqueIds: string[] = [];
|
||||
|
||||
for (const id of ids) {
|
||||
const foundIndex = queue.findIndex((song) => song.id === id);
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ 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 { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/renderer/types';
|
||||
import { PlaylistListSort, SortOrder } from '/@/shared/types/domain-types';
|
||||
import { ListDisplayType, TableColumn, TablePagination } from '/@/shared/types/types';
|
||||
|
||||
export interface PlaylistSlice extends PlaylistState {
|
||||
actions: {
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import { immer } from 'zustand/middleware/immer';
|
|||
import { shallow } from 'zustand/shallow';
|
||||
|
||||
import i18n from '/@/i18n/i18n';
|
||||
import { LibraryItem, LyricSource } from '/@/renderer/api/types';
|
||||
import { AppRoute } from '/@/renderer/router/routes';
|
||||
import { usePlayerStore } from '/@/renderer/store/player.store';
|
||||
import { mergeOverridingColumns } from '/@/renderer/store/utils';
|
||||
import { AppTheme } from '/@/renderer/themes/types';
|
||||
import { randomString } from '/@/renderer/utils';
|
||||
import { AppTheme } from '/@/shared/types/domain-types';
|
||||
import { LibraryItem, LyricSource } from '/@/shared/types/domain-types';
|
||||
import {
|
||||
CrossfadeStyle,
|
||||
FontType,
|
||||
|
|
@ -23,8 +24,7 @@ import {
|
|||
PlaybackType,
|
||||
TableColumn,
|
||||
TableType,
|
||||
} from '/@/renderer/types';
|
||||
import { randomString } from '/@/renderer/utils';
|
||||
} from '/@/shared/types/types';
|
||||
|
||||
const utils = isElectron() ? window.api.utils : null;
|
||||
|
||||
|
|
@ -110,7 +110,6 @@ const homeItems = Object.values(HomeItem).map((item) => ({
|
|||
id: item,
|
||||
}));
|
||||
|
||||
/* eslint-disable typescript-sort-keys/string-enum */
|
||||
export enum ArtistItem {
|
||||
BIOGRAPHY = 'biography',
|
||||
COMPILATIONS = 'compilations',
|
||||
|
|
@ -118,7 +117,6 @@ export enum ArtistItem {
|
|||
SIMILAR_ARTISTS = 'similarArtists',
|
||||
TOP_SONGS = 'topSongs',
|
||||
}
|
||||
/* eslint-enable typescript-sort-keys/string-enum */
|
||||
|
||||
const artistItems = Object.values(ArtistItem).map((item) => ({
|
||||
disabled: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue