6f4abfcec4
- change worker: do not cache html pages (not necessary) - remove use of window.XXX and maximize import/export, this will provide more clarety, show circular dependencies + you will benefit IDE help
283 lines
13 KiB
HTML
283 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title data-i18n="app.title">OxiCloud - Login</title>
|
|
<!-- Apply saved theme immediately to prevent flash of light mode -->
|
|
<script src="/js/core/theme-init.js"></script>
|
|
|
|
<!-- Styles -->
|
|
<link rel="stylesheet" href="/css/main.css">
|
|
<link rel="stylesheet" href="/css/views/auth.css">
|
|
|
|
<!-- Scripts -->
|
|
<script type="module" src="/js/features/auth/auth.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="auth-container">
|
|
<!-- Language Selector Panel - Shown first on fresh install -->
|
|
<div class="auth-panel language-selector-panel hidden" id="language-panel">
|
|
<div class="auth-logo">
|
|
<div class="auth-logo-icon">
|
|
<svg viewBox="0 0 500 500">
|
|
<path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
|
|
</svg>
|
|
</div>
|
|
<div class="auth-logo-text">OxiCloud</div>
|
|
</div>
|
|
|
|
<h2 class="auth-title" id="language-title">Welcome!</h2>
|
|
<p class="language-subtitle" id="language-subtitle">Select your language to continue</p>
|
|
|
|
<!-- Single selected language box with inline dropdown -->
|
|
<div class="lang-picker" id="lang-picker">
|
|
<div class="lang-picker-selected" id="lang-picker-selected" role="button" tabindex="0" aria-haspopup="listbox" aria-expanded="false">
|
|
<span class="lang-picker-flag" id="lang-picker-flag">🇬🇧</span>
|
|
<span class="lang-picker-name" id="lang-picker-name">English</span>
|
|
<i class="fas fa-chevron-down lang-picker-arrow"></i>
|
|
</div>
|
|
<div class="lang-picker-dropdown" id="lang-picker-dropdown" role="listbox">
|
|
<div class="lang-picker-search">
|
|
<i class="fas fa-search"></i>
|
|
<input type="text" id="lang-picker-search-input" placeholder="Search language..." autocomplete="off">
|
|
</div>
|
|
<div class="lang-picker-list" id="lang-picker-list">
|
|
<!-- Populated dynamically by auth.js -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="button" class="auth-button" id="language-continue">Continue</button>
|
|
</div>
|
|
|
|
<div class="auth-panel hidden" id="login-panel">
|
|
<div class="auth-logo">
|
|
<div class="auth-logo-icon">
|
|
<svg viewBox="0 0 500 500">
|
|
<path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
|
|
</svg>
|
|
</div>
|
|
<div class="auth-logo-text">OxiCloud</div>
|
|
</div>
|
|
|
|
<h2 class="auth-title" data-i18n="auth.login_title">Log in</h2>
|
|
|
|
<div class="auth-error" id="login-error"></div>
|
|
|
|
<form class="auth-form" id="login-form">
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="login-username" data-i18n="auth.username">Username</label>
|
|
<input
|
|
type="text"
|
|
id="login-username"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.username_placeholder"
|
|
placeholder="Enter your username"
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="login-password" data-i18n="auth.password">Password</label>
|
|
<input
|
|
type="password"
|
|
id="login-password"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.password_placeholder"
|
|
placeholder="Enter your password"
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<button type="submit" class="auth-button" data-i18n="auth.login_button">Log in</button>
|
|
</form>
|
|
|
|
<!-- SSO / OIDC login section (hidden by default, shown dynamically) -->
|
|
<div id="oidc-login-section" class="hidden">
|
|
<div class="auth-divider" id="auth-divider">
|
|
<span data-i18n="auth.or">or</span>
|
|
</div>
|
|
<button type="button" class="auth-button auth-button-oidc" id="oidc-login-btn">
|
|
<i class="fas fa-key"></i>
|
|
<span data-i18n="auth.sso_login">Sign in with SSO</span>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="auth-toggle">
|
|
<span data-i18n="auth.no_account">Don't have an account?</span>
|
|
<span class="auth-toggle-link" id="show-register" data-i18n="auth.register">Sign up</span>
|
|
</div>
|
|
|
|
<div class="auth-toggle">
|
|
<span data-i18n="auth.admin_setup">First time?</span>
|
|
<span class="auth-toggle-link" id="show-admin-setup" data-i18n="auth.setup">Set up administrator</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="auth-panel hidden" id="register-panel">
|
|
<div class="auth-logo">
|
|
<div class="auth-logo-icon">
|
|
<svg viewBox="0 0 500 500">
|
|
<path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
|
|
</svg>
|
|
</div>
|
|
<div class="auth-logo-text">OxiCloud</div>
|
|
</div>
|
|
|
|
<h2 class="auth-title" data-i18n="auth.register_title">Create account</h2>
|
|
|
|
<div class="auth-error" id="register-error"></div>
|
|
<div class="auth-success" id="register-success"></div>
|
|
|
|
<form class="auth-form" id="register-form">
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="register-username" data-i18n="auth.username">Username</label>
|
|
<input
|
|
type="text"
|
|
id="register-username"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.username_placeholder"
|
|
placeholder="Enter a username"
|
|
required
|
|
minlength="3"
|
|
maxlength="32"
|
|
>
|
|
</div>
|
|
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="register-email" data-i18n="auth.email">Email</label>
|
|
<input
|
|
type="email"
|
|
id="register-email"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.email_placeholder"
|
|
placeholder="Enter your email"
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="register-password" data-i18n="auth.password">Password</label>
|
|
<input
|
|
type="password"
|
|
id="register-password"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.password_placeholder"
|
|
placeholder="Enter a secure password"
|
|
required
|
|
minlength="8"
|
|
>
|
|
</div>
|
|
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="register-password-confirm" data-i18n="auth.confirm_password">Confirm password</label>
|
|
<input
|
|
type="password"
|
|
id="register-password-confirm"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.confirm_password_placeholder"
|
|
placeholder="Confirm your password"
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<button type="submit" class="auth-button" data-i18n="auth.register_button">Create account</button>
|
|
</form>
|
|
|
|
<div class="auth-toggle">
|
|
<span data-i18n="auth.have_account">Already have an account?</span>
|
|
<span class="auth-toggle-link" id="show-login" data-i18n="auth.login">Log in</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="auth-panel admin-setup-panel hidden" id="admin-setup-panel">
|
|
<div class="auth-logo">
|
|
<div class="auth-logo-icon">
|
|
<svg viewBox="0 0 500 500">
|
|
<path d="M345 310c32 0 58-26 58-58s-26-58-58-58c-6.2 0-12 0.9-17.5 2.7C318 166 289 143 255 143c-34.3 0-63.1 22.6-73 53.7C176.9 195.7 171 195 165 195c-32 0-58 26-58 58s26 58 58 58h180z" fill="#fff"/>
|
|
</svg>
|
|
</div>
|
|
<div class="auth-logo-text">OxiCloud</div>
|
|
</div>
|
|
|
|
<h2 class="auth-title" data-i18n="auth.setup_title">Initial setup</h2>
|
|
|
|
<div class="setup-steps">
|
|
<div class="setup-step">
|
|
<div class="step-number active">1</div>
|
|
<div class="step-title active" data-i18n="auth.setup_step1">Admin</div>
|
|
</div>
|
|
<div class="setup-step">
|
|
<div class="step-number">2</div>
|
|
<div class="step-title" data-i18n="auth.setup_step2">System</div>
|
|
</div>
|
|
<div class="setup-step">
|
|
<div class="step-number">3</div>
|
|
<div class="step-title" data-i18n="auth.setup_step3">Completed</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="auth-error" id="admin-setup-error"></div>
|
|
<div class="auth-success" id="admin-setup-success"></div>
|
|
|
|
<form class="auth-form" id="admin-setup-form">
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="admin-username" data-i18n="auth.admin_username">Administrator username</label>
|
|
<input
|
|
type="text"
|
|
id="admin-username"
|
|
class="auth-input"
|
|
value="admin"
|
|
readonly
|
|
>
|
|
</div>
|
|
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="admin-email" data-i18n="auth.admin_email">Administrator email</label>
|
|
<input
|
|
type="email"
|
|
id="admin-email"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.email_placeholder"
|
|
placeholder="Enter the administrator email"
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="admin-password" data-i18n="auth.admin_password">Administrator password</label>
|
|
<input
|
|
type="password"
|
|
id="admin-password"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.password_placeholder"
|
|
placeholder="Enter a secure password"
|
|
required
|
|
minlength="8"
|
|
>
|
|
</div>
|
|
|
|
<div class="auth-input-group">
|
|
<label class="auth-label" for="admin-password-confirm" data-i18n="auth.confirm_password">Confirm password</label>
|
|
<input
|
|
type="password"
|
|
id="admin-password-confirm"
|
|
class="auth-input"
|
|
data-i18n-placeholder="auth.confirm_password_placeholder"
|
|
placeholder="Confirm the password"
|
|
required
|
|
>
|
|
</div>
|
|
|
|
<button type="submit" class="auth-button" data-i18n="auth.create_admin">Create administrator</button>
|
|
</form>
|
|
|
|
<div class="auth-toggle">
|
|
<span data-i18n="auth.back_to_login">Already configured?</span>
|
|
<span class="auth-toggle-link" id="back-to-login" data-i18n="auth.login">Log in</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |