vers 2.6.1
This commit is contained in:
@@ -76,6 +76,8 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
<changelog>
|
<changelog>
|
||||||
|
|
||||||
|
<version>
|
||||||
|
<number>2.6.1</number>
|
||||||
|
<logs>
|
||||||
|
<log>Ottimizzazione PWA: implementato il fallback offline completo e il caching dinamico, permettendo all'app di funzionare senza connessione internet su tutte le rotte dinamiche.</log>
|
||||||
|
<log>Stile e comportamento "Native App": impedita la selezione accidentale del testo e rimosso l'highlight tap dei browser su smartphone per migliorare l'UX.</log>
|
||||||
|
<log>Pulizia e alleggerimento del codice Javascript, rimuovendo il logging eccessivo di debug.</log>
|
||||||
|
<log>Correzione e bugfix di problematiche varie.</log>
|
||||||
|
</logs>
|
||||||
|
</version>
|
||||||
|
|
||||||
<version>
|
<version>
|
||||||
<number>2.6.0</number>
|
<number>2.6.0</number>
|
||||||
<logs>
|
<logs>
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
const redirect = urlParams.get('redirect');
|
const redirect = urlParams.get('redirect');
|
||||||
|
|
||||||
if (redirect) {
|
if (redirect) {
|
||||||
console.log('📍 Trovato parametro redirect:', redirect);
|
// console.log('📍 Trovato parametro redirect:', redirect);
|
||||||
return redirect;
|
return redirect;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('📍 Path rilevato:', path || 'home');
|
// console.log('📍 Path rilevato:', path || 'home');
|
||||||
return path || 'home';
|
return path || 'home';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
* Aggiorna la navigazione attiva
|
* Aggiorna la navigazione attiva
|
||||||
*/
|
*/
|
||||||
function updateActiveNavigation(page) {
|
function updateActiveNavigation(page) {
|
||||||
console.log('Aggiornamento navigazione per pagina:', page); // Debug
|
// console.log('Aggiornamento navigazione per pagina:', page); // Debug
|
||||||
|
|
||||||
const navLinks = document.querySelectorAll('.navLink');
|
const navLinks = document.querySelectorAll('.navLink');
|
||||||
navLinks.forEach(link => {
|
navLinks.forEach(link => {
|
||||||
@@ -252,20 +252,20 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
const linkPage = link.getAttribute('data-page');
|
const linkPage = link.getAttribute('data-page');
|
||||||
|
|
||||||
// Log di debug per vedere i confronti
|
// Log di debug per vedere i confronti
|
||||||
console.log('Confronto:', linkPage, 'con', page);
|
// console.log('Confronto:', linkPage, 'con', page);
|
||||||
|
|
||||||
if (linkPage === page) {
|
if (linkPage === page) {
|
||||||
link.classList.add('active');
|
link.classList.add('active');
|
||||||
console.log('✓ Match esatto:', linkPage);
|
// console.log('✓ Match esatto:', linkPage);
|
||||||
} else if (page.startsWith('play/') && linkPage === 'radio') {
|
} else if (page.startsWith('play/') && linkPage === 'radio') {
|
||||||
link.classList.add('active');
|
link.classList.add('active');
|
||||||
console.log('✓ Match play/ -> radio');
|
// console.log('✓ Match play/ -> radio');
|
||||||
} else if (page.startsWith('playtv/') && linkPage === 'tv') {
|
} else if (page.startsWith('playtv/') && linkPage === 'tv') {
|
||||||
link.classList.add('active');
|
link.classList.add('active');
|
||||||
console.log('✓ Match playtv/ -> tv');
|
// console.log('✓ Match playtv/ -> tv');
|
||||||
} else if (page.startsWith('page/') && linkPage === page) {
|
} else if (page.startsWith('page/') && linkPage === page) {
|
||||||
link.classList.add('active');
|
link.classList.add('active');
|
||||||
console.log('✓ Match page/');
|
// console.log('✓ Match page/');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const CACHE_NAME = 'rpigroupplay-v2';
|
const CACHE_NAME = 'rpigroupplay-v3';
|
||||||
const ASSETS = [
|
const ASSETS = [
|
||||||
'./',
|
'./',
|
||||||
'./index.php',
|
'./index.php',
|
||||||
@@ -93,6 +93,11 @@ self.addEventListener('fetch', (e) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
|
}).catch(() => {
|
||||||
|
// Fallback offline: restituiamo l'app shell se l'utente sta navigando
|
||||||
|
if (e.request.mode === 'navigate') {
|
||||||
|
return caches.match('./index.php');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user