/* admin-screens.jsx — dashboard + management screens */ /* ============ Dashboard ============ */ function AdminDashboard({ go }) { const a = ANALYTICS; const tiles = [ { label: 'Seiten gesamt', val: '6', sub: '4 veröffentlicht', icon: 'layers' }, { label: 'Widgets aktiv', val: '81', sub: 'über 6 Seiten', icon: 'clipboard' }, { label: 'Page Views · 7T', val: a.kpis[0].val, sub: a.kpis[0].delta, icon: 'target', up: true }, { label: 'Offene Prüfungen', val: '2', sub: '1 Übersetzung', icon: 'fileText' }, ]; return (
{tiles.map((t, i) => (
{t.up && {t.sub}}
{t.val}
{t.label}
{!t.up &&
{t.sub}
}
))}

Zuletzt bearbeitet

{ADMIN_PAGES.slice(0, 5).map(p => ( go('builder')}> ))}
SeiteStatusSpracheVonWann
{p.title}{p.id} {p.lang.map(l => {l})} {p.by} {p.when}

Audit-Timeline

    {AUDIT_LOG.slice(0, 6).map((e, i) => (
  • {AUDIT_LABEL[e.ev]} {e.obj} {e.user.split(' ').pop()} · {e.t}
  • ))}

Reichweite · letzte 7 Tage

{a.views7.map((v, i) => (
{v} {a.days[i]}
))}
{a.kpis.map((k, i) => (
{k.val} {k.label} {k.delta}
))}
); } /* ============ Analytics ============ */ function AdminAnalytics() { const a = ANALYTICS; return (
{['7 Tage', '30 Tage', 'Quartal'].map((s, i) => )}
{a.kpis.map((k, i) => (
{k.val}
{k.label}
{k.delta} ggü. Vorperiode
))}

Page Views · Verlauf

events: page_view
{a.views7.map((v, i) => (
{v} {a.days[i]}
))}

Top-Seiten

    {a.topPages.map((p, i) => (
  • {String(i + 1).padStart(2, '0')} {p.p}{p.v.toLocaleString('de-DE')}
  • ))}

Geräte

Sprache & Outbound

Sprache {a.lang.map((l, i) => (
{l.k}{l.v}%
))}
Social-Outbound {a.outbound.map((o, i) => (
{o.k}{o.v.toLocaleString('de-DE')}
))}
Consent {a.consent.granted}% / {a.consent.denied}% / {a.consent.pending}%
); } function Donut({ data }) { const total = data.reduce((s, d) => s + d.v, 0); let acc = 0; const colors = { oliv: '#4d5a3c', stahlblau: '#2f4f68', sandgrau: '#6a5f4c' }; const stops = data.map(d => { const start = acc / total * 360; acc += d.v; const end = acc / total * 360; return `${colors[d.tint]} ${start}deg ${end}deg`; }); return (
); } /* ============ Audit ============ */ function AdminAudit() { return (
{AUDIT_LOG.map((e, i) => ( ))}
EreignisObjektNutzerRolleZeit
{AUDIT_LABEL[e.ev]}{e.ev} {e.obj} {e.user} {e.role} {e.t}
); } Object.assign(window, { AdminDashboard, AdminAnalytics, AdminAudit, Donut });