WebUI 前端 & 后端超级大重构

This commit is contained in:
DrSmoothl
2026-03-14 21:06:36 +08:00
parent 6ca5a2939e
commit 172615f18a
69 changed files with 3128 additions and 6581 deletions

View File

@@ -18,6 +18,7 @@ import {
} from '@/components/ui/alert-dialog'
import {
Dialog,
DialogBody,
DialogContent,
DialogDescription,
DialogHeader,
@@ -249,7 +250,7 @@ function RegexEditor({
</Button>
</DialogTrigger>
<DialogContent className="max-w-[95vw] sm:max-w-[900px] max-h-[90vh]">
<DialogContent className="max-w-[95vw] sm:max-w-225">
<DialogHeader>
<DialogTitle></DialogTitle>
<DialogDescription className="text-sm">
@@ -257,7 +258,7 @@ function RegexEditor({
</DialogDescription>
</DialogHeader>
<ScrollArea className="max-h-[calc(90vh-120px)]">
<DialogBody>
<Tabs value={activeTab} onValueChange={(v) => setActiveTab(v as 'build' | 'test')} className="w-full">
<TabsList className="grid w-full grid-cols-2">
<TabsTrigger value="build">🔧 </TabsTrigger>
@@ -406,7 +407,7 @@ function RegexEditor({
value={testText}
onChange={(e) => setTestText(e.target.value)}
placeholder="在此输入要测试的文本...&#10;例如:打游戏是这样的"
className="min-h-[100px] text-sm"
className="min-h-25 text-sm"
/>
</div>
@@ -444,7 +445,7 @@ function RegexEditor({
<div className="space-y-2">
<Label className="text-sm font-medium"></Label>
<ScrollArea className="h-40 rounded-md bg-muted p-3">
<div className="text-sm break-words">
<div className="text-sm wrap-break-word">
{renderHighlightedText()}
</div>
</ScrollArea>
@@ -458,7 +459,7 @@ function RegexEditor({
<div className="space-y-2">
{Object.entries(captureGroups).map(([name, value]) => (
<div key={name} className="flex items-start gap-2 text-sm">
<span className="font-mono font-semibold text-primary min-w-[80px]">[{name}]</span>
<span className="font-mono font-semibold text-primary min-w-20">[{name}]</span>
<span className="text-muted-foreground">=</span>
<span className="font-mono bg-muted px-2 py-0.5 rounded">{value}</span>
</div>
@@ -473,7 +474,7 @@ function RegexEditor({
<div className="space-y-2">
<Label className="text-sm font-medium">Reaction </Label>
<ScrollArea className="h-48 rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3">
<div className="text-sm break-words">
<div className="text-sm wrap-break-word">
{replacedReaction}
</div>
</ScrollArea>
@@ -497,7 +498,7 @@ function RegexEditor({
</div>
</TabsContent>
</Tabs>
</ScrollArea>
</DialogBody>
</DialogContent>
</Dialog>
)
@@ -628,7 +629,7 @@ export const ProcessingSection = React.memo(function ProcessingSection({
</Button>
</PopoverTrigger>
<PopoverContent className="w-[95vw] sm:w-[500px]">
<PopoverContent className="w-[95vw] sm:w-125">
<div className="space-y-2">
<h4 className="font-medium text-sm"></h4>
<ScrollArea className="h-60 rounded-md bg-muted p-3">
@@ -656,7 +657,7 @@ export const ProcessingSection = React.memo(function ProcessingSection({
</Button>
</PopoverTrigger>
<PopoverContent className="w-[95vw] sm:w-[500px]">
<PopoverContent className="w-[95vw] sm:w-125">
<div className="space-y-2">
<h4 className="font-medium text-sm"></h4>
<ScrollArea className="h-60 rounded-md bg-muted p-3">