feat: add Jellyfin profile authentication

This commit is contained in:
WonderAliceUwU committed 2026-09-06 21:59:07 +02:00
1 parent 2095730eee
commit 0d86c6e91c
8 files changed
+771 -157

No files matched your search

+265 -76
View File
@@ -31,7 +31,7 @@ import {
type TitleDetailsResponse,
} from '../shared/contracts'
type AuthState = 'loading' | 'setup' | 'login' | 'app'
type AuthState = 'loading' | 'setup' | 'login' | 'profiles' | 'admin' | 'app'
type EntryStage = 'onboarding' | 'profiles' | 'dashboard'
type EntryTransitionState = 'idle' | 'forward-enter' | 'forward-exit' | 'back-enter' | 'back-exit'
const MAX_CACHED_HUB_PAGES = 3
@@ -67,6 +67,7 @@ const networkSidebarItems: Array<{ route: AppRoute; label: string; icon: string;
function App() {
const [authState, setAuthState] = useState<AuthState>('loading')
const [sessionRole, setSessionRole] = useState<'admin' | 'user' | null>(null)
const [entryStage, setEntryStage] = useState<EntryStage>('profiles')
const [route, setRoute] = useState<AppRoute>('home')
const [busy, setBusy] = useState(false)
@@ -171,18 +172,21 @@ function App() {
}
if (!session.authenticated) {
setAuthState('login')
const profiles = await api.getProfiles()
if (cancelled) return
setOptions((current) => ({ ...current, jellyfinUsers: profiles.jellyfinUsers }))
setConnections(profiles.connections)
setAuthState('profiles')
return
}
setSessionRole(session.role ?? null)
await refreshBaseData()
if (!cancelled) {
setAuthState('app')
}
if (!cancelled) setAuthState(session.role === 'admin' ? 'admin' : 'app')
} catch (bootError) {
if (!cancelled) {
setError(bootError instanceof Error ? bootError.message : 'Failed to start OmniArr.')
setAuthState('login')
setAuthState('profiles')
}
}
}
@@ -258,10 +262,13 @@ function App() {
}
await refreshBaseData()
setPassword('')
setSessionRole('admin')
if (authState === 'setup') {
setNotice('Instance initialized.')
} else {
setRoute('settings')
}
setAuthState('app')
setAuthState(authState === 'setup' ? 'app' : 'admin')
} catch (authError) {
setError(authError instanceof Error ? authError.message : 'Authentication failed.')
} finally {
@@ -288,23 +295,17 @@ function App() {
}
}
async function handleSelectJellyfinUser(userId: string) {
async function handleSelectJellyfinUser(userId: string, jellyfinPassword: string) {
setBusy(true)
setError('')
setNotice('')
try {
const nextConfig = {
...config,
jellyfin: {
...config.jellyfin,
userId,
},
}
const response = await api.saveSettings(nextConfig)
setConfig(response.config)
await api.loginProfile({ userId, password: jellyfinPassword })
setSessionRole('user')
await refreshBaseData()
await transitionEntryStage('dashboard')
setRoute('home')
setAuthState('app')
} catch (selectError) {
setError(selectError instanceof Error ? selectError.message : 'Failed to select Jellyfin profile.')
} finally {
@@ -422,12 +423,11 @@ function App() {
return <LoadingScreen />
}
if (authState === 'setup' || authState === 'login') {
if (authState === 'setup') {
return (
<AuthScreen
busy={busy}
error={error}
mode={authState}
onSubmit={handleAuthSubmit}
password={password}
setPassword={setPassword}
@@ -435,6 +435,50 @@ function App() {
)
}
if (authState === 'login') {
return (
<AdministrationLoginScreen
busy={busy}
error={error}
onBack={() => { setPassword(''); setAuthState('profiles') }}
onSubmit={handleAuthSubmit}
password={password}
setPassword={setPassword}
/>
)
}
if (authState === 'profiles') {
return (
<ProfileSelectionScreen
busy={busy}
currentUserId=""
hasServiceFailure={connections.some((connection) => !connection.ok)}
error={error}
notice={notice}
onAdmin={() => setAuthState(sessionRole === 'admin' ? 'admin' : 'login')}
onSelectUser={handleSelectJellyfinUser}
users={options.jellyfinUsers}
/>
)
}
if (authState === 'admin') {
return (
<AdministrationScreen
busy={busy}
config={config}
connections={connections}
jellyfinUsersBusy={jellyfinUsersBusy}
onExit={() => setAuthState('profiles')}
onLoadJellyfinUsers={handleLoadJellyfinUsers}
onSave={handleSaveSettings}
options={options}
updateConfig={updateConfig}
/>
)
}
if (entryStage === 'onboarding') {
return (
<JellyfinOnboardingScreen
@@ -460,10 +504,12 @@ function App() {
<div className={getEntryTransitionClassName(entryTransitionState)}>
<ProfileSelectionScreen
busy={busy}
currentUserId={config.jellyfin.userId}
currentUserId={sessionRole === 'user' ? config.jellyfin.userId : ''}
hasServiceFailure={connections.some((connection) => !connection.ok)}
error={error}
notice={notice}
onBackToOnboarding={() => void transitionEntryStage('onboarding')}
onAdmin={() => setAuthState(sessionRole === 'admin' ? 'admin' : 'login')}
onContinue={() => void transitionEntryStage('dashboard')}
onSelectUser={handleSelectJellyfinUser}
users={options.jellyfinUsers}
/>
@@ -471,8 +517,9 @@ function App() {
)
}
const currentJellyfinUser =
options.jellyfinUsers.find((option) => option.id === config.jellyfin.userId)?.label || 'Media cockpit'
const currentJellyfinUser = sessionRole === 'admin'
? 'Administration'
: options.jellyfinUsers.find((option) => option.id === config.jellyfin.userId)?.label || 'Media cockpit'
const currentHub = route !== 'downloads' && route !== 'settings' && route !== 'calendar' && route !== 'search' ? hubPages[route as HubPageResponse['page']] : undefined
return (
@@ -483,6 +530,7 @@ function App() {
currentUser={currentJellyfinUser}
diskSpace={diskSpace}
onExitProfile={() => void transitionEntryStage('profiles')}
canManage={sessionRole === 'admin'}
route={route}
setRoute={setRoute}
/>
@@ -564,6 +612,7 @@ function Sidebar(props: {
diskSpace: DiskSpaceStatus | null
connections: ConnectionStatus[]
busy: boolean
canManage: boolean
onExitProfile: () => void
}) {
const [menuOpen, setMenuOpen] = useState(false)
@@ -673,7 +722,7 @@ function Sidebar(props: {
<div className="sidebar-footer">
{props.diskSpace ? <DiskSpaceIndicator diskSpace={props.diskSpace} /> : null}
<button className="ghost-button sidebar-settings" onClick={() => navigate('settings')} type="button">
{props.canManage ? <button className="ghost-button sidebar-settings" onClick={() => navigate('settings')} type="button">
<span className="sidebar-settings-icon" aria-hidden="true">
<SettingsGlyph />
<span
@@ -683,6 +732,7 @@ function Sidebar(props: {
</span>
<span>Settings</span>
</button>
: null}
</div>
</div>
</aside>
@@ -817,14 +867,12 @@ function ActionButton(props: {
}
function AuthScreen({
mode,
password,
setPassword,
onSubmit,
busy,
error,
}: {
mode: 'setup' | 'login'
password: string
setPassword: (value: string) => void
onSubmit: () => Promise<void>
@@ -832,7 +880,6 @@ function AuthScreen({
error: string
}) {
const isPasswordValid = password.trim().length >= 8
const isSetup = mode === 'setup'
function handleSubmit() {
if (busy || !isPasswordValid) {
@@ -843,15 +890,11 @@ function AuthScreen({
}
return (
<div className={isSetup ? 'auth-layout' : 'auth-layout auth-layout-login'}>
<section className={isSetup ? 'auth-panel' : 'auth-panel auth-panel-login'}>
<div className="auth-layout">
<section className="auth-panel">
<div className="auth-panel-shell">
<h1>{isSetup ? 'Create your master password' : 'Sign in to OmniArr'}</h1>
<p className="auth-copy">
{isSetup
? 'This password protects the session and encrypts service settings on the server.'
: 'Unlock the server session with your master password.'}
</p>
<h1>Create your master password</h1>
<p className="auth-copy">This password protects the administration area and service settings.</p>
</div>
<div className="auth-form-card">
<form
@@ -862,45 +905,39 @@ function AuthScreen({
}}
>
<label>
{isSetup ? 'Master password' : 'Password'}
Master password
<input
autoComplete={isSetup ? 'new-password' : 'current-password'}
autoComplete="new-password"
className="input"
minLength={8}
onChange={(event) => setPassword(event.target.value)}
placeholder={isSetup ? 'At least 8 characters' : ''}
placeholder="At least 8 characters"
type="password"
value={password}
/>
</label>
{isSetup && !isPasswordValid && password.length > 0 ? <p className="helper-text">Password must be at least 8 non-space characters.</p> : null}
{!isPasswordValid && password.length > 0 ? <p className="helper-text">Password must be at least 8 non-space characters.</p> : null}
{error ? <p className="error-banner">{error}</p> : null}
{busy ? <p className="notice">Contacting backend…</p> : null}
<button className="primary-button" disabled={busy || !isPasswordValid} type="submit">
{busy ? 'Processing…' : isSetup ? 'Initialize' : 'Sign in'}
{busy ? 'Processing…' : 'Initialize'}
</button>
</form>
</div>
</section>
{isSetup ? (
<section className="auth-visual">
<div className="auth-wallpaper" />
<div className="glass-card">
<p className="eyebrow">Migration</p>
<ul className="feature-list">
<li>Server-side session auth</li>
<li>Encrypted persisted settings</li>
<li>Jellyfin, Sonarr and Radarr</li>
<li>Rebuilt React UI with shared layout</li>
</ul>
</div>
</section>
) : (
<section className="auth-visual auth-visual-login" aria-hidden="true">
<div className="auth-wallpaper" />
</section>
)}
<section className="auth-visual">
<div className="auth-wallpaper" />
<div className="glass-card">
<p className="eyebrow">Migration</p>
<ul className="feature-list">
<li>Server-side session auth</li>
<li>Encrypted persisted settings</li>
<li>Jellyfin, Sonarr and Radarr</li>
<li>Rebuilt React UI with shared layout</li>
</ul>
</div>
</section>
</div>
)
}
@@ -947,7 +984,7 @@ function JellyfinOnboardingScreen(props: {
<div className="profile-grid compact">
{props.users.map((user) => (
<div className="profile-card static" key={user.id}>
<div className="profile-avatar">{user.label.slice(0, 1).toUpperCase()}</div>
<ProfileAvatar user={user} />
<strong>{user.label}</strong>
</div>
))}
@@ -961,43 +998,152 @@ function JellyfinOnboardingScreen(props: {
function ProfileSelectionScreen(props: {
users: SelectOption[]
currentUserId: string
hasServiceFailure: boolean
busy: boolean
error: string
notice: string
onSelectUser: (userId: string) => Promise<void>
onBackToOnboarding: () => void
onSelectUser: (userId: string, password: string) => Promise<void>
onAdmin: () => void
onContinue?: () => void
}) {
const [selectedUserId, setSelectedUserId] = useState('')
const [password, setPassword] = useState('')
const [isReturning, setIsReturning] = useState(false)
const [hasReturned, setHasReturned] = useState(false)
const [isSelecting, setIsSelecting] = useState(false)
const [isEntering, setIsEntering] = useState(false)
function submit() {
if (selectedUserId && password) {
void props.onSelectUser(selectedUserId, password)
}
}
function goBack() {
setIsReturning(true)
window.setTimeout(() => {
setSelectedUserId('')
setPassword('')
setIsReturning(false)
setHasReturned(true)
window.setTimeout(() => setHasReturned(false), 520)
}, 240)
}
function selectProfile(userId: string) {
setIsSelecting(true)
window.setTimeout(() => {
setSelectedUserId(userId)
setIsSelecting(false)
setIsEntering(true)
window.setTimeout(() => setIsEntering(false), 520)
}, 240)
}
const selectedUser = props.users.find((user) => user.id === selectedUserId)
return (
<div className="profiles-layout">
<div className={selectedUser ? `profiles-layout is-profile-login${isReturning ? ' is-returning' : ''}${isEntering ? ' is-entering' : ''}` : `profiles-layout${hasReturned ? ' is-profile-return' : ''}${isSelecting ? ' is-profile-selecting' : ''}`}>
<div className="profiles-header">
<p className="eyebrow">Profiles</p>
<h1>Who&apos;s watching?</h1>
<h1>{selectedUser ? `Sign in as ${selectedUser.label}` : 'Who\'s watching?'}</h1>
{props.error ? <p className="error-banner">{props.error}</p> : null}
{props.notice ? <p className="notice">{props.notice}</p> : null}
</div>
<div className="profile-grid">
{selectedUser ? <ProfileLoginForm busy={props.busy} icon={<ProfileAvatar user={selectedUser} />} onBack={goBack} onSubmit={submit} password={password} placeholder="Enter the password" setPassword={setPassword} /> : <div className="profile-grid">
{props.users.map((user) => (
<button
className={user.id === props.currentUserId ? 'profile-card active' : 'profile-card'}
disabled={props.busy}
disabled={props.busy || isSelecting}
key={user.id}
onClick={() => void props.onSelectUser(user.id)}
onClick={() => {
if (user.id === props.currentUserId) {
props.onContinue?.()
} else {
selectProfile(user.id)
}
}}
type="button"
>
<div className="profile-avatar">{user.label.slice(0, 1).toUpperCase()}</div>
<ProfileAvatar user={user} />
<strong>{user.label}</strong>
{user.id === props.currentUserId ? <span className="profile-active-check" aria-label="Current profile">✓</span> : null}
</button>
))}
</div>
<div className="profiles-actions">
<button className="ghost-button" onClick={props.onBackToOnboarding} type="button">
Edit Jellyfin connection
</div>}
{!selectedUser ? <div className="profiles-actions">
<button aria-label="Administration" className="profile-admin-button" onClick={props.onAdmin} title="Administration" type="button">
<span className="profile-admin-icon">
<SettingsGlyph />
<span className={props.hasServiceFailure ? 'profile-admin-status down' : 'profile-admin-status ok'} />
</span>
</button>
</div>
</div> : null}
</div>
)
}
function ProfileAvatar({ user }: { user: SelectOption }) {
return <div className="profile-avatar">{user.imageUrl ? <img alt="" src={user.imageUrl} /> : user.label.slice(0, 1).toUpperCase()}</div>
}
function AdministrationLoginScreen(props: {
busy: boolean
error: string
password: string
setPassword: (value: string) => void
onBack: () => void
onSubmit: () => Promise<void>
}) {
const [isReturning, setIsReturning] = useState(false)
function goBack() {
setIsReturning(true)
window.setTimeout(props.onBack, 240)
}
return (
<div className={`profiles-layout is-profile-login is-entering${isReturning ? ' is-returning' : ''}`}>
<div className="profiles-header">
<h1>Administration</h1>
{props.error ? <p className="error-banner">{props.error}</p> : null}
</div>
<ProfileLoginForm busy={props.busy} icon={<div className="administration-login-icon"><SettingsGlyph /></div>} onBack={goBack} onSubmit={() => { void props.onSubmit() }} password={props.password} placeholder="Enter the master password" setPassword={props.setPassword} />
</div>
)
}
function ProfileLoginForm(props: {
busy: boolean
icon: ReactNode
password: string
placeholder: string
setPassword: (value: string) => void
onBack: () => void
onSubmit: () => void
}) {
return (
<form className="profile-login-form" onSubmit={(event) => { event.preventDefault(); props.onSubmit() }}>
{props.icon}
<label>
<input autoComplete="current-password" autoFocus className="input" onChange={(event) => props.setPassword(event.target.value)} placeholder={props.placeholder} type="password" value={props.password} />
</label>
<div className="profile-login-actions">
<button aria-label="Back to profiles" className="profile-login-back" onClick={props.onBack} title="Back to profiles" type="button"><ArrowLeftGlyph /></button>
<button aria-label="Sign in" className="profile-login-submit" disabled={props.busy || !props.password} title="Sign in" type="submit"><SignInGlyph /></button>
</div>
</form>
)
}
function SignInGlyph() {
return (
<svg aria-hidden="true" className="sidebar-glyph-icon" fill="none" viewBox="0 0 16 16">
<path d="M9.7 2.5H4.3A1.3 1.3 0 0 0 3 3.8v8.4a1.3 1.3 0 0 0 1.3 1.3h5.4" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1.4" />
<path d="M8 8h5M10.85 5.15 13.7 8l-2.85 2.85" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1.4" />
</svg>
)
}
function HubPageView(props: {
route: AppRoute
hub?: HubPageResponse
@@ -3159,6 +3305,47 @@ function formatCalendarTime(startsAt: string) {
}).format(date)
}
function AdministrationScreen(props: {
config: AppConfig
connections: ConnectionStatus[]
jellyfinUsersBusy: boolean
onExit: () => void
onLoadJellyfinUsers: () => Promise<void>
updateConfig: <K extends keyof AppConfig>(key: K, value: AppConfig[K]) => void
options: ServiceOptionsResponse
onSave: (event: FormEvent<HTMLFormElement>) => Promise<void>
busy: boolean
}) {
return (
<div className="administration-layout">
<header className="administration-header">
<button aria-label="Back to profiles" className="administration-back-button" onClick={props.onExit} title="Back to profiles" type="button">
<ArrowLeftGlyph />
</button>
<div>
<p className="eyebrow">Administration</p>
<h1>Settings</h1>
</div>
<button aria-label="Save settings" className={props.busy ? 'administration-save-button is-saving' : 'administration-save-button'} disabled={props.busy} form="administration-settings" title="Save settings" type="submit">
<CheckGlyph />
</button>
</header>
<SettingsView
busy={props.busy}
config={props.config}
connections={props.connections}
jellyfinUsersBusy={props.jellyfinUsersBusy}
onLoadJellyfinUsers={props.onLoadJellyfinUsers}
onSave={props.onSave}
options={props.options}
formId="administration-settings"
showSubmit={false}
updateConfig={props.updateConfig}
/>
</div>
)
}
function SettingsView(props: {
config: AppConfig
connections: ConnectionStatus[]
@@ -3168,9 +3355,11 @@ function SettingsView(props: {
options: ServiceOptionsResponse
onSave: (event: FormEvent<HTMLFormElement>) => Promise<void>
busy: boolean
formId?: string
showSubmit?: boolean
}) {
return (
<form className="settings-page" onSubmit={(event) => void props.onSave(event)}>
<form className="settings-page" id={props.formId} onSubmit={(event) => void props.onSave(event)}>
<SettingsCard title="Connections">
<div className="settings-connections">
{props.connections.map((connection) => (
@@ -3249,11 +3438,11 @@ function SettingsView(props: {
</label>
</SettingsCard>
<div className="actions-row">
{props.showSubmit !== false ? <div className="actions-row">
<button className="primary-button" disabled={props.busy} type="submit">
{props.busy ? 'Saving…' : 'Save settings'}
</button>
</div>
</div> : null}
</form>
)
}
+8
View File
@@ -3,10 +3,12 @@ import type {
AuthPayload,
AuthResponse,
CalendarResponse,
ConnectionStatus,
DashboardResponse,
DiskSpaceStatus,
DownloadsResponse,
HubPageResponse,
JellyfinLoginPayload,
MediaCard,
SearchResponse,
ServiceOptionsResponse,
@@ -67,6 +69,12 @@ export const api = {
method: 'POST',
body: JSON.stringify(payload),
}),
getProfiles: () => request<{ jellyfinUsers: ServiceOptionsResponse['jellyfinUsers']; connections: ConnectionStatus[] }>('/api/auth/profiles'),
loginProfile: (payload: JellyfinLoginPayload) =>
request<AuthResponse>('/api/auth/profile-login', {
method: 'POST',
body: JSON.stringify(payload),
}),
logout: () =>
request<AuthResponse>('/api/auth/logout', {
method: 'POST',
+312 -42
View File
@@ -20,7 +20,7 @@ body,
#root {
height: 100%;
margin: 0;
overflow: hidden;
overflow: visible;
}
body {
@@ -1878,7 +1878,7 @@ img {
display: grid;
grid-template-columns: minmax(0, 52rem) auto;
align-items: end;
gap: 1.25rem;
gap: 1rem;
}
.title-details-summary-copy {
@@ -3155,7 +3155,7 @@ img {
.download-row {
display: grid;
grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
gap: 1.25rem;
gap: 2rem;
padding: 1.1rem;
border-radius: 1.35rem;
background: rgba(255, 255, 255, 0.045);
@@ -3454,14 +3454,6 @@ img {
linear-gradient(180deg, #05070b, #090c12 42%, #06080d 100%);
}
.auth-layout-login {
position: relative;
grid-template-columns: minmax(0, 34rem);
justify-content: center;
align-content: center;
padding: 2rem;
}
.auth-panel,
.auth-visual {
padding: 3rem;
@@ -3473,13 +3465,6 @@ img {
gap: 1.25rem;
}
.auth-panel-login {
position: relative;
z-index: 1;
min-height: auto;
padding: 0;
}
.auth-panel-shell {
display: grid;
gap: 1rem;
@@ -3522,15 +3507,6 @@ img {
url('/omniarr/server-wallpaper.png') center/cover no-repeat;
}
.auth-visual-login {
position: fixed;
inset: 0;
z-index: 0;
padding: 0;
opacity: 0.6;
mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.88) 18%, #000 100%);
}
.glass-card {
position: relative;
z-index: 1;
@@ -3576,7 +3552,8 @@ img {
}
.profiles-layout {
min-height: 100vh;
height: 100%;
overflow-y: auto;
display: grid;
align-content: center;
gap: 2rem;
@@ -3595,31 +3572,253 @@ img {
font-family: var(--font-display);
}
.profiles-layout.is-profile-login.is-entering .profiles-header,
.profiles-layout.is-profile-login.is-entering .profile-login-form {
animation: entryStageForwardEnter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.profiles-layout.is-profile-login.is-returning .profiles-header,
.profiles-layout.is-profile-login.is-returning .profile-login-form {
animation: entryStageBackExit 240ms cubic-bezier(0.32, 0.9, 0.42, 1) both;
}
.profiles-layout.is-profile-return .profiles-header,
.profiles-layout.is-profile-return .profile-grid,
.profiles-layout.is-profile-return .profiles-actions {
animation: entryStageBackEnter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.profiles-layout.is-profile-selecting .profiles-header,
.profiles-layout.is-profile-selecting .profile-grid,
.profiles-layout.is-profile-selecting .profiles-actions {
animation: entryStageForwardExit 240ms cubic-bezier(0.32, 0.9, 0.42, 1) both;
}
.profile-login-back {
display: grid;
place-items: center;
width: 2.6rem;
height: 2.6rem;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 999px;
background: rgba(255, 255, 255, 0.07);
color: #f5f7fb;
}
.profile-login-actions {
display: flex;
justify-content: space-between;
width: 100%;
}
.profile-login-submit {
display: grid;
place-items: center;
width: 2.6rem;
height: 2.6rem;
border: 0;
border-radius: 999px;
background: #68d391;
color: #07120d;
box-shadow: 0 0.35rem 1.1rem rgba(104, 211, 145, 0.28);
}
.profile-login-submit:hover {
filter: brightness(1.08);
transform: translateX(0.1rem);
}
.profile-login-back:hover {
background: rgba(255, 255, 255, 0.16);
transform: translateX(-0.15rem);
}
.profile-login-form {
display: grid;
justify-items: center;
gap: 1.15rem;
width: min(25rem, 100%);
margin: 0 auto;
padding: 1.5rem;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 1.5rem;
background: rgba(8, 12, 18, 0.72);
}
.profile-login-form label {
display: grid;
gap: 0.55rem;
width: 100%;
color: #c9d5e6;
}
.administration-login-icon {
display: grid;
place-items: center;
width: 4.5rem;
height: 4.5rem;
border-radius: 999px;
background: rgba(255, 255, 255, 0.1);
color: #e8edf8;
}
.administration-login-icon .sidebar-glyph-icon {
width: 1.7rem;
height: 1.7rem;
}
.profiles-actions {
display: flex;
justify-content: center;
}
.profile-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(10rem, 12rem));
justify-content: center;
gap: 1.25rem;
.administration-layout {
height: 100%;
overflow-y: auto;
padding: clamp(1.5rem, 5vw, 4rem);
background: #080c12;
}
.profile-grid.compact {
grid-template-columns: repeat(auto-fit, minmax(8rem, 10rem));
.administration-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
max-width: 76rem;
margin: 0 auto 2rem;
}
.administration-header h1 {
margin: 0.25rem 0 0;
font-family: var(--font-display);
}
.administration-back-button {
display: grid;
place-items: center;
width: 2.9rem;
height: 2.9rem;
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
color: #f5f7fb;
}
.administration-back-button:hover {
background: rgba(255, 255, 255, 0.18);
box-shadow: -3px 6px 13px rgba(0, 0, 0, 0.25);
}
.administration-save-button {
display: grid;
place-items: center;
width: 2.9rem;
height: 2.9rem;
border: 0;
border-radius: 999px;
background: #68d391;
color: #07120d;
box-shadow: 0 0.35rem 1.1rem rgba(104, 211, 145, 0.28);
transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.administration-save-button svg {
width: 1.35rem;
height: 1.35rem;
}
.administration-save-button:hover {
filter: brightness(1.08);
transform: scale(1.08);
box-shadow: 0 0.5rem 1.4rem rgba(104, 211, 145, 0.46);
}
.administration-save-button.is-saving {
animation: administration-save-pulse 700ms ease-in-out infinite alternate;
}
.administration-save-button.is-saving svg {
animation: administration-save-check 700ms ease-in-out infinite;
}
@keyframes administration-save-pulse {
from { box-shadow: 0 0 0 0 rgba(104, 211, 145, 0.48); }
to { box-shadow: 0 0 0 0.65rem rgba(104, 211, 145, 0); }
}
@keyframes administration-save-check {
0%, 100% { transform: scale(1); }
50% { transform: scale(0.72) rotate(-10deg); }
}
.profile-admin-button {
display: grid;
place-items: center;
width: 2.9rem;
height: 2.9rem;
border: 0;
background: transparent;
color: #f5f7fb;
cursor: pointer;
}
.profile-admin-icon {
position: relative;
display: grid;
place-items: center;
width: 2rem;
height: 2rem;
border-radius: 0.7rem;
background: rgba(255, 255, 255, 0.1);
color: #e8edf8;
}
.profile-admin-icon .sidebar-glyph-icon {
width: 1rem;
height: 1rem;
}
.profile-admin-status {
position: absolute;
inset: -0.2rem;
border: 0.12rem solid currentColor;
border-radius: 999px;
pointer-events: none;
}
.profile-admin-status.ok { color: #59df8a; }
.profile-admin-status.down { color: #ff5d73; }
.profile-admin-button:hover {
transform: scale(1.04);
}
.profile-admin-button:hover .profile-admin-status {
box-shadow: 0 0 0.65rem currentColor;
}
.profile-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr));
justify-content: center;
gap: 2rem;
width: min(100%, 72rem);
margin: 0 auto;
}
.profile-card {
position: relative;
display: grid;
gap: 0.85rem;
justify-items: center;
padding: 1.25rem;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 1.5rem;
background: rgba(8, 12, 18, 0.72);
padding: 0.75rem;
border: 0;
border-radius: 1rem;
background: transparent;
color: #eef4ff;
transition: color 220ms ease;
}
.profile-card.static {
@@ -3627,8 +3826,15 @@ img {
}
.profile-card.active {
border-color: rgba(255, 209, 102, 0.45);
box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.24) inset;
box-shadow: none;
}
.profile-card:not(:disabled):hover .profile-avatar {
transform: scale(1.08);
}
.profile-card:not(:disabled):hover strong {
color: #ffffff;
}
.profile-avatar {
@@ -3636,11 +3842,75 @@ img {
place-items: center;
width: 4.5rem;
height: 4.5rem;
border-radius: 1.2rem;
border-radius: 999px;
background: linear-gradient(135deg, #68abff, #ffd166);
color: #0f1420;
font-size: 1.5rem;
font-weight: 800;
overflow: hidden;
transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}
.profile-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.profile-active-check {
position: absolute;
top: 0.65rem;
right: 0.65rem;
display: grid;
place-items: center;
width: 1.4rem;
height: 1.4rem;
border-radius: 999px;
background: #68d391;
color: #07120d;
font-weight: 900;
}
@media (max-width: 600px) {
.profiles-layout {
align-content: start;
gap: 1.5rem;
padding: 2rem 1.25rem;
}
.profiles-header h1 {
font-size: clamp(1.8rem, 9vw, 2.5rem);
}
.profile-grid {
grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr));
gap: 1rem;
width: 100%;
}
.profile-card {
gap: 0.55rem;
padding: 0.35rem;
min-width: 0;
}
.profile-avatar {
width: clamp(4.1rem, 20vw, 5.5rem);
height: clamp(4.1rem, 20vw, 5.5rem);
font-size: 1.35rem;
}
.profile-card strong {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.profile-login-form {
width: min(100%, 24rem);
padding: 1.25rem;
}
}
.eyebrow {