feat(webui): Select/Textarea UI components + hide installed TLS cert

Add reusable Select (styled native select + chevron) and Textarea components
matching Input's design language, and replace every native <select>/<textarea>
across the app (system-panel, node-edit-dialog, notification-channel-dialog,
settings customCss, widget note) with them.

TLS cert UX: once a cert is installed, the sensitive PEM is no longer rendered
on revisit — show an '已安装(未改变)' summary with 更改/删除 buttons; 更改
reveals the inputs again (with a 取消). Private key is never sent back to the
client. Verified by tsc + vite build.
This commit is contained in:
DrSmoothl committed 2026-06-18 14:53:43 +08:00
1 parent 675261691f
commit a38b33c8aa
7 files changed
+118 -44

No files matched your search

@@ -14,6 +14,7 @@ import {
} from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
import { ToggleSwitch } from '@/components/ui/toggle-switch';
import { cn } from '@/lib/utils';
import type { NotificationChannel } from '@/types';
@@ -100,12 +101,12 @@ export function NotificationChannelDialog(props: NotificationChannelDialogProps)
<div className="flex flex-col gap-1.5">
<Label>Body 模板</Label>
<textarea
<Textarea
value={draft.bodyTemplate}
rows={3}
spellCheck={false}
onChange={(e) => patch({ bodyTemplate: e.target.value })}
className="w-full rounded-md border border-border bg-transparent px-3 py-2 font-mono text-xs leading-relaxed shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/40"
className="font-mono text-xs leading-relaxed"
/>
<p className="text-[11px] leading-relaxed text-muted-foreground">
变量:<code className="font-mono">{'{uin}'}</code> <code className="font-mono">{'{nickname}'}</code>{' '}