1import Home from "@/pages/home"; 2import MusicDetail from "@/pages/musicDetail"; 3import TopList from "@/pages/topList"; 4import TopListDetail from "@/pages/topListDetail"; 5import SearchPage from "@/pages/searchPage"; 6import SheetDetail from "@/pages/sheetDetail"; 7import AlbumDetail from "@/pages/albumDetail"; 8import ArtistDetail from "@/pages/artistDetail"; 9import Setting from "@/pages/setting"; 10import LocalMusic from "@/pages/localMusic"; 11import Downloading from "@/pages/downloading"; 12import SearchMusicList from "@/pages/searchMusicList"; 13import MusicListEditor from "@/pages/musicListEditor"; 14import FileSelector from "@/pages/fileSelector"; 15import RecommendSheets from "@/pages/recommendSheets"; 16import PluginSheetDetail from "@/pages/pluginSheetDetail"; 17import History from "@/pages/history"; 18import SetCustomTheme from "@/pages/setCustomTheme"; 19import Permissions from "@/pages/permissions"; 20import { ROUTE_PATH } from "@/core/router/index.ts"; 21 22type ValueOf<T> = T[keyof T]; 23export type RoutePaths = ValueOf<typeof ROUTE_PATH>; 24 25type IRoutes = { 26 path: RoutePaths; 27 component: (...args: any[]) => JSX.Element; 28}; 29 30 31export const routes: Array<IRoutes> = [ 32 { 33 path: ROUTE_PATH.HOME, 34 component: Home, 35 }, 36 { 37 path: ROUTE_PATH.MUSIC_DETAIL, 38 component: MusicDetail, 39 }, 40 { 41 path: ROUTE_PATH.TOP_LIST, 42 component: TopList, 43 }, 44 { 45 path: ROUTE_PATH.TOP_LIST_DETAIL, 46 component: TopListDetail, 47 }, 48 { 49 path: ROUTE_PATH.SEARCH_PAGE, 50 component: SearchPage, 51 }, 52 { 53 path: ROUTE_PATH.LOCAL_SHEET_DETAIL, 54 component: SheetDetail, 55 }, 56 { 57 path: ROUTE_PATH.ALBUM_DETAIL, 58 component: AlbumDetail, 59 }, 60 { 61 path: ROUTE_PATH.ARTIST_DETAIL, 62 component: ArtistDetail, 63 }, 64 { 65 path: ROUTE_PATH.SETTING, 66 component: Setting, 67 }, 68 { 69 path: ROUTE_PATH.LOCAL, 70 component: LocalMusic, 71 }, 72 { 73 path: ROUTE_PATH.DOWNLOADING, 74 component: Downloading, 75 }, 76 { 77 path: ROUTE_PATH.SEARCH_MUSIC_LIST, 78 component: SearchMusicList, 79 }, 80 { 81 path: ROUTE_PATH.MUSIC_LIST_EDITOR, 82 component: MusicListEditor, 83 }, 84 { 85 path: ROUTE_PATH.FILE_SELECTOR, 86 component: FileSelector, 87 }, 88 { 89 path: ROUTE_PATH.RECOMMEND_SHEETS, 90 component: RecommendSheets, 91 }, 92 { 93 path: ROUTE_PATH.PLUGIN_SHEET_DETAIL, 94 component: PluginSheetDetail, 95 }, 96 { 97 path: ROUTE_PATH.HISTORY, 98 component: History, 99 }, 100 { 101 path: ROUTE_PATH.SET_CUSTOM_THEME, 102 component: SetCustomTheme, 103 }, 104 { 105 path: ROUTE_PATH.PERMISSIONS, 106 component: Permissions, 107 }, 108]; 109