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

@@ -16,6 +16,7 @@ import {
} from '@/components/ui/dialog';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Select } from '@/components/ui/select';
import { cn } from '@/lib/utils';
import type {
HttpClientNetwork,
@@ -447,17 +448,13 @@ function SelectField<T extends string>({
return (
<div className="flex flex-col gap-1.5">
<Label>{label}</Label>
<select
value={value}
onChange={(e) => onChange(e.target.value as T)}
className="h-9 rounded-md border bg-background px-2 text-sm shadow-xs"
>
<Select value={value} onChange={(e) => onChange(e.target.value as T)}>
{options.map((opt) => (
<option key={opt.value} value={opt.value}>
{opt.label}
</option>
))}
</select>
</Select>
</div>
);
}