From 9ff2ef5d48fc39f0733e4e182ff9771fd5b250df Mon Sep 17 00:00:00 2001 From: sravan Date: Wed, 1 Jul 2026 22:16:38 +0530 Subject: [PATCH] feat(dashboard): "App installs" view + compact top-right Download button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - dashboard.html: admin "App installs" card — table of user · platform · version · OS · first/last seen, from GET /api/v1/admin/installs (loadInstalls). - index.html: replaced the long inline link with a compact white "Download app" button in the blue top header (top-right); hidden when already inside the desktop app. Co-Authored-By: Claude Opus 4.8 --- server/public/dashboard.html | 14 ++++++++++++++ server/public/index.html | 9 +++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/server/public/dashboard.html b/server/public/dashboard.html index 67c8569..7809b81 100644 --- a/server/public/dashboard.html +++ b/server/public/dashboard.html @@ -235,6 +235,11 @@ async function dashboard(me) {
+ +
+

App installs — who installed the desktop / mobile app

+
UserPlatformVersionOSFirst seenLast seen
+
` : ''}`); document.getElementById('fApply').onclick = loadReport; document.getElementById('fExcel').onclick = exportExcel; @@ -246,8 +251,17 @@ async function dashboard(me) { document.getElementById('hAdd').onclick = createHook; await loadKeys(); await loadHooks(); + await loadInstalls(); } } +async function loadInstalls(){ + let rows=[]; try{ rows=await fetch('/api/v1/admin/installs').then(r=>r.json()); }catch(_){} + const tb=document.querySelector('#installs tbody'); if(!tb) return; + const empty=document.getElementById('installsEmpty'); + if(!Array.isArray(rows)||!rows.length){ tb.innerHTML=''; if(empty) empty.style.display='block'; return; } + if(empty) empty.style.display='none'; + tb.innerHTML=rows.map(r=>`${esc(r.user_email||'—')}${esc(r.platform||'—')}${esc(r.app_version||'—')}${esc(r.os||'—')}${fmtTs(r.first_seen)}${fmtTs(r.last_seen)}`).join(''); +} // ---------- Integrations: API keys + webhooks (admin) ---------- function fmtTs(ms){ return ms ? new Date(ms).toLocaleString() : '—'; } diff --git a/server/public/index.html b/server/public/index.html index 9cdc2c0..51a80de 100644 --- a/server/public/index.html +++ b/server/public/index.html @@ -10,6 +10,9 @@ body{font-family:'Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--ink);margin:0;min-height:100vh;display:flex;flex-direction:column;} header{background:var(--blue);padding:.85rem 1.5rem;display:flex;justify-content:space-between;align-items:center;} .brandrow{display:flex;align-items:center;gap:.7rem;} + .hdr-right{display:flex;align-items:center;gap:.9rem;} + .dl-btn{display:inline-flex;align-items:center;gap:.4rem;background:#fff;color:var(--blue);padding:.45rem .85rem;border-radius:9px;font-size:.85rem;font-weight:700;text-decoration:none;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.12);} + .dl-btn:hover{background:var(--brand);color:var(--blue);} .brand{font-weight:700;color:#fff;font-size:1.1rem;} .brand span{color:var(--brand);font-weight:600;} .signin{color:#dbe4f5;text-decoration:none;font-size:.9rem;border:1px solid #46598c;border-radius:8px;padding:.45rem 1rem;} .signin:hover{background:var(--blue-d);} @@ -49,7 +52,10 @@
Biz Connect
-
+
@@ -67,7 +73,6 @@
BizGaze team member?
B Log in with BizGaze - Download the Windows desktop app