feat(design): the field family, the dropdown trigger, native controls, the no-raw-input lint rule (E28 S3c)
- ui/Input, Textarea, InnerInput + fieldClass (A4): the >= 3:1 edge, a 2px accent focus edge, the danger edge for invalid, md/sm/xs/heading rungs, 1rem and 44 on touch - ui/SelectTrigger (A5): SortControl, FilterSelect, the view switcher and the date filter on one trigger, a pill in a toolbar, r8 in a form - ui/NativeControls (A6): Checkbox, CheckRow, Slider, ColorInput - every raw input swept (~100 sites); inputCls retired; local/input-primitive - useReturnFocus: an in-place editor hands the focus back to its trigger on Enter/Escape (the playlist and Plex title renames, the priority number); the Plex playlist rename gains Escape and an accessible name - back to top: a round 48 FAB (owner decision); DESIGN.md A2 and the log
This commit is contained in:
@@ -5,7 +5,7 @@ import { api, HttpError } from "../lib/api";
|
||||
import { setLanguage, type LangCode } from "../i18n";
|
||||
import LanguageSwitcher from "./LanguageSwitcher";
|
||||
import { Button } from "./ui/Button";
|
||||
import { inputCls } from "./ui/form";
|
||||
import { Input } from "./ui/Input";
|
||||
|
||||
// First-run install wizard. Shown by App.tsx while the instance is unconfigured. The one-time
|
||||
// setup token comes from the URL the app printed to the container logs (?token=…); every step
|
||||
@@ -165,38 +165,38 @@ export default function SetupWizard() {
|
||||
|
||||
{step === "admin" && (
|
||||
<Section title={t("setup.admin.title")} desc={t("setup.admin.desc")}>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
type="email"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
placeholder={t("setup.admin.email")}
|
||||
autoComplete="username"
|
||||
className={inputCls}
|
||||
/>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder={t("setup.admin.password", { n: PASSWORD_MIN })}
|
||||
autoComplete="new-password"
|
||||
className={inputCls}
|
||||
/>
|
||||
</Section>
|
||||
)}
|
||||
|
||||
{step === "google" && (
|
||||
<Section title={t("setup.google.title")} desc={t("setup.google.desc")}>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
value={gid}
|
||||
onChange={(e) => setGid(e.target.value)}
|
||||
placeholder={t("setup.google.clientId")}
|
||||
className={inputCls}
|
||||
/>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
value={gsecret}
|
||||
onChange={(e) => setGsecret(e.target.value)}
|
||||
placeholder={t("setup.google.clientSecret")}
|
||||
className={inputCls}
|
||||
/>
|
||||
<p className="text-xs text-muted">{t("setup.google.skipHint")}</p>
|
||||
</Section>
|
||||
@@ -204,46 +204,46 @@ export default function SetupWizard() {
|
||||
|
||||
{step === "smtp" && (
|
||||
<Section title={t("setup.smtp.title")} desc={t("setup.smtp.desc")}>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
value={smtp.host}
|
||||
onChange={(e) => setSmtp({ ...smtp, host: e.target.value })}
|
||||
placeholder={t("setup.smtp.host")}
|
||||
className={inputCls}
|
||||
/>
|
||||
<div className="flex gap-2">
|
||||
<input
|
||||
<Input
|
||||
className="w-24"
|
||||
value={smtp.port}
|
||||
onChange={(e) => setSmtp({ ...smtp, port: e.target.value })}
|
||||
placeholder={t("setup.smtp.port")}
|
||||
className={`${inputCls} w-24`}
|
||||
/>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
value={smtp.user}
|
||||
onChange={(e) => setSmtp({ ...smtp, user: e.target.value })}
|
||||
placeholder={t("setup.smtp.user")}
|
||||
className={inputCls}
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
value={smtp.from}
|
||||
onChange={(e) => setSmtp({ ...smtp, from: e.target.value })}
|
||||
placeholder={t("setup.smtp.from")}
|
||||
className={inputCls}
|
||||
/>
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
type="password"
|
||||
value={smtp.password}
|
||||
onChange={(e) => setSmtp({ ...smtp, password: e.target.value })}
|
||||
placeholder={t("setup.smtp.password")}
|
||||
className={inputCls}
|
||||
/>
|
||||
{smtp.host.trim() && (
|
||||
<div className="flex items-center gap-2 pt-1">
|
||||
<input
|
||||
<Input
|
||||
className="w-full"
|
||||
value={testTo}
|
||||
onChange={(e) => setTestTo(e.target.value)}
|
||||
placeholder={t("setup.smtp.testTo")}
|
||||
className={inputCls}
|
||||
/>
|
||||
<Button
|
||||
variant="glass"
|
||||
|
||||
Reference in New Issue
Block a user