feat: 添加仓库信息卡片和仓库页面,优化仓库路由

This commit is contained in:
2026-02-25 23:12:39 +08:00
parent bbb762db97
commit 5a769a6748
7 changed files with 177 additions and 18 deletions

View File

@@ -11,6 +11,7 @@
import { Route as rootRouteImport } from './routes/__root'
import { Route as LoginRouteImport } from './routes/login'
import { Route as IndexRouteImport } from './routes/index'
import { Route as RepoIndexRouteImport } from './routes/repo/index'
import { Route as ConfigIndexRouteImport } from './routes/config/index'
import { Route as ConfigGiteaRouteImport } from './routes/config/gitea'
@@ -24,6 +25,11 @@ const IndexRoute = IndexRouteImport.update({
path: '/',
getParentRoute: () => rootRouteImport,
} as any)
const RepoIndexRoute = RepoIndexRouteImport.update({
id: '/repo/',
path: '/repo/',
getParentRoute: () => rootRouteImport,
} as any)
const ConfigIndexRoute = ConfigIndexRouteImport.update({
id: '/config/',
path: '/config/',
@@ -40,12 +46,14 @@ export interface FileRoutesByFullPath {
'/login': typeof LoginRoute
'/config/gitea': typeof ConfigGiteaRoute
'/config/': typeof ConfigIndexRoute
'/repo/': typeof RepoIndexRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/login': typeof LoginRoute
'/config/gitea': typeof ConfigGiteaRoute
'/config': typeof ConfigIndexRoute
'/repo': typeof RepoIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
@@ -53,13 +61,14 @@ export interface FileRoutesById {
'/login': typeof LoginRoute
'/config/gitea': typeof ConfigGiteaRoute
'/config/': typeof ConfigIndexRoute
'/repo/': typeof RepoIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/login' | '/config/gitea' | '/config/'
fullPaths: '/' | '/login' | '/config/gitea' | '/config/' | '/repo/'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/login' | '/config/gitea' | '/config'
id: '__root__' | '/' | '/login' | '/config/gitea' | '/config/'
to: '/' | '/login' | '/config/gitea' | '/config' | '/repo'
id: '__root__' | '/' | '/login' | '/config/gitea' | '/config/' | '/repo/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
@@ -67,6 +76,7 @@ export interface RootRouteChildren {
LoginRoute: typeof LoginRoute
ConfigGiteaRoute: typeof ConfigGiteaRoute
ConfigIndexRoute: typeof ConfigIndexRoute
RepoIndexRoute: typeof RepoIndexRoute
}
declare module '@tanstack/react-router' {
@@ -85,6 +95,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
'/repo/': {
id: '/repo/'
path: '/repo'
fullPath: '/repo/'
preLoaderRoute: typeof RepoIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/config/': {
id: '/config/'
path: '/config'
@@ -107,6 +124,7 @@ const rootRouteChildren: RootRouteChildren = {
LoginRoute: LoginRoute,
ConfigGiteaRoute: ConfigGiteaRoute,
ConfigIndexRoute: ConfigIndexRoute,
RepoIndexRoute: RepoIndexRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)