imp gui
This commit is contained in:
parent
0185f161a0
commit
774f6cf752
3 changed files with 28 additions and 29 deletions
26
index.html
26
index.html
|
|
@ -358,15 +358,17 @@
|
||||||
<span class="label">Firebase Configuration</span>
|
<span class="label">Firebase Configuration</span>
|
||||||
<span class="description">Manage your database connection.</span>
|
<span class="description">Manage your database connection.</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="firebase-settings-wrapper">
|
<div>
|
||||||
<button id="toggle-firebase-config-btn" class="btn-secondary">Advanced: Custom Configuration</button>
|
<button id="toggle-firebase-config-btn" class="btn-secondary">Advanced: Custom Configuration</button>
|
||||||
<div id="custom-firebase-config-container" class="custom-firebase-config">
|
<div class="firebase-settings-wrapper">
|
||||||
<p class="config-help-text">Default shared instance is active. <a href="firebase-setup.md" target="_blank" class="text-link">Override below only if needed.</a></p>
|
<div id="custom-firebase-config-container" class="custom-firebase-config">
|
||||||
<textarea id="firebase-config-input" class="template-input" rows="5" placeholder='{ "apiKey": "...", "authDomain": "...", ... }'></textarea>
|
<p class="config-help-text">Default shared instance is active. <a href="firebase-setup.md" target="_blank" class="text-link">Override below only if needed.</a></p>
|
||||||
<div class="firebase-controls-container">
|
<textarea id="firebase-config-input" class="template-input" rows="5" placeholder='{ "apiKey": "...", "authDomain": "...", ... }'></textarea>
|
||||||
<button id="save-firebase-config-btn" class="btn-secondary">Save & Reload</button>
|
<div class="firebase-controls-container">
|
||||||
<button id="share-firebase-config-btn" class="btn-secondary">Share</button>
|
<button id="save-firebase-config-btn" class="btn-secondary">Save & Reload</button>
|
||||||
<button id="clear-firebase-config-btn" class="btn-secondary danger">Clear Config</button>
|
<button id="share-firebase-config-btn" class="btn-secondary">Share</button>
|
||||||
|
<button id="clear-firebase-config-btn" class="btn-secondary danger">Clear Config</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -376,14 +378,10 @@
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span class="label">Sync & Backup (Beta)</span>
|
<span class="label">Sync & Backup (Beta)</span>
|
||||||
<span class="description" id="firebase-status">Sync your library across devices</span>
|
<span class="description" id="firebase-status">Sync your library across devices</span>
|
||||||
<div style="display: flex; gap: 0.5rem; margin-top: 0.5rem; align-items: center;">
|
|
||||||
<img id="firebase-user-avatar" src="" style="width: 24px; height: 24px; border-radius: 50%; display: none;" onerror="this.style.display='none'" onload="this.style.display='block'">
|
|
||||||
<span id="firebase-user-name" style="font-size: 0.85rem; color: var(--foreground);"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="firebase-controls">
|
<div style="display: flex; gap: 0.5rem;">
|
||||||
<button id="firebase-connect-btn" class="btn-secondary">Connect with Google</button>
|
<button id="firebase-connect-btn" class="btn-secondary">Connect with Google</button>
|
||||||
<button id="firebase-clear-cloud-btn" class="btn-secondary danger" style="display: none; margin-top: 0.5rem;">Clear Cloud Data</button>
|
<button id="firebase-clear-cloud-btn" class="btn-secondary danger">Clear Cloud Data</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,6 @@ export class AuthManager {
|
||||||
const connectBtn = document.getElementById('firebase-connect-btn');
|
const connectBtn = document.getElementById('firebase-connect-btn');
|
||||||
const clearDataBtn = document.getElementById('firebase-clear-cloud-btn');
|
const clearDataBtn = document.getElementById('firebase-clear-cloud-btn');
|
||||||
const statusText = document.getElementById('firebase-status');
|
const statusText = document.getElementById('firebase-status');
|
||||||
const userAvatar = document.getElementById('firebase-user-avatar');
|
|
||||||
const userName = document.getElementById('firebase-user-name');
|
|
||||||
const container = document.getElementById('firebase-controls');
|
const container = document.getElementById('firebase-controls');
|
||||||
|
|
||||||
if (!connectBtn) return; // UI might not be rendered yet
|
if (!connectBtn) return; // UI might not be rendered yet
|
||||||
|
|
@ -74,10 +72,6 @@ export class AuthManager {
|
||||||
if (clearDataBtn) clearDataBtn.style.display = 'block';
|
if (clearDataBtn) clearDataBtn.style.display = 'block';
|
||||||
|
|
||||||
if (statusText) statusText.textContent = `Signed in as ${user.email}`;
|
if (statusText) statusText.textContent = `Signed in as ${user.email}`;
|
||||||
|
|
||||||
// Optional: Show user info if elements exist
|
|
||||||
if (userAvatar && user.photoURL) userAvatar.src = user.photoURL;
|
|
||||||
if (userName) userName.textContent = user.displayName;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
connectBtn.textContent = 'Connect with Google';
|
connectBtn.textContent = 'Connect with Google';
|
||||||
|
|
@ -87,9 +81,6 @@ export class AuthManager {
|
||||||
if (clearDataBtn) clearDataBtn.style.display = 'none';
|
if (clearDataBtn) clearDataBtn.style.display = 'none';
|
||||||
|
|
||||||
if (statusText) statusText.textContent = 'Sync your library across devices';
|
if (statusText) statusText.textContent = 'Sync your library across devices';
|
||||||
|
|
||||||
if (userAvatar) userAvatar.src = ''; // Placeholder or clear
|
|
||||||
if (userName) userName.textContent = '';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
styles.css
22
styles.css
|
|
@ -2769,8 +2769,22 @@ input:checked + .slider::before {
|
||||||
min-width: 36px;
|
min-width: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card:hover {
|
||||||
|
transform: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.card-like-btn {
|
.card-like-btn {
|
||||||
opacity: 1;
|
opacity: 1 !important;
|
||||||
|
top: -0.25em !important;
|
||||||
|
right: -0.25em !important;
|
||||||
|
transform: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-play-btn {
|
||||||
|
opacity: 1 !important;
|
||||||
|
bottom: -0.25em !important;
|
||||||
|
right: -0.25em !important;
|
||||||
|
transform: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2781,7 +2795,7 @@ input:checked + .slider::before {
|
||||||
|
|
||||||
.main-content,
|
.main-content,
|
||||||
.sidebar {
|
.sidebar {
|
||||||
padding-top: max(1.5rem, env(safe-area-inset-top));
|
padding-top: max(var(--spacing-md), env(safe-area-inset-top));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Lyrics Panel */
|
/* Lyrics Panel */
|
||||||
|
|
@ -3229,7 +3243,6 @@ img:not([src]), img[src=''] {
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
align-items: flex-end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-firebase-config {
|
.custom-firebase-config {
|
||||||
|
|
@ -3250,9 +3263,6 @@ img:not([src]), img[src=''] {
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#firebase-controls {
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
.firebase-controls-container {
|
.firebase-controls-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue