mirror of
https://github.com/jeffusion/gitea-ai-assistant.git
synced 2026-03-27 10:05:50 +00:00
Migrate to react-router-dom for SPA routing: - Add BrowserRouter with nested routes - Implement AuthGuard component for protected routes - Add collapsible sidebar navigation - Support /repos and /config routes Changes: - App.tsx: Route definitions with AuthGuard wrapper - main.tsx: Force dark mode, improved retry logic - DashboardPage.tsx: New layout with sidebar + Outlet - vite.config.ts: Expose dev server on 0.0.0.0 Dependencies added: - react-router-dom - @radix-ui/react-select, switch, separator, tabs
24 lines
505 B
TypeScript
24 lines
505 B
TypeScript
import path from "path"
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
proxy: {
|
|
// 将 /admin/api 的请求代理到后端服务
|
|
'/admin/api': {
|
|
target: 'http://localhost:5174', // 后端服务地址
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|