Ottimizzazione UI player, rotazione head tilt invertita, prefisso playlist in Home e implementazione Identity QR modal e interceptor API
This commit is contained in:
+37
-5
@@ -37,8 +37,13 @@
|
||||
<app-root>
|
||||
<div id="pwa-boot-loader" style="position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: #121212; color: #ffffff; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 99999; font-family: 'Outfit', sans-serif;">
|
||||
<div style="text-align: center; padding: 20px; max-width: 400px; width: 100%;">
|
||||
<h2 id="pwa-boot-title" style="font-size: 1.8rem; font-weight: 600; margin-bottom: 10px; color: #ffffff; font-family: 'Outfit', sans-serif; -webkit-font-smoothing: antialiased;">Avvio in corso</h2>
|
||||
<p id="pwa-boot-desc" style="font-size: 1rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 30px; font-family: 'Outfit', sans-serif; -webkit-font-smoothing: antialiased;">Caricamento dell'applicazione...</p>
|
||||
<div style="margin-bottom: 25px; display: inline-block;">
|
||||
<img src="assets/icon/favicon.png" alt="CantiCristiani" style="width: 80px; height: 80px; border-radius: 20px; box-shadow: 0 8px 24px rgba(230, 126, 34, 0.3); border: 2px solid rgba(230, 126, 34, 0.2);">
|
||||
</div>
|
||||
<h2 id="pwa-boot-title" style="font-size: 1.8rem; font-weight: 600; margin-bottom: 5px; color: #ffffff; font-family: 'Outfit', sans-serif; -webkit-font-smoothing: antialiased;">Avvio in corso</h2>
|
||||
<p id="pwa-boot-desc" style="font-size: 1rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 15px; font-family: 'Outfit', sans-serif; -webkit-font-smoothing: antialiased;">Caricamento dei componenti dell'applicazione...</p>
|
||||
<div id="pwa-boot-version" style="font-size: 0.85rem; color: rgba(255, 255, 255, 0.45); margin-bottom: 20px; font-family: 'Outfit', sans-serif; -webkit-font-smoothing: antialiased; font-weight: 500;">Ricerca versione...</div>
|
||||
<div id="pwa-boot-phase" style="font-size: 0.95rem; font-weight: 600; color: #fdcb6e; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1.5px; font-family: 'Outfit', sans-serif;">Fase: Avvio</div>
|
||||
<div style="background: rgba(255, 255, 255, 0.1); border-radius: 10px; height: 8px; width: 100%; overflow: hidden; margin-bottom: 15px;">
|
||||
<div id="pwa-boot-bar" style="background: #e67e22; height: 100%; width: 0%; transition: width 0.1s ease; border-radius: 10px;"></div>
|
||||
</div>
|
||||
@@ -50,11 +55,38 @@
|
||||
const isUpdate = window.location.search.includes('update');
|
||||
const titleEl = document.getElementById('pwa-boot-title');
|
||||
const descEl = document.getElementById('pwa-boot-desc');
|
||||
if (isUpdate && titleEl && descEl) {
|
||||
titleEl.textContent = 'Aggiornamento completato';
|
||||
descEl.textContent = 'Ottimizzazione e avvio della nuova versione...';
|
||||
const phaseEl = document.getElementById('pwa-boot-phase');
|
||||
|
||||
// Detect if it is the first installation (no active service worker controlling the page yet)
|
||||
const isFirstInstall = 'serviceWorker' in navigator && !navigator.serviceWorker.controller;
|
||||
|
||||
if (isUpdate) {
|
||||
if (titleEl) titleEl.textContent = 'Aggiornamento completato';
|
||||
if (descEl) descEl.textContent = 'Ottimizzazione e avvio della nuova versione...';
|
||||
if (phaseEl) phaseEl.textContent = 'Fase: Avvio';
|
||||
} else if (isFirstInstall) {
|
||||
if (titleEl) titleEl.textContent = 'Download in corso';
|
||||
if (descEl) descEl.textContent = 'Scaricamento dei componenti dell\'applicazione...';
|
||||
if (phaseEl) phaseEl.textContent = 'Fase: Download';
|
||||
}
|
||||
|
||||
const versionEl = document.getElementById('pwa-boot-version');
|
||||
fetch('/version.json?cb=' + Date.now())
|
||||
.then(res => {
|
||||
if (res.ok) return res.json();
|
||||
throw new Error('Fallback');
|
||||
})
|
||||
.then(data => {
|
||||
if (data && data.version && versionEl) {
|
||||
versionEl.textContent = 'Versione ' + data.version;
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
if (versionEl) {
|
||||
versionEl.textContent = '';
|
||||
}
|
||||
});
|
||||
|
||||
let percent = 0;
|
||||
const bar = document.getElementById('pwa-boot-bar');
|
||||
const pctText = document.getElementById('pwa-boot-percent');
|
||||
|
||||
Reference in New Issue
Block a user