-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
79 lines (74 loc) · 3.08 KB
/
Copy pathexample.html
File metadata and controls
79 lines (74 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Uniphied Auth — Keys • OTP • WebAuthn • SSO • CA • Visual</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
:root{ --bg:#0b0e14; --fg:#e6f1ff; --card:rgba(255,255,255,.05); --line:rgba(255,255,255,.12); --accent:#9ad1ff; }
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif}
a{color:var(--accent)}
.wrap{padding:14px}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px;min-height:800px;}
iframe{width:100%;min-height:740px;border:1px solid var(--line);border-radius:10px;background:#05070a}
.pill{padding:2px 6px;border-radius:999px;border:1px solid #243246;background:#0c121b;font-size:12px;margin-right:6px}
</style>
<script>
// Simple runtime config (override via localStorage.UNIPHI_API = "http://localhost:8080")
window.UNIPHI = { API_BASE: localStorage.getItem("UNIPHI_API") || "" };
</script>
</head>
<body>
<div class="wrap">
<div class="d-flex gap-2 align-items-center mb-2">
<img src="ladybug.svg" alt="ladybug" style="width:22px;height:22px;filter:drop-shadow(0 0 6px rgba(255,110,181,.5))"/>
<h1 class="m-0 fs-4">Uniphied Auth</h1>
<span class="pill ms-auto" id="clock">—</span>
</div>
<div id="disclosure" class="mb-3"></div>
<div class="card">
<h2 class="fs-6">Key Lab (embed)</h2>
<iframe src="uniphi-key-lab.html" title="Key Lab"></iframe>
</div>
</div>
<script>
const $ = (id)=> document.getElementById(id);
setInterval(()=> $('clock').textContent = new Date().toISOString(), 1000);
async function api(path, opts){
const base = window.UNIPHI?.API_BASE || "";
return fetch(base + path, opts);
}
async function renderDisclosure(){
const wrap = $('disclosure');
const title = document.createElement('span');
title.className = 'pill';
title.textContent = 'Disclosure';
wrap.appendChild(title);
try {
const r = await api('/api/policy/tags');
if (!r.ok) throw new Error('HTTP '+r.status);
const j = await r.json();
const tags = [...(j.disclosure_tags||[])];
if (j.archetype) tags.push('archetype:'+j.archetype);
for (const t of tags) {
const s = document.createElement('span');
s.className = 'pill';
s.textContent = t;
wrap.appendChild(s);
}
} catch (e){
// graceful fallback
for (const t of ['local-first','demo','offline']) {
const s = document.createElement('span');
s.className = 'pill';
s.textContent = t;
wrap.appendChild(s);
}
}
}
window.addEventListener('DOMContentLoaded', renderDisclosure);
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>