This commit is contained in:
BlackSigKill 2026-02-09 20:23:06 +01:00
parent c1ebce949c
commit c77507dfe0
2 changed files with 314 additions and 260 deletions

View file

@ -1617,7 +1617,8 @@ export function initializeSettings(scrobbler, player, api, ui) {
// Hide individual fields in the modal // Hide individual fields in the modal
if (pbFromEnv && customPbUrlInput) customPbUrlInput.closest('div[style]').style.display = 'none'; if (pbFromEnv && customPbUrlInput) customPbUrlInput.closest('div[style]').style.display = 'none';
if (fbFromEnv && customFirebaseConfigInput) customFirebaseConfigInput.closest('div[style]').style.display = 'none'; if (fbFromEnv && customFirebaseConfigInput)
customFirebaseConfigInput.closest('div[style]').style.display = 'none';
customDbBtn.addEventListener('click', () => { customDbBtn.addEventListener('click', () => {
const pbUrl = localStorage.getItem('monochrome-pocketbase-url') || ''; const pbUrl = localStorage.getItem('monochrome-pocketbase-url') || '';

View file

@ -5,10 +5,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Monochrome — Login</title> <title>Monochrome — Login</title>
<style> <style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } *,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body { body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-family:
'Inter',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
sans-serif;
background: #0a0a0a; background: #0a0a0a;
color: #e0e0e0; color: #e0e0e0;
min-height: 100vh; min-height: 100vh;
@ -31,7 +43,10 @@
margin-bottom: 2.5rem; margin-bottom: 2.5rem;
} }
.logo svg { width: 40px; height: 40px; } .logo svg {
width: 40px;
height: 40px;
}
.logo span { .logo span {
font-size: 1.5rem; font-size: 1.5rem;
@ -50,15 +65,23 @@
font-size: 0.925rem; font-size: 0.925rem;
font-family: inherit; font-family: inherit;
cursor: pointer; cursor: pointer;
transition: background 0.15s, border-color 0.15s; transition:
background 0.15s,
border-color 0.15s;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 0.5rem; gap: 0.5rem;
} }
.btn:hover { background: #1e1e1e; border-color: #3a3a3a; } .btn:hover {
.btn:disabled { opacity: 0.5; cursor: not-allowed; } background: #1e1e1e;
border-color: #3a3a3a;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-primary { .btn-primary {
background: #fff; background: #fff;
@ -67,7 +90,10 @@
font-weight: 600; font-weight: 600;
} }
.btn-primary:hover { background: #e0e0e0; border-color: #e0e0e0; } .btn-primary:hover {
background: #e0e0e0;
border-color: #e0e0e0;
}
.divider { .divider {
display: flex; display: flex;
@ -80,14 +106,17 @@
letter-spacing: 0.05em; letter-spacing: 0.05em;
} }
.divider::before, .divider::after { .divider::before,
.divider::after {
content: ''; content: '';
flex: 1; flex: 1;
height: 1px; height: 1px;
background: #2a2a2a; background: #2a2a2a;
} }
.form-group { margin-bottom: 1rem; } .form-group {
margin-bottom: 1rem;
}
.form-group input { .form-group input {
width: 100%; width: 100%;
@ -102,7 +131,9 @@
transition: border-color 0.15s; transition: border-color 0.15s;
} }
.form-group input:focus { border-color: #555; } .form-group input:focus {
border-color: #555;
}
.error-msg { .error-msg {
background: #1a0000; background: #1a0000;
@ -125,7 +156,11 @@
display: none; display: none;
} }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes spin {
to {
transform: rotate(360deg);
}
}
.google-icon { .google-icon {
width: 18px; width: 18px;
@ -138,7 +173,9 @@
<div class="logo"> <div class="logo">
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="14.75 14.75 70.5 70.5"> <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="14.75 14.75 70.5 70.5">
<g fill="white"> <g fill="white">
<path d="M38.25 14.75H85.25V61.75H61.75V38.25H38.25ZM14.75 38.25H38.25V61.75H61.75V85.25H14.75Z" /> <path
d="M38.25 14.75H85.25V61.75H61.75V38.25H38.25ZM14.75 38.25H38.25V61.75H61.75V85.25H14.75Z"
/>
</g> </g>
</svg> </svg>
<span>Monochrome</span> <span>Monochrome</span>
@ -148,10 +185,22 @@
<button id="google-btn" class="btn" onclick="googleSignIn()"> <button id="google-btn" class="btn" onclick="googleSignIn()">
<svg class="google-icon" viewBox="0 0 24 24"> <svg class="google-icon" viewBox="0 0 24 24">
<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"/> <path
<path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/> fill="#4285F4"
<path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/> d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z"
<path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/> />
<path
fill="#34A853"
d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
/>
<path
fill="#FBBC05"
d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
/>
<path
fill="#EA4335"
d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
/>
</svg> </svg>
Sign in with Google Sign in with Google
</button> </button>
@ -163,14 +212,19 @@
<input type="email" id="email" placeholder="Email" required autocomplete="email" /> <input type="email" id="email" placeholder="Email" required autocomplete="email" />
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="password" id="password" placeholder="Password" required autocomplete="current-password" /> <input
type="password"
id="password"
placeholder="Password"
required
autocomplete="current-password"
/>
</div> </div>
<button type="submit" id="email-btn" class="btn btn-primary"> <button type="submit" id="email-btn" class="btn btn-primary">
<span id="email-btn-text">Sign In</span> <span id="email-btn-text">Sign In</span>
<span id="email-btn-spinner" class="spinner"></span> <span id="email-btn-spinner" class="spinner"></span>
</button> </button>
</form> </form>
</div> </div>
<script type="module"> <script type="module">
@ -284,7 +338,6 @@
setLoading(false); setLoading(false);
} }
}; };
</script> </script>
</body> </body>
</html> </html>