style(frontend): Prettier config + one-time repo-wide format pass
Prettier 3 (pinned), printWidth 100, double quotes — chosen to match the existing hand-formatting and minimise reflow. This commit is ONLY the mechanical format pass (`prettier --write`) plus the config/ignore/scripts, isolated so it never pollutes a feature diff. Verified behaviour-neutral: typecheck, eslint (0 errors), and vitest all green before and after. See .git-blame-ignore-revs — `git blame` skips this sha.
This commit is contained in:
@@ -115,9 +115,7 @@ export default function Welcome() {
|
||||
</section>
|
||||
</main>
|
||||
|
||||
{zoomed && (
|
||||
<Lightbox src={zoomed.src} label={zoomed.label} onClose={() => setZoomed(null)} />
|
||||
)}
|
||||
{zoomed && <Lightbox src={zoomed.src} label={zoomed.label} onClose={() => setZoomed(null)} />}
|
||||
|
||||
<footer className="border-t border-border py-6 text-center text-xs text-muted flex flex-col sm:flex-row gap-3 justify-center items-center">
|
||||
<span>
|
||||
@@ -305,7 +303,10 @@ function AuthCard() {
|
||||
// disappear once the config loads.
|
||||
const [googleEnabled, setGoogleEnabled] = useState(true);
|
||||
useEffect(() => {
|
||||
api.authConfig().then((c) => setGoogleEnabled(c.google_enabled)).catch(() => {});
|
||||
api
|
||||
.authConfig()
|
||||
.then((c) => setGoogleEnabled(c.google_enabled))
|
||||
.catch(() => {});
|
||||
}, []);
|
||||
const [done, setDone] = useState<string>(""); // success/info message replacing the form
|
||||
|
||||
@@ -351,7 +352,9 @@ function AuthCard() {
|
||||
setDone(t("welcome.auth.resetDone"));
|
||||
}
|
||||
} catch (err) {
|
||||
setError(err instanceof HttpError && err.detail ? err.detail : t("welcome.auth.genericError"));
|
||||
setError(
|
||||
err instanceof HttpError && err.detail ? err.detail : t("welcome.auth.genericError"),
|
||||
);
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
@@ -457,7 +460,7 @@ function AuthCard() {
|
||||
? "welcome.auth.forgotButton"
|
||||
: mode === "reset"
|
||||
? "welcome.auth.resetButton"
|
||||
: "welcome.auth.signinButton"
|
||||
: "welcome.auth.signinButton",
|
||||
)}
|
||||
</button>
|
||||
</form>
|
||||
@@ -466,15 +469,33 @@ function AuthCard() {
|
||||
<div className="flex items-center justify-between mt-3 text-xs">
|
||||
{mode === "signin" ? (
|
||||
<>
|
||||
<button onClick={() => { reset(); setMode("register"); }} className="text-accent hover:underline">
|
||||
<button
|
||||
onClick={() => {
|
||||
reset();
|
||||
setMode("register");
|
||||
}}
|
||||
className="text-accent hover:underline"
|
||||
>
|
||||
{t("welcome.auth.createLink")}
|
||||
</button>
|
||||
<button onClick={() => { reset(); setMode("forgot"); }} className="text-muted hover:text-fg">
|
||||
<button
|
||||
onClick={() => {
|
||||
reset();
|
||||
setMode("forgot");
|
||||
}}
|
||||
className="text-muted hover:text-fg"
|
||||
>
|
||||
{t("welcome.auth.forgotLink")}
|
||||
</button>
|
||||
</>
|
||||
) : (
|
||||
<button onClick={() => { reset(); setMode("signin"); }} className="text-accent hover:underline">
|
||||
<button
|
||||
onClick={() => {
|
||||
reset();
|
||||
setMode("signin");
|
||||
}}
|
||||
className="text-accent hover:underline"
|
||||
>
|
||||
{t("welcome.auth.backToSignin")}
|
||||
</button>
|
||||
)}
|
||||
@@ -534,5 +555,7 @@ function AuthCard() {
|
||||
|
||||
function Banner({ tone, children }: { tone: "ok" | "warn"; children: React.ReactNode }) {
|
||||
const cls = tone === "ok" ? "bg-accent/15 text-fg" : "bg-amber-500/15 text-fg";
|
||||
return <div className={`rounded-xl px-3 py-2 text-xs leading-relaxed mt-3 ${cls}`}>{children}</div>;
|
||||
return (
|
||||
<div className={`rounded-xl px-3 py-2 text-xs leading-relaxed mt-3 ${cls}`}>{children}</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user