feat: revise login screen with logo and smooth transition to splash
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
- Replace 'Login to Emby' heading with sofarr logo and subtitle - Subtitle reads 'Login with your Emby credentials' - Login form fades out smoothly before splash screen appears - Form labels remain left-aligned within centered login box
This commit is contained in:
@@ -64,6 +64,18 @@ function stopAutoRefresh() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fadeOutLogin() {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
const login = document.getElementById('login-container');
|
||||||
|
login.classList.add('fade-out');
|
||||||
|
login.addEventListener('transitionend', () => {
|
||||||
|
login.style.display = 'none';
|
||||||
|
login.classList.remove('fade-out');
|
||||||
|
resolve();
|
||||||
|
}, { once: true });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function showSplash() {
|
function showSplash() {
|
||||||
const splash = document.getElementById('splash-screen');
|
const splash = document.getElementById('splash-screen');
|
||||||
splash.style.display = 'flex';
|
splash.style.display = 'flex';
|
||||||
@@ -130,6 +142,8 @@ async function handleLogin(e) {
|
|||||||
if (data.success) {
|
if (data.success) {
|
||||||
currentUser = data.user;
|
currentUser = data.user;
|
||||||
isAdmin = !!data.user.isAdmin;
|
isAdmin = !!data.user.isAdmin;
|
||||||
|
// Fade out login, then show splash while loading data
|
||||||
|
await fadeOutLogin();
|
||||||
showSplash();
|
showSplash();
|
||||||
showDashboard();
|
showDashboard();
|
||||||
const splashStart = Date.now();
|
const splashStart = Date.now();
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
<!-- Login Form -->
|
<!-- Login Form -->
|
||||||
<div id="login-container" class="login-container" style="display: none;">
|
<div id="login-container" class="login-container" style="display: none;">
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<h2>Login to Emby</h2>
|
<img src="images/sofarr-flashscreen.png" alt="sofarr" class="login-logo">
|
||||||
|
<p class="login-subtitle">Login with your Emby credentials</p>
|
||||||
<form id="login-form">
|
<form id="login-form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="username">Username:</label>
|
<label for="username">Username:</label>
|
||||||
|
|||||||
@@ -545,6 +545,12 @@ body {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-container.fade-out {
|
||||||
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-box {
|
.login-box {
|
||||||
@@ -555,17 +561,24 @@ body {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 380px;
|
max-width: 380px;
|
||||||
transition: background 0.3s;
|
transition: background 0.3s;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-box h2 {
|
.login-logo {
|
||||||
color: var(--text-primary);
|
max-width: 180px;
|
||||||
|
width: 60%;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-subtitle {
|
||||||
|
color: var(--text-secondary);
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
text-align: center;
|
font-size: 0.85rem;
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group label {
|
.form-group label {
|
||||||
|
|||||||
Reference in New Issue
Block a user