Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: restore the #15731 login layout (#15903)

Michael Han5f539c9cdc18
diff --git a/studio/frontend/src/features/auth/change-password-page.tsx b/studio/frontend/src/features/auth/change-password-page.tsx
index 669a4a27f3d..40f2e3ee115 100644
--- a/studio/frontend/src/features/auth/change-password-page.tsx
+++ b/studio/frontend/src/features/auth/change-password-page.tsx
@@ -1,13 +1,15 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+import { Card } from "@/components/ui/card";
import { AuthForm } from "./components/auth-form";
-import { AuthShell } from "./components/auth-shell";
export function ChangePasswordPage() {
return (
- <AuthShell>
- <AuthForm mode="change-password" />
- </AuthShell>
+ <div className="relative flex min-h-[calc(100dvh-var(--studio-titlebar-height,0px))] items-center justify-center overflow-hidden bg-background px-4 py-8 sm:px-6 sm:py-10 md:px-10">
+ <Card className="relative z-10 w-full max-w-sm rounded-3xl px-5 py-6 shadow-[0_4px_18px_-2px_rgba(0,0,0,0.16)] ring-0 dark:shadow-[var(--composer-shadow)] sm:px-6 sm:py-8">
+ <AuthForm mode="change-password" />
+ </Card>
+ </div>
);
}
diff --git a/studio/frontend/src/features/auth/components/auth-form.tsx b/studio/frontend/src/features/auth/components/auth-form.tsx
index 9566242ee74..725a2acbf0b 100644
--- a/studio/frontend/src/features/auth/components/auth-form.tsx
+++ b/studio/frontend/src/features/auth/components/auth-form.tsx
@@ -364,8 +364,8 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
if (statusLoading && initialized === null && error === null) return null;
return (
- <div className="w-full space-y-7">
- <div className="flex flex-col items-center gap-1.5 text-center">
+ <div className="w-full max-w-sm space-y-6">
+ <div className="space-y-1.5 text-center">
<MascotImg
src={
spookySloth
@@ -375,12 +375,12 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
className="mx-auto mb-2 h-20 w-20 object-contain"
style={spookySloth?.enlarge ? { scale: "1.15" } : undefined}
/>
- <h2 className="font-semibold text-ui-28 text-foreground leading-tight tracking-[-0.02em]">{title}</h2>
- <p className="text-muted-foreground text-sm">{subtitle}</p>
+ <h2 className="text-[calc(1.5rem*var(--ui-font-scale,1))] font-semibold text-foreground">{title}</h2>
+ <p className="text-muted-foreground">{subtitle}</p>
</div>
{/* Not a live region: it re-renders every second, so it would be read aloud on every tick. */}
{deadlineAt !== null && (
- <p className="rounded-2xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-center text-sm text-amber-600">
+ <p className="rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-center text-sm text-amber-600">
{hasExpired(deadlineAt - nowMs) ? (
<>
This instance is shutting down: it was reachable on the network
@@ -396,7 +396,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
)}
</p>
)}
- <form className="space-y-4" onSubmit={handleSubmit}>
+ <form className="space-y-5" onSubmit={handleSubmit}>
{passwordManagerUsername && (
<input
type="text"
@@ -415,7 +415,6 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
<Input
id="username"
name="username"
- className="h-11 px-4"
autoComplete="username"
autoCapitalize="none"
spellCheck={false}
@@ -423,7 +422,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
onChange={(event) => setEnteredUsername(event.target.value)}
required
/>
- <p id="setup-code-hint" className="text-muted-foreground text-xs leading-relaxed">
+ <p id="setup-code-hint" className="text-sm text-muted-foreground">
First sign in? Paste the setup code your administrator gave you as the password.
</p>
<p className="text-sm text-muted-foreground">
@@ -439,7 +438,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
id="password"
aria-describedby={loginMode === "multi" ? "setup-code-hint" : undefined}
type={showPassword ? "text" : "password"}
- className="h-11 pr-11 pl-4"
+ className="pr-10"
autoComplete="current-password"
value={password}
onChange={(event) => setPassword(event.target.value)}
@@ -450,7 +449,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
type="button"
variant="ghost"
size="icon"
- className="absolute top-1/2 right-1 size-9 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-transparent hover:text-foreground"
+ className="absolute right-0 top-0 h-full px-3 text-muted-foreground hover:bg-transparent"
onClick={() => setShowPassword((prev) => !prev)}
>
{showPassword ? (
@@ -475,7 +474,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
changingFromSetupCode ? "current-setup-code-hint" : undefined
}
type={showPassword ? "text" : "password"}
- className="h-11 pr-11 pl-4"
+ className="pr-10"
autoComplete="current-password"
value={password}
onChange={(event) => setPassword(event.target.value)}
@@ -486,7 +485,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
type="button"
variant="ghost"
size="icon"
- className="absolute top-1/2 right-1 size-9 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-transparent hover:text-foreground"
+ className="absolute right-0 top-0 h-full px-3 text-muted-foreground hover:bg-transparent"
onClick={() => setShowPassword((prev) => !prev)}
>
{showPassword ? (
@@ -499,7 +498,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
{changingFromSetupCode && (
<p
id="current-setup-code-hint"
- className="text-muted-foreground text-xs leading-relaxed"
+ className="text-sm text-muted-foreground"
>
Paste the setup code you just signed in with as the current password.
</p>
@@ -512,7 +511,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
<Input
id="new-password"
type={showNewPassword ? "text" : "password"}
- className="h-11 pr-11 pl-4"
+ className="pr-10"
autoComplete="new-password"
value={newPassword}
onChange={(event) => setNewPassword(event.target.value)}
@@ -523,7 +522,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
type="button"
variant="ghost"
size="icon"
- className="absolute top-1/2 right-1 size-9 -translate-y-1/2 rounded-full text-muted-foreground hover:bg-transparent hover:text-foreground"
+ className="absolute right-0 top-0 h-full px-3 text-muted-foreground hover:bg-transparent"
onClick={() => setShowNewPassword((prev) => !prev)}
>
{showNewPassword ? (
@@ -539,7 +538,6 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
<Input
id="confirm-password"
type="password"
- className="h-11 px-4"
autoComplete="new-password"
value={confirmPassword}
onChange={(event) => setConfirmPassword(event.target.value)}
@@ -576,7 +574,8 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
<Button
variant="primary"
type="submit"
- className="mt-2 h-11 w-full bg-control-accent [font-family:var(--font-heading)] text-[0.9375rem] font-semibold tracking-[0.02em] text-control-accent-foreground hover:bg-control-accent/85"
+ size="hero"
+ className="mx-auto flex h-[2.967em] w-fit bg-control-accent px-[1.56em] pt-0 pb-[0.07em] [font-family:var(--font-heading)] text-[0.9375rem] font-semibold tracking-[0.02em] text-control-accent-foreground hover:bg-control-accent/85"
disabled={
loading ||
statusLoading ||
@@ -604,7 +603,7 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null {
{showSwitchLink && (
<p className="text-center text-sm text-muted-foreground">
{switchText}
- <Link to={switchLinkTo} className="font-medium text-primary hover:underline">
+ <Link to={switchLinkTo} className="text-primary hover:underline">
{switchLinkText}
</Link>
</p>
diff --git a/studio/frontend/src/features/auth/components/auth-shell.tsx b/studio/frontend/src/features/auth/components/auth-shell.tsx
deleted file mode 100644
index 20ac96b9cd9..00000000000
--- a/studio/frontend/src/features/auth/components/auth-shell.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: AGPL-3.0-only
-// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
-
-import { publicAssetUrl } from "@/components/mascot-img";
-import type { ReactNode } from "react";
-
-export function AuthShell({ children }: { children: ReactNode }) {
- return (
- <div className="flex min-h-[calc(100dvh-var(--studio-titlebar-height,0px))] flex-col items-center justify-center gap-6 bg-background px-4 py-10 sm:px-6">
- <div className="w-full max-w-[calc(400px*var(--ui-space-scale,1))] rounded-[28px] bg-card px-7 py-9 shadow-[0_1px_2px_rgba(0,0,0,0.04),0_12px_40px_-12px_rgba(0,0,0,0.12)] ring-1 ring-[color-mix(in_oklab,var(--foreground)_7%,transparent)] sm:px-9 sm:py-10 dark:shadow-none">
- {children}
- </div>
- <div className="flex items-center gap-1.5 text-muted-foreground text-xs">
- <img
- src={publicAssetUrl("unsloth-gem.png")}
- alt=""
- className="size-4 object-contain"
- />
- <span className="font-medium">Unsloth</span>
- </div>
- </div>
- );
-}
diff --git a/studio/frontend/src/features/auth/login-page.tsx b/studio/frontend/src/features/auth/login-page.tsx
index 047f12ee7c6..814186f17af 100644
--- a/studio/frontend/src/features/auth/login-page.tsx
+++ b/studio/frontend/src/features/auth/login-page.tsx
@@ -1,13 +1,15 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+import { Card } from "@/components/ui/card";
import { AuthForm } from "./components/auth-form";
-import { AuthShell } from "./components/auth-shell";
export function LoginPage() {
return (
- <AuthShell>
- <AuthForm mode="login" />
- </AuthShell>
+ <div className="relative flex min-h-[calc(100dvh-var(--studio-titlebar-height,0px))] items-center justify-center overflow-hidden bg-background px-4 py-8 sm:px-6 sm:py-10 md:px-10">
+ <Card className="relative z-10 w-full max-w-sm rounded-3xl px-7 py-8 shadow-[0_4px_18px_-2px_rgba(0,0,0,0.16)] ring-0 dark:shadow-[var(--composer-shadow)] sm:px-8 sm:py-10">
+ <AuthForm mode="login" />
+ </Card>
+ </div>
);
}