35 lines
1.1 KiB
HTML
35 lines
1.1 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/puzzle.svg" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="manifest" href="/manifest.json" />
|
|
<title>Decoda</title>
|
|
<script>
|
|
(async function checkForUpdates() {
|
|
try {
|
|
const response = await fetch('/version.json?t=' + Date.now());
|
|
const newVersion = await response.json();
|
|
const lastVersion = sessionStorage.getItem('app_version');
|
|
|
|
if (lastVersion && lastVersion !== newVersion.commit) {
|
|
console.log('🔄 Novo deploy detectado. Recarregando...');
|
|
sessionStorage.setItem('app_version', newVersion.commit);
|
|
window.location.reload(true);
|
|
return;
|
|
}
|
|
|
|
sessionStorage.setItem('app_version', newVersion.commit);
|
|
} catch (e) {
|
|
console.warn('Falha ao verificar atualizações:', e);
|
|
}
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.jsx"></script>
|
|
</body>
|
|
</html>
|