chore: clean repository and add documentation screenshots

This commit is contained in:
thakares committed 2026-07-21 16:29:34 +05:30
1 parent ce3bff5097
commit 71e1e4ee6b
29 files changed
+35 -2946

No files matched your search

-40
View File
@@ -1,40 +0,0 @@
// Bootstrap the Dioxus WASM UI (external file so CSP can stay strict).
function showError(err) {
console.error("[nx9-auth-ui]", err);
const el = document.getElementById("main");
if (!el) return;
const msg = err && err.stack ? err.stack : String(err);
el.innerHTML =
"<div style='max-width:40rem;margin:3rem auto;padding:1.5rem;font-family:system-ui,sans-serif'>" +
"<h1 style='font-size:1.25rem;margin:0 0 0.75rem'>UI failed to start</h1>" +
"<pre style='white-space:pre-wrap;color:#b91c1c;background:#fef2f2;padding:1rem;border-radius:8px'>" +
msg +
"</pre></div>";
}
function setStatus(text) {
const el = document.getElementById("boot-loader");
if (el) {
el.innerHTML =
"<p style='padding:2rem;font-family:system-ui,sans-serif;color:#64748b'>" +
text +
"</p>";
}
}
setStatus("Loading nx9-auth UI…");
import init from "/nx9_auth_ui.js";
// Call with no args: wasm-bindgen resolves nx9_auth_ui_bg.wasm next to
// nx9_auth_ui.js via import.meta.url (avoids the deprecated string form).
init()
.then(() => {
console.info("[nx9-auth-ui] WASM started");
const el = document.getElementById("main");
if (el) el.dataset.dioxusMounted = "1";
const loader = document.getElementById("boot-loader");
if (loader) loader.remove();
})
.catch(showError);
-4
View File
@@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
<rect width="32" height="32" rx="8" fill="#2563eb"/>
<text x="16" y="22" text-anchor="middle" font-family="system-ui,sans-serif" font-size="14" font-weight="700" fill="white">N9</text>
</svg>

Before

Width:  |  Height:  |  Size: 269 B

-857
View File
@@ -1,857 +0,0 @@
/* ─── NX9-Auth Enterprise UI ─────────────────────────────────────────────── */
:root {
--font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
--radius-sm: 6px;
--radius: 10px;
--radius-lg: 14px;
--header-h: 56px;
--sidebar-w: 240px;
--sidebar-w-collapsed: 64px;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
--shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
--transition: 150ms ease;
/* Light palette (GitHub / Linear inspired) */
--bg: #f6f8fa;
--bg-elevated: #ffffff;
--bg-muted: #eef1f5;
--bg-hover: #e8ecf1;
--border: #d0d7de;
--border-muted: #e6ebf0;
--text: #1f2328;
--text-secondary: #656d76;
--text-muted: #8b949e;
--text-inverse: #ffffff;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--accent-soft: rgba(37, 99, 235, 0.1);
--success: #1a7f37;
--success-soft: rgba(26, 127, 55, 0.12);
--warning: #9a6700;
--warning-soft: rgba(154, 103, 0, 0.12);
--danger: #cf222e;
--danger-soft: rgba(207, 34, 46, 0.12);
--info: #0969da;
--info-soft: rgba(9, 105, 218, 0.12);
--glass: rgba(255, 255, 255, 0.72);
--glass-border: rgba(255, 255, 255, 0.4);
--overlay: rgba(15, 23, 42, 0.45);
--focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}
[data-theme="dark"] {
--bg: #0d1117;
--bg-elevated: #161b22;
--bg-muted: #21262d;
--bg-hover: #2a3139;
--border: #30363d;
--border-muted: #21262d;
--text: #e6edf3;
--text-secondary: #aab2bb;
--text-muted: #7d8590;
--text-inverse: #0d1117;
--accent: #58a6ff;
--accent-hover: #79b8ff;
--accent-soft: rgba(88, 166, 255, 0.15);
--success: #3fb950;
--success-soft: rgba(63, 185, 80, 0.15);
--warning: #d29922;
--warning-soft: rgba(210, 153, 34, 0.15);
--danger: #f85149;
--danger-soft: rgba(248, 81, 73, 0.15);
--info: #58a6ff;
--info-soft: rgba(88, 166, 255, 0.15);
--glass: rgba(22, 27, 34, 0.78);
--glass-border: rgba(48, 54, 61, 0.8);
--overlay: rgba(0, 0, 0, 0.6);
--focus-ring: 0 0 0 3px rgba(88, 166, 255, 0.4);
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
--shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
--shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #0d1117;
--bg-elevated: #161b22;
--bg-muted: #21262d;
--bg-hover: #2a3139;
--border: #30363d;
--border-muted: #21262d;
--text: #e6edf3;
--text-secondary: #aab2bb;
--text-muted: #7d8590;
--text-inverse: #0d1117;
--accent: #58a6ff;
--accent-hover: #79b8ff;
--accent-soft: rgba(88, 166, 255, 0.15);
--success: #3fb950;
--success-soft: rgba(63, 185, 80, 0.15);
--warning: #d29922;
--warning-soft: rgba(210, 153, 34, 0.15);
--danger: #f85149;
--danger-soft: rgba(248, 81, 73, 0.15);
--info: #58a6ff;
--info-soft: rgba(88, 166, 255, 0.15);
--glass: rgba(22, 27, 34, 0.78);
--glass-border: rgba(48, 54, 61, 0.8);
--overlay: rgba(0, 0, 0, 0.6);
--focus-ring: 0 0 0 3px rgba(88, 166, 255, 0.4);
}
}
/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
font-family: var(--font);
font-size: 14px;
line-height: 1.5;
color: var(--text);
background: var(--bg);
-webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 0.5rem; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 0.75rem; }
code, kbd {
font-family: var(--mono);
font-size: 0.9em;
background: var(--bg-muted);
padding: 0.1em 0.35em;
border-radius: 4px;
}
/* ─── Shell ──────────────────────────────────────────────────────────────── */
.app-shell {
display: grid;
grid-template-rows: var(--header-h) 1fr;
grid-template-columns: var(--sidebar-w) 1fr;
grid-template-areas:
"header header"
"sidebar main";
min-height: 100vh;
}
.app-shell.sidebar-collapsed {
grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}
.app-header {
grid-area: header;
position: sticky;
top: 0;
z-index: 50;
display: flex;
align-items: center;
gap: 1rem;
padding: 0 1rem;
height: var(--header-h);
background: var(--glass);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border);
}
.app-header .brand {
display: flex;
align-items: center;
gap: 0.6rem;
font-weight: 700;
color: var(--text);
text-decoration: none;
min-width: 140px;
}
.app-header .brand:hover { text-decoration: none; }
.app-header .brand-mark {
width: 28px; height: 28px;
border-radius: 8px;
background: linear-gradient(135deg, var(--accent), #7c3aed);
display: grid; place-items: center;
color: white; font-size: 13px; font-weight: 800;
}
.app-header .search {
flex: 1;
max-width: 420px;
}
.app-header .header-actions {
margin-left: auto;
display: flex;
align-items: center;
gap: 0.5rem;
}
.app-sidebar {
grid-area: sidebar;
border-right: 1px solid var(--border);
background: var(--bg-elevated);
padding: 0.75rem 0.5rem;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.nav-section {
margin: 0.75rem 0.5rem 0.35rem;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
}
.nav-link {
display: flex;
align-items: center;
gap: 0.65rem;
padding: 0.5rem 0.75rem;
border-radius: var(--radius-sm);
color: var(--text-secondary);
text-decoration: none;
transition: background var(--transition), color var(--transition);
}
.nav-link:hover {
background: var(--bg-hover);
color: var(--text);
text-decoration: none;
}
.nav-link.active {
background: var(--accent-soft);
color: var(--accent);
font-weight: 600;
}
.nav-link .icon { width: 18px; text-align: center; flex-shrink: 0; }
.app-main {
grid-area: main;
display: flex;
flex-direction: column;
min-width: 0;
}
.main-inner {
flex: 1;
padding: 1.25rem 1.5rem 2rem;
max-width: 1280px;
width: 100%;
margin: 0 auto;
}
.breadcrumb {
display: flex;
align-items: center;
gap: 0.4rem;
flex-wrap: wrap;
font-size: 13px;
color: var(--text-muted);
margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text); font-weight: 500; }
.app-footer {
padding: 1rem 1.5rem;
border-top: 1px solid var(--border-muted);
color: var(--text-muted);
font-size: 12px;
display: flex;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
}
/* ─── Auth layout ────────────────────────────────────────────────────────── */
.auth-page {
min-height: 100vh;
display: grid;
place-items: center;
padding: 1.5rem;
background:
radial-gradient(ellipse at 20% 0%, var(--accent-soft), transparent 50%),
radial-gradient(ellipse at 80% 100%, rgba(124, 58, 237, 0.08), transparent 45%),
var(--bg);
}
.auth-card {
width: 100%;
max-width: 400px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-lg);
padding: 2rem;
}
.auth-card .logo-row {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1.5rem;
}
.auth-card h1 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.auth-card .subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }
/* ─── Components ─────────────────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
padding: 0.45rem 0.9rem;
border-radius: var(--radius-sm);
border: 1px solid transparent;
background: var(--bg-muted);
color: var(--text);
font-weight: 500;
transition: background var(--transition), border-color var(--transition), opacity var(--transition);
white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger {
background: var(--danger);
color: #fff;
border-color: var(--danger);
}
.btn-danger:hover { filter: brightness(1.05); }
.btn-ghost {
background: transparent;
border-color: transparent;
color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-outline {
background: transparent;
border-color: var(--border);
}
.btn-sm { padding: 0.25rem 0.6rem; font-size: 12px; }
.btn-icon {
width: 34px; height: 34px; padding: 0;
border-radius: var(--radius-sm);
}
.form-group { margin-bottom: 1rem; }
.form-label {
display: block;
font-size: 13px;
font-weight: 500;
margin-bottom: 0.35rem;
color: var(--text);
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 0.3rem; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 0.3rem; }
.form-control {
width: 100%;
padding: 0.5rem 0.7rem;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-elevated);
color: var(--text);
transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
outline: none;
border-color: var(--accent);
box-shadow: var(--focus-ring);
}
.form-control.is-invalid { border-color: var(--danger); }
.password-field {
position: relative;
display: flex;
align-items: center;
}
.password-field .form-control { padding-right: 2.5rem; }
.password-field .toggle {
position: absolute;
right: 0.35rem;
background: transparent;
border: none;
color: var(--text-muted);
padding: 0.35rem 0.5rem;
border-radius: 4px;
}
.password-field .toggle:hover { color: var(--text); background: var(--bg-hover); }
.checkbox-row, .radio-row {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.card {
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow-sm);
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.9rem 1.1rem;
border-bottom: 1px solid var(--border-muted);
}
.card-body { padding: 1.1rem; }
.card-footer {
padding: 0.75rem 1.1rem;
border-top: 1px solid var(--border-muted);
background: var(--bg-muted);
border-radius: 0 0 var(--radius) var(--radius);
}
.stat-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: 0.85rem;
margin-bottom: 1.25rem;
}
.stat-card {
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1rem;
box-shadow: var(--shadow-sm);
}
.stat-card .label {
font-size: 12px;
color: var(--text-muted);
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.stat-card .value {
font-size: 1.65rem;
font-weight: 700;
margin-top: 0.25rem;
letter-spacing: -0.02em;
}
.stat-card .hint { font-size: 12px; color: var(--text-secondary); margin-top: 0.25rem; }
.page-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
margin-bottom: 1.25rem;
}
.page-header h1 { margin: 0; }
.page-header .desc { color: var(--text-secondary); margin: 0.25rem 0 0; }
.toolbar {
display: flex;
align-items: center;
gap: 0.6rem;
flex-wrap: wrap;
margin-bottom: 1rem;
}
.toolbar .spacer { flex: 1; }
.toolbar .search-input { max-width: 280px; min-width: 180px; }
.table-wrap {
overflow-x: auto;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg-elevated);
}
table.data-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
table.data-table th,
table.data-table td {
text-align: left;
padding: 0.7rem 0.9rem;
border-bottom: 1px solid var(--border-muted);
vertical-align: middle;
}
table.data-table th {
font-size: 12px;
font-weight: 600;
color: var(--text-secondary);
background: var(--bg-muted);
white-space: nowrap;
user-select: none;
}
table.data-table th.sortable { cursor: pointer; }
table.data-table th.sortable:hover { color: var(--text); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--bg-hover); }
table.data-table .actions {
display: flex;
gap: 0.35rem;
justify-content: flex-end;
white-space: nowrap;
}
.badge, .chip {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.15rem 0.5rem;
border-radius: 999px;
font-size: 12px;
font-weight: 500;
background: var(--bg-muted);
color: var(--text-secondary);
border: 1px solid transparent;
}
.badge-success, .chip-success { background: var(--success-soft); color: var(--success); }
.badge-warning, .chip-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger, .chip-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info, .chip-info { background: var(--info-soft); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.avatar {
width: 32px; height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, var(--accent), #7c3aed);
color: #fff;
display: grid; place-items: center;
font-weight: 700; font-size: 12px;
flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.empty-state, .error-state {
text-align: center;
padding: 2.5rem 1.5rem;
color: var(--text-secondary);
}
.empty-state .icon, .error-state .icon {
font-size: 2rem;
margin-bottom: 0.75rem;
opacity: 0.7;
}
.error-state { color: var(--danger); }
.spinner {
width: 20px; height: 20px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
display: inline-block;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-hover) 50%, var(--bg-muted) 75%);
background-size: 200% 100%;
animation: shimmer 1.2s infinite;
border-radius: 4px;
height: 1em;
}
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
.loading-center {
display: grid;
place-items: center;
padding: 3rem;
gap: 0.75rem;
color: var(--text-muted);
}
/* ─── Modal / Dialog ─────────────────────────────────────────────────────── */
.modal-backdrop {
position: fixed;
inset: 0;
z-index: 100;
background: var(--overlay);
display: grid;
place-items: center;
padding: 1rem;
animation: fadeIn 120ms ease;
}
.modal {
width: 100%;
max-width: 480px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-lg);
max-height: 90vh;
overflow: auto;
animation: slideUp 150ms ease;
}
.modal-lg { max-width: 640px; }
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.15rem;
border-bottom: 1px solid var(--border-muted);
}
.modal-body { padding: 1.15rem; }
.modal-footer {
display: flex;
justify-content: flex-end;
gap: 0.5rem;
padding: 0.85rem 1.15rem;
border-top: 1px solid var(--border-muted);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast-stack {
position: fixed;
top: calc(var(--header-h) + 0.75rem);
right: 1rem;
z-index: 200;
display: flex;
flex-direction: column;
gap: 0.5rem;
max-width: 360px;
width: calc(100% - 2rem);
pointer-events: none;
}
.toast {
pointer-events: auto;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 0.75rem 1rem;
display: flex;
gap: 0.65rem;
align-items: flex-start;
animation: slideUp 150ms ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast .msg { flex: 1; font-size: 13px; }
.toast .close {
background: none; border: none; color: var(--text-muted); padding: 0;
line-height: 1; font-size: 16px;
}
/* ─── Dropdown / User menu ───────────────────────────────────────────────── */
.dropdown {
position: relative;
}
.dropdown-menu {
position: absolute;
right: 0;
top: calc(100% + 0.35rem);
min-width: 200px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 0.35rem;
z-index: 60;
}
.dropdown-item {
display: flex;
align-items: center;
gap: 0.5rem;
width: 100%;
padding: 0.5rem 0.7rem;
border: none;
background: transparent;
border-radius: var(--radius-sm);
color: var(--text);
text-align: left;
text-decoration: none;
font-size: 13px;
}
.dropdown-item:hover {
background: var(--bg-hover);
text-decoration: none;
}
.dropdown-divider {
height: 1px;
background: var(--border-muted);
margin: 0.3rem 0;
}
/* ─── Permission matrix ──────────────────────────────────────────────────── */
.perm-group {
margin-bottom: 1.25rem;
}
.perm-group h3 {
font-size: 13px;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-muted);
margin-bottom: 0.5rem;
}
.perm-list {
display: grid;
gap: 0.35rem;
}
.perm-item {
display: flex;
align-items: flex-start;
gap: 0.75rem;
padding: 0.65rem 0.85rem;
border: 1px solid var(--border-muted);
border-radius: var(--radius-sm);
background: var(--bg-elevated);
}
.perm-item code { color: var(--accent); }
/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
padding: 0.75rem 0;
font-size: 13px;
color: var(--text-secondary);
}
.pagination .pages {
display: flex;
gap: 0.25rem;
}
/* ─── Grid helpers ───────────────────────────────────────────────────────── */
.grid-2 {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
@media (max-width: 800px) {
.grid-2 { grid-template-columns: 1fr; }
.app-shell {
grid-template-columns: 1fr;
grid-template-areas:
"header"
"main";
}
.app-sidebar {
display: none;
}
.app-shell.mobile-nav-open .app-sidebar {
display: flex;
position: fixed;
top: var(--header-h);
left: 0; bottom: 0;
width: min(280px, 85vw);
z-index: 40;
box-shadow: var(--shadow-lg);
}
}
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.gap-1 { gap: 0.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mono { font-family: var(--mono); font-size: 12px; }
.sr-only {
position: absolute; width: 1px; height: 1px;
padding: 0; margin: -1px; overflow: hidden;
clip: rect(0,0,0,0); border: 0;
}
/* ─── Alert ──────────────────────────────────────────────────────────────── */
.alert {
padding: 0.75rem 1rem;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
margin-bottom: 1rem;
font-size: 13px;
}
.alert-error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.alert-success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.alert-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
/* ─── Token reveal ───────────────────────────────────────────────────────── */
.secret-box {
background: var(--bg-muted);
border: 1px dashed var(--border);
border-radius: var(--radius-sm);
padding: 0.75rem;
font-family: var(--mono);
font-size: 12px;
word-break: break-all;
display: flex;
gap: 0.5rem;
align-items: flex-start;
}
.secret-box code { flex: 1; background: none; padding: 0; }
/* Toggle switch */
.toggle {
position: relative;
width: 40px;
height: 22px;
background: var(--bg-muted);
border: 1px solid var(--border);
border-radius: 999px;
cursor: pointer;
transition: background var(--transition);
flex-shrink: 0;
}
.toggle.on {
background: var(--accent);
border-color: var(--accent);
}
.toggle::after {
content: "";
position: absolute;
top: 2px; left: 2px;
width: 16px; height: 16px;
border-radius: 50%;
background: #fff;
transition: transform var(--transition);
box-shadow: var(--shadow-sm);
}
.toggle.on::after { transform: translateX(18px); }
-25
View File
@@ -1,25 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="nx9-auth — Identity and Access Management" />
<title>nx9-auth</title>
<!-- Ensure relative module/snippet/wasm URLs resolve from site root on SPA routes -->
<base href="/" />
<link rel="stylesheet" href="/assets/style.css" />
<link rel="icon" href="/assets/favicon.svg" type="image/svg+xml" />
</head>
<body>
<div id="boot-loader"></div>
<div id="main">
<noscript>
<p style="padding:2rem;font-family:sans-serif">
JavaScript is required to run the nx9-auth UI.
</p>
</noscript>
</div>
<!-- External module: CSP script-src 'self' (no unsafe-inline) -->
<script type="module" src="/assets/boot.js"></script>
</body>
</html>
-1723
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
@@ -1,9 +0,0 @@
export function getMetaContents(meta_name) {
const selector = document.querySelector(`meta[name="${meta_name}"]`);
if (!selector) {
return null;
}
return selector.content;
}
@@ -1,222 +0,0 @@
function setAttributeInner(node,field,value,ns){if(ns==="style"){node.style.setProperty(field,value);return}if(ns){node.setAttributeNS(ns,field,value);return}switch(field){case"value":if(node.value!==value)node.value=value;break;case"initial_value":node.defaultValue=value;break;case"checked":node.checked=truthy(value);break;case"initial_checked":node.defaultChecked=truthy(value);break;case"selected":node.selected=truthy(value);break;case"initial_selected":node.defaultSelected=truthy(value);break;case"dangerous_inner_html":node.innerHTML=value;break;default:if(!truthy(value)&&isBoolAttr(field))node.removeAttribute(field);else node.setAttribute(field,value)}}var truthy=function(val){return val==="true"||val===!0},isBoolAttr=function(field){switch(field){case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"playsinline":case"readonly":case"required":case"reversed":case"selected":case"truespeed":case"webkitdirectory":return!0;default:return!1}};class BaseInterpreter{global;local;root;handler;resizeObserver;intersectionObserver;nodes;stack;templates;m;constructor(){}initialize(root,handler=null){this.global={},this.local={},this.root=root,this.nodes=[root],this.stack=[root],this.templates={},this.handler=handler,root.setAttribute("data-dioxus-id","0")}handleResizeEvent(entry){const target=entry.target;let event=new CustomEvent("resize",{bubbles:!1,detail:entry});target.dispatchEvent(event)}createResizeObserver(element){if(!this.resizeObserver)this.resizeObserver=new ResizeObserver((entries)=>{for(let entry of entries)this.handleResizeEvent(entry)});this.resizeObserver.observe(element)}removeResizeObserver(element){if(this.resizeObserver)this.resizeObserver.unobserve(element)}handleIntersectionEvent(entry){const target=entry.target;let event=new CustomEvent("visible",{bubbles:!1,detail:entry});target.dispatchEvent(event)}createIntersectionObserver(element){if(!this.intersectionObserver)this.intersectionObserver=new IntersectionObserver((entries)=>{for(let entry of entries)this.handleIntersectionEvent(entry)});this.intersectionObserver.observe(element)}removeIntersectionObserver(element){if(this.intersectionObserver)this.intersectionObserver.unobserve(element)}createListener(event_name,element,bubbles){if(event_name=="resize")this.createResizeObserver(element);else if(event_name=="visible")this.createIntersectionObserver(element);if(bubbles)if(this.global[event_name]===void 0)this.global[event_name]={active:1,callback:this.handler},this.root.addEventListener(event_name,this.handler);else this.global[event_name].active++;else{const id=element.getAttribute("data-dioxus-id");if(!this.local[id])this.local[id]={};element.addEventListener(event_name,this.handler)}}removeListener(element,event_name,bubbles){if(event_name=="resize")this.removeResizeObserver(element);else if(event_name=="visible")this.removeIntersectionObserver(element);else if(bubbles)this.removeBubblingListener(event_name);else this.removeNonBubblingListener(element,event_name)}removeBubblingListener(event_name){if(this.global[event_name].active--,this.global[event_name].active===0)this.root.removeEventListener(event_name,this.global[event_name].callback),delete this.global[event_name]}removeNonBubblingListener(element,event_name){const id=element.getAttribute("data-dioxus-id");if(delete this.local[id][event_name],Object.keys(this.local[id]).length===0)delete this.local[id];element.removeEventListener(event_name,this.handler)}removeAllNonBubblingListeners(element){const id=element.getAttribute("data-dioxus-id");delete this.local[id]}getNode(id){return this.nodes[id]}pushRoot(node){this.stack.push(node)}appendChildren(id,many){const root=this.nodes[id],els=this.stack.splice(this.stack.length-many);for(let k=0;k<many;k++)root.appendChild(els[k])}loadChild(ptr,len){let node=this.stack[this.stack.length-1],ptr_end=ptr+len;for(;ptr<ptr_end;ptr++){let end=this.m.getUint8(ptr);for(node=node.firstChild;end>0;end--)node=node.nextSibling}return node}saveTemplate(nodes,tmpl_id){this.templates[tmpl_id]=nodes}hydrate_node(hydrateNode,ids){const split=hydrateNode.getAttribute("data-node-hydration").split(","),id=ids[parseInt(split[0])];if(this.nodes[id]=hydrateNode,split.length>1){hydrateNode.listening=split.length-1,hydrateNode.setAttribute("data-dioxus-id",id.toString());for(let j=1;j<split.length;j++){const split2=split[j].split(":"),event_name=split2[0],bubbles=split2[1]==="1";this.createListener(event_name,hydrateNode,bubbles)}}}hydrate(ids,underNodes){for(let i=0;i<underNodes.length;i++){const under=underNodes[i];if(under instanceof HTMLElement){if(under.getAttribute("data-node-hydration"))this.hydrate_node(under,ids);const hydrateNodes=under.querySelectorAll("[data-node-hydration]");for(let i2=0;i2Line truncated
let bubbles,field,id,many,ns;
export class RawInterpreter extends BaseInterpreter {
constructor(r) {
super();
this.d=r;
this.m = null;
this.p = null;
this.ls = null;
this.t = null;
this.op = null;
this.e = null;
this.z = null;
this.metaflags = null;
this.u16buf=null;this.u16bufp=null;this.u32buf=null;this.u32bufp=null;this.u8buf=null;this.u8bufp=null;this.attr = [];
this.attr_cache_hit = null;
this.attr_cache_idx;
this.get_attr = function() {
this.attr_cache_idx = this.u8buf[this.u8bufp++];
if(this.attr_cache_idx & 128){
this.attr_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]);
this.attr[this.attr_cache_idx&4294967167]=this.attr_cache_hit;
return this.attr_cache_hit;
}
else{
return this.attr[this.attr_cache_idx&4294967167];
}
};this.el = [];
this.el_cache_hit = null;
this.el_cache_idx;
this.get_el = function() {
this.el_cache_idx = this.u8buf[this.u8bufp++];
if(this.el_cache_idx & 128){
this.el_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]);
this.el[this.el_cache_idx&4294967167]=this.el_cache_hit;
return this.el_cache_hit;
}
else{
return this.el[this.el_cache_idx&4294967167];
}
};this.evt = [];
this.evt_cache_hit = null;
this.evt_cache_idx;
this.get_evt = function() {
this.evt_cache_idx = this.u8buf[this.u8bufp++];
if(this.evt_cache_idx & 128){
this.evt_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]);
this.evt[this.evt_cache_idx&4294967167]=this.evt_cache_hit;
return this.evt_cache_hit;
}
else{
return this.evt[this.evt_cache_idx&4294967167];
}
};this.namespace = [];
this.namespace_cache_hit = null;
this.namespace_cache_idx;
this.get_namespace = function() {
this.namespace_cache_idx = this.u8buf[this.u8bufp++];
if(this.namespace_cache_idx & 128){
this.namespace_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]);
this.namespace[this.namespace_cache_idx&4294967167]=this.namespace_cache_hit;
return this.namespace_cache_hit;
}
else{
return this.namespace[this.namespace_cache_idx&4294967167];
}
};this.ns_cache = [];
this.ns_cache_cache_hit = null;
this.ns_cache_cache_idx;
this.get_ns_cache = function() {
this.ns_cache_cache_idx = this.u8buf[this.u8bufp++];
if(this.ns_cache_cache_idx & 128){
this.ns_cache_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]);
this.ns_cache[this.ns_cache_cache_idx&4294967167]=this.ns_cache_cache_hit;
return this.ns_cache_cache_hit;
}
else{
return this.ns_cache[this.ns_cache_cache_idx&4294967167];
}
};this.s = "";this.lsp = null;this.sp = null;this.sl = null;this.c = new TextDecoder();
}
update_memory(b){
this.m=new DataView(b.buffer)
}
run(){
this.metaflags=this.m.getUint32(this.d,true);
if((this.metaflags>>>6)&1){
this.ls=this.m.getUint32(this.d+6*4,true);
}
this.p=this.ls;
if ((this.metaflags>>>4)&1){
this.t = this.m.getUint32(this.d+4*4,true);
this.u16buf=new Uint16Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%2)/2);
}
this.u16bufp=0;if ((this.metaflags>>>3)&1){
this.t = this.m.getUint32(this.d+3*4,true);
this.u32buf=new Uint32Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%4)/4);
}
this.u32bufp=0;if ((this.metaflags>>>5)&1){
this.t = this.m.getUint32(this.d+5*4,true);
this.u8buf=new Uint8Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%1)/1);
}
this.u8bufp=0;if (this.metaflags&1){
this.lsp = this.m.getUint32(this.d+1*4,true);
}
if ((this.metaflags>>>2)&1) {
this.sl = this.m.getUint32(this.d+2*4,true);
if ((this.metaflags>>>1)&1) {
this.sp = this.lsp;
this.s = "";
this.e = this.sp + ((this.sl / 4) | 0) * 4;
while (this.sp < this.e) {
this.t = this.m.getUint32(this.sp, true);
this.s += String.fromCharCode(
this.t & 255,
(this.t & 65280) >> 8,
(this.t & 16711680) >> 16,
this.t >> 24
);
this.sp += 4;
}
while (this.sp < this.lsp + this.sl) {
this.s += String.fromCharCode(this.m.getUint8(this.sp++));
}
} else {
let buffer = new Uint8Array(this.m.buffer, this.lsp, this.sl);
// If the wasm buffer is a shared array buffer, we need to copy the data out before decoding https://github.com/DioxusLabs/dioxus/issues/2589
// Note: We intentionally don't use instanceof here because SharedArrayBuffer can be created even when SharedArrayBuffer is not defined...
if (this.m.buffer.constructor.name === "SharedArrayBuffer") {
let arrayBuffer = new ArrayBuffer(this.sl);
new Uint8Array(arrayBuffer).set(buffer);
buffer = arrayBuffer;
}
this.s = this.c.decode(buffer);
}
}
this.sp=0;
for(;;){
this.op=this.m.getUint32(this.p,true);
this.p+=4;
this.z=0;
while(this.z++<4){
switch(this.op&255){
case 0:{this.pushRoot(this.nodes[this.u32buf[this.u32bufp++]]);}break;case 1:{this.appendChildren(this.u32buf[this.u32bufp++], this.u16buf[this.u16bufp++]);}break;case 2:{this.stack.pop();}break;case 3:{const root = this.nodes[this.u32buf[this.u32bufp++]]; let els = this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]); if (root.listening) { this.removeAllNonBubblingListeners(root); } root.replaceWith(...els);}break;case 4:{let node = this.nodes[this.u32buf[this.u32bufp++]];node.after(...this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]));}break;case 5:{let node = this.nodes[this.u32buf[this.u32bufp++]];node.before(...this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]));}break;case 6:{let node = this.nodes[this.u32buf[this.u32bufp++]]; if (node !== undefined) { if (node.listening) { this.removeAllNonBubblingListeners(node); } node.remove(); }}break;case 7:{this.stack.push(document.createTextNode(this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++])));}break;case 8:{let node = document.createTextNode(this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++])); this.nodes[this.u32buf[this.u32bufp++]] = node; this.stack.push(node);}break;case 9:{let node = document.createComment('placeholder'); this.stack.push(node); this.nodes[this.u32buf[this.u32bufp++]] = node;}break;case 10:id=this.u32buf[this.u32bufp++];
const node = this.nodes[id];
if(node.listening){node.listening += 1;}else{node.listening = 1;}
node.setAttribute('data-dioxus-id', `${id}`);
this.createListener(this.get_evt(), node, this.u8buf[this.u8bufp++]);
break;case 11:{let node = this.nodes[this.u32buf[this.u32bufp++]]; node.listening -= 1; node.removeAttribute('data-dioxus-id'); this.removeListener(node, this.get_evt(), this.u8buf[this.u8bufp++]);}break;case 12:{this.nodes[this.u32buf[this.u32bufp++]].textContent = this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]);}break;case 13:{let node = this.nodes[this.u32buf[this.u32bufp++]]; this.setAttributeInner(node, this.get_attr(), this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]), this.get_ns_cache());}break;case 14:field=this.get_attr();ns=this.get_ns_cache();{
let node = this.nodes[this.u32buf[this.u32bufp++]];
if (!ns) {
switch (field) {
case "value":
node.value = "";
node.removeAttribute("value");
break;
case "checked":
node.checked = false;
break;
case "selected":
node.selected = false;
break;
case "dangerous_inner_html":
node.innerHTML = "";
break;
default:
node.removeAttribute(field);
break;
}
} else if (ns == "style") {
node.style.removeProperty(field);
} else {
node.removeAttributeNS(ns, field);
}
}break;case 15:{this.nodes[this.u32buf[this.u32bufp++]] = this.loadChild(this.u32buf[this.u32bufp++], this.u8buf[this.u8bufp++]);}break;case 16:{let els = this.stack.splice(this.stack.length - this.u16buf[this.u16bufp++]); let node = this.loadChild(this.u32buf[this.u32bufp++], this.u8buf[this.u8bufp++]); node.replaceWith(...els);}break;case 17:{let node = this.templates[this.u16buf[this.u16bufp++]][this.u16buf[this.u16bufp++]].cloneNode(true); this.nodes[this.u32buf[this.u32bufp++]] = node; this.stack.push(node);}break;case 18:many=this.u16buf[this.u16bufp++];{
let root = this.stack[this.stack.length-many-1];
let els = this.stack.splice(this.stack.length-many);
for (let k = 0; k < many; k++) {
root.appendChild(els[k]);
}
}break;case 19:{this.setAttributeInner(this.stack[this.stack.length-1], this.get_attr(), this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]), this.get_ns_cache());}break;case 20:{let node = document.createComment('placeholder'); this.stack.push(node);}break;case 21:{this.stack.push(document.createElement(this.get_el()))}break;case 22:{this.stack.push(document.createElementNS(this.get_namespace(), this.get_el()))}break;case 23:{this.templates[this.u16buf[this.u16bufp++]] = this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]);}break;case 24:id=this.u32buf[this.u32bufp++];bubbles=this.u8buf[this.u8bufp++];
bubbles = bubbles == 1;
let this_node = this.nodes[id];
if(this_node.listening){
this_node.listening += 1;
} else {
this_node.listening = 1;
}
this_node.setAttribute('data-dioxus-id', `${id}`);
const event_name = this.get_evt();
// if this is a mounted listener, we send the event immediately
if (event_name === "mounted") {
window.ipc.postMessage(
this.sendSerializedEvent({
name: event_name,
element: id,
data: null,
bubbles,
})
);
} else {
this.createListener(event_name, this_node, bubbles, (event) => {
this.handler(event, event_name, bubbles);
});
}break;case 25:{this.nodes[this.u32buf[this.u32bufp++]] = this.loadChild((()=>{this.e=this.u8bufp+this.u32buf[this.u32bufp++];const final_array = this.u8buf.slice(this.u8bufp,this.e);this.u8bufp=this.e;return final_array;})());}break;case 26:{let els = this.stack.splice(this.stack.length - this.u16buf[this.u16bufp++]); let node = this.loadChild((()=>{this.e=this.u8bufp+this.u32buf[this.u32bufp++];const final_array = this.u8buf.slice(this.u8bufp,this.e);this.u8bufp=this.e;return final_array;})()); node.replaceWith(...els);}break;case 27:return true;
}
this.op>>>=8;
}
}
}
run_from_bytes(bytes){
this.d = 0;
this.update_memory(new Uint8Array(bytes))
this.run()
}
}
@@ -1 +0,0 @@
function setAttributeInner(node,field,value,ns){if(ns==="style"){node.style.setProperty(field,value);return}if(ns){node.setAttributeNS(ns,field,value);return}switch(field){case"value":if(node.value!==value)node.value=value;break;case"initial_value":node.defaultValue=value;break;case"checked":node.checked=truthy(value);break;case"initial_checked":node.defaultChecked=truthy(value);break;case"selected":node.selected=truthy(value);break;case"initial_selected":node.defaultSelected=truthy(value);break;case"dangerous_inner_html":node.innerHTML=value;break;default:if(!truthy(value)&&isBoolAttr(field))node.removeAttribute(field);else node.setAttribute(field,value)}}var truthy=function(val){return val==="true"||val===!0},isBoolAttr=function(field){switch(field){case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"playsinline":case"readonly":case"required":case"reversed":case"selected":case"truespeed":case"webkitdirectory":return!0;default:return!1}};function retrieveFormValues(form){const formData=new FormData(form),contents={};return formData.forEach((value,key)=>{if(contents[key])contents[key].push(value);else contents[key]=[value]}),{valid:form.checkValidity(),values:contents}}export{setAttributeInner,retrieveFormValues};
@@ -1 +0,0 @@
function register_rehydrate_chunk_for_streaming(callback){return register_rehydrate_chunk_for_streaming_debug(callback)}function register_rehydrate_chunk_for_streaming_debug(callback){window.hydration_callback=callback;for(let i=0;i<window.hydrate_queue.length;i++){const[id,data,debug_types,debug_locations]=window.hydrate_queue[i];window.hydration_callback(id,data,debug_types,debug_locations)}}export{register_rehydrate_chunk_for_streaming_debug,register_rehydrate_chunk_for_streaming};
@@ -1 +0,0 @@
function monkeyPatchConsole(ws){const console=window.console,log=console.log,info=console.info,warn=console.warn,error=console.error,debug=console.debug;console.log=function(...args){if(ws.readyState===WebSocket.OPEN)ws.send(JSON.stringify({Log:{level:"log",messages:args}}));log.apply(console,args)},console.info=function(...args){if(ws.readyState===WebSocket.OPEN)ws.send(JSON.stringify({Log:{level:"info",messages:args}}));info.apply(console,args)},console.warn=function(...args){if(ws.readyState===WebSocket.OPEN)ws.send(JSON.stringify({Log:{level:"warn",messages:args}}));warn.apply(console,args)},console.error=function(...args){if(ws.readyState===WebSocket.OPEN)ws.send(JSON.stringify({Log:{level:"error",messages:args}}));error.apply(console,args)},console.debug=function(...args){if(ws.readyState===WebSocket.OPEN)ws.send(JSON.stringify({Log:{level:"debug",messages:args}}));debug.apply(console,args)}}export{monkeyPatchConsole};
-11
View File
@@ -1,11 +0,0 @@
export function get_form_data(form) {
let values = new Map();
const formData = new FormData(form);
for (let name of formData.keys()) {
values.set(name, formData.getAll(name));
}
return values;
}
-12
View File
@@ -1,12 +0,0 @@
export function get_select_data(select) {
let values = [];
for (let i = 0; i < select.options.length; i++) {
let option = select.options[i];
if (option.selected) {
values.push(option.value.toString());
}
}
return values;
}
@@ -1 +0,0 @@
class Channel{pending;waiting;constructor(){this.pending=[],this.waiting=[]}send(data){if(this.waiting.length>0){this.waiting.shift()(data);return}this.pending.push(data)}async recv(){return new Promise((resolve,_reject)=>{if(this.pending.length>0){resolve(this.pending.shift());return}this.waiting.push(resolve)})}}class WeakDioxusChannel{inner;constructor(channel){this.inner=new WeakRef(channel)}rustSend(data){let channel=this.inner.deref();if(channel)channel.rustSend(data)}async rustRecv(){let channel=this.inner.deref();if(channel)return await channel.rustRecv()}}class DioxusChannel{weak(){return new WeakDioxusChannel(this)}}class WebDioxusChannel extends DioxusChannel{js_to_rust;rust_to_js;owner;constructor(owner){super();this.owner=owner,this.js_to_rust=new Channel,this.rust_to_js=new Channel}weak(){return new WeakDioxusChannel(this)}async recv(){return await this.rust_to_js.recv()}send(data){this.js_to_rust.send(data)}rustSend(data){this.rust_to_js.send(data)}async rustRecv(){return await this.js_to_rust.recv()}}export{WebDioxusChannel};