refactor(dashboard): 优化配置页面布局和交互

- 移除 AlertDialog 中的 Info 图标和触发器
- 在卡片标题下添加配置保存提示文本
- 调整配置页面按钮和布局结构
- 简化页面组件和图标导入
This commit is contained in:
wood chen 2025-03-12 19:19:12 +08:00
parent 07e63eea5f
commit 2626f63770

View File

@ -25,7 +25,7 @@ import {
} from "@/components/ui/dialog" } from "@/components/ui/dialog"
import { Switch } from "@/components/ui/switch" import { Switch } from "@/components/ui/switch"
import { Slider } from "@/components/ui/slider" import { Slider } from "@/components/ui/slider"
import { Plus, Trash2, Edit, Save, Download, Upload, Info } from "lucide-react" import { Plus, Trash2, Edit, Save, Download, Upload } from "lucide-react"
import { import {
AlertDialog, AlertDialog,
AlertDialogAction, AlertDialogAction,
@ -35,7 +35,6 @@ import {
AlertDialogFooter, AlertDialogFooter,
AlertDialogHeader, AlertDialogHeader,
AlertDialogTitle, AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog" } from "@/components/ui/alert-dialog"
interface PathMapping { interface PathMapping {
@ -572,17 +571,12 @@ export default function ConfigPage() {
return ( return (
<div className="space-y-6"> <div className="space-y-6">
<Card> <Card>
<CardHeader className="flex flex-row items-center justify-between"> <CardHeader>
<div className="flex flex-row items-center justify-between">
<div>
<CardTitle>Proxy Go配置</CardTitle> <CardTitle>Proxy Go配置</CardTitle>
<AlertDialog> <p className="text-sm text-muted-foreground mt-1"></p>
<AlertDialogTrigger asChild> </div>
<Button variant="outline">
<Info className="w-4 h-4 mr-2" />
</Button>
</AlertDialogTrigger>
<AlertDialogContent></AlertDialogContent>
</AlertDialog>
<div className="flex space-x-2"> <div className="flex space-x-2">
<Button onClick={exportConfig} variant="outline"> <Button onClick={exportConfig} variant="outline">
<Download className="w-4 h-4 mr-2" /> <Download className="w-4 h-4 mr-2" />
@ -605,6 +599,7 @@ export default function ConfigPage() {
{saving ? "保存中..." : "保存配置"} {saving ? "保存中..." : "保存配置"}
</Button> </Button>
</div> </div>
</div>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<Tabs defaultValue="paths" className="space-y-4"> <Tabs defaultValue="paths" className="space-y-4">