Compare commits

...

2 Commits

+39 -1
View File
@@ -220,7 +220,6 @@
</div> </div>
</div> </div>
<!-- BACKUP STATUS --> <!-- BACKUP STATUS -->
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
@@ -233,6 +232,20 @@
<p id="backup-status-updated" style="color:var(--muted);font-size:0.7rem;margin-top:0.5rem;padding:0 0.25rem;"></p> <p id="backup-status-updated" style="color:var(--muted);font-size:0.7rem;margin-top:0.5rem;padding:0 0.25rem;"></p>
</div> </div>
<!-- BACKUP DOWNLOADS — added 2026-07-07: full-content backup files (JARVIS
app+DB, DO server sites+DB dumps+configs), pulled here daily so they're
downloadable from one place. Actual files require the /downloads/ login
(this card's metadata JSON does not). -->
<div class="card">
<div class="card-header">
<div class="icon icon-cyan">💾</div>
<h2>Backup Downloads</h2>
</div>
<div class="links" id="backup-downloads-list">
<div class="link-item"><span class="sub">Loading…</span></div>
</div>
</div>
<!-- HOME AUTOMATION --> <!-- HOME AUTOMATION -->
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
@@ -726,6 +739,31 @@
} }
loadBackupStatus(); loadBackupStatus();
// ── Backup Downloads card — added 2026-07-07 ───────────────────────────
async function loadBackupDownloads() {
const el = document.getElementById('backup-downloads-list');
try {
const r = await fetch('/downloads/backup-files-status.json', { cache: 'no-store' });
const data = await r.json();
const fmt = (iso) => {
if (!iso) return 'No backup found';
const d = new Date(iso);
return d.toLocaleString('en-US', {month:'short', day:'numeric', hour:'2-digit', minute:'2-digit'});
};
const row = (label, entry) => `
<a class="link-item" href="/downloads/${entry.file}" download="${entry.file}">
<span class="dot ${entry.ok ? 'dot-green' : 'dot-red'}"></span>
<span class="name">${label}</span>
<span class="sub">${entry.source}${fmt(entry.timestamp)}${entry.size ? ' · ' + entry.size : ''}</span>
<span class="arrow">↓</span>
</a>`;
el.innerHTML = row('JARVIS Backup', data.jarvis) + row('DO Server Backup', data.do_server);
} catch (e) {
el.innerHTML = '<div class="link-item"><span class="sub">Status unavailable</span></div>';
}
}
loadBackupDownloads();
// ── Notes — server-backed so they sync across all devices ───────────── // ── Notes — server-backed so they sync across all devices ─────────────
const API = '/notes.php'; const API = '/notes.php';