diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index aee58a5..20c552c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -114,6 +114,8 @@ export default function App() { // URL → 页面状态(直接输入/刷新/分享链接时恢复) useEffect(() => { const path = location.pathname.replace(/\/+$/, '') || '/'; + // 登录页不参与模块路由(否则与未登录跳转互相重定向形成死循环) + if (path === '/login') return; const editorMatch = path.match(/^\/pipelines\/(\d+)/); if (editorMatch) { setActiveModule('pipelines'); diff --git a/frontend/src/pages/SystemSettings.tsx b/frontend/src/pages/SystemSettings.tsx index d35af11..800610f 100644 --- a/frontend/src/pages/SystemSettings.tsx +++ b/frontend/src/pages/SystemSettings.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { Palette, Monitor, Moon, Sun, - Save, RotateCcw, CheckCircle2, Globe, Bell, Loader2, ExternalLink, ChevronDown, ChevronRight + Save, RotateCcw, Globe, Bell, Loader2, ExternalLink, ChevronDown, ChevronRight } from 'lucide-react'; import { toast } from 'sonner'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; @@ -11,11 +11,6 @@ import WebhookManager from '@/components/settings/WebhookManager'; interface ThemeConfig { mode: 'light' | 'dark' | 'system'; - primaryColor: string; - fontSize: 'small' | 'medium' | 'large'; - density: 'compact' | 'comfortable' | 'spacious'; - sidebarStyle: 'collapsed' | 'icons' | 'full'; - borderRadius: 'sharp' | 'soft' | 'round'; } interface NotificationConfig { @@ -28,11 +23,6 @@ interface NotificationConfig { const defaultTheme: ThemeConfig = { mode: 'light', - primaryColor: '#0969da', - fontSize: 'medium', - density: 'comfortable', - sidebarStyle: 'full', - borderRadius: 'soft', }; const defaultNotifications: NotificationConfig = { @@ -55,15 +45,6 @@ function safeParse(raw: unknown, fallback: T): T { } } -const colorOptions = [ - { name: '蓝色', value: '#0969da', class: 'bg-[#0969da]' }, - { name: '绿色', value: '#1a7f37', class: 'bg-[#1a7f37]' }, - { name: '紫色', value: '#8250df', class: 'bg-[#8250df]' }, - { name: '橙色', value: '#bc4c00', class: 'bg-[#bc4c00]' }, - { name: '红色', value: '#cf222e', class: 'bg-[#cf222e]' }, - { name: '青色', value: '#0e7c7b', class: 'bg-[#0e7c7b]' }, -]; - // LLM 服务商预设(OpenAI 兼容接口) const LLM_PROVIDERS = [ { id: 'deepseek', label: 'DeepSeek', endpoint: 'https://api.deepseek.com/v1', model: 'deepseek-chat', keyUrl: 'https://platform.deepseek.com/api_keys' }, @@ -365,88 +346,6 @@ export default function SystemSettings() { ))} - - {/* Primary color */} -
- -
- {colorOptions.map(c => ( - - ))} -
-
- - {/* Font size */} -
- -
- {[ - { id: 'small', label: '小', size: '12px' }, - { id: 'medium', label: '中', size: '14px' }, - { id: 'large', label: '大', size: '16px' }, - ].map(f => ( - - ))} -
-
- - {/* Density */} -
- -
- {[ - { id: 'compact', label: '紧凑' }, - { id: 'comfortable', label: '舒适' }, - { id: 'spacious', label: '宽松' }, - ].map(d => ( - - ))} -
-
- - {/* Border radius */} -
- -
- {[ - { id: 'sharp', label: '直角', radius: '0px' }, - { id: 'soft', label: '圆角', radius: '6px' }, - { id: 'round', label: '大圆角', radius: '12px' }, - ].map(r => ( - - ))} -
-