feat: add Gitea configuration page and state management

- Implemented GiteaConfigPage for managing Gitea API settings.
- Created Zustand store for Gitea configuration with local storage persistence.
- Added validation schema for Gitea configuration using Zod.
- Established routes for Gitea configuration in the application.
This commit is contained in:
2026-02-19 23:04:31 +08:00
parent 1884e87421
commit f9fd2a67b4
17 changed files with 977 additions and 4205 deletions

View File

@@ -9,55 +9,58 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
import { Route as ConfigRouteImport } from './routes/config'
import { Route as IndexRouteImport } from './routes/index'
import { Route as ConfigIndexRouteImport } from './routes/config/index'
import { Route as ConfigGiteaRouteImport } from './routes/config/gitea'
const ConfigRoute = ConfigRouteImport.update({
id: '/config',
path: '/config',
getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRouteImport,
} as any)
const ConfigIndexRoute = ConfigIndexRouteImport.update({
id: '/config/',
path: '/config/',
getParentRoute: () => rootRouteImport,
} as any)
const ConfigGiteaRoute = ConfigGiteaRouteImport.update({
id: '/config/gitea',
path: '/config/gitea',
getParentRoute: () => rootRouteImport,
} as any)
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/config': typeof ConfigRoute
'/config/gitea': typeof ConfigGiteaRoute
'/config/': typeof ConfigIndexRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/config': typeof ConfigRoute
'/config/gitea': typeof ConfigGiteaRoute
'/config': typeof ConfigIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/config': typeof ConfigRoute
'/config/gitea': typeof ConfigGiteaRoute
'/config/': typeof ConfigIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/config'
fullPaths: '/' | '/config/gitea' | '/config/'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/config'
id: '__root__' | '/' | '/config'
to: '/' | '/config/gitea' | '/config'
id: '__root__' | '/' | '/config/gitea' | '/config/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
ConfigRoute: typeof ConfigRoute
ConfigGiteaRoute: typeof ConfigGiteaRoute
ConfigIndexRoute: typeof ConfigIndexRoute
}
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/config': {
id: '/config'
path: '/config'
fullPath: '/config'
preLoaderRoute: typeof ConfigRouteImport
parentRoute: typeof rootRouteImport
}
'/': {
id: '/'
path: '/'
@@ -65,12 +68,27 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
'/config/': {
id: '/config/'
path: '/config'
fullPath: '/config/'
preLoaderRoute: typeof ConfigIndexRouteImport
parentRoute: typeof rootRouteImport
}
'/config/gitea': {
id: '/config/gitea'
path: '/config/gitea'
fullPath: '/config/gitea'
preLoaderRoute: typeof ConfigGiteaRouteImport
parentRoute: typeof rootRouteImport
}
}
}
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
ConfigRoute: ConfigRoute,
ConfigGiteaRoute: ConfigGiteaRoute,
ConfigIndexRoute: ConfigIndexRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)