95 lines
3.9 KiB
HTML
95 lines
3.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Users - KlipperAnywhere</title>
|
|
<meta name="description" content="Manage KlipperAnywhere users.">
|
|
<meta id="csrf-meta" name="csrf-token" content="{{CSRF_TOKEN}}">
|
|
<link rel="stylesheet" href="/static/styles.css">
|
|
<link rel="icon" href="/favicon.ico">
|
|
<link rel="icon" type="image/png" href="/static/assets/favicon.png">
|
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
</head>
|
|
<body class="app-page">
|
|
<header class="app-header">
|
|
<a class="brand" href="/">
|
|
<span class="brand-mark" aria-hidden="true">K</span>
|
|
<span>KlipperAnywhere</span>
|
|
</a>
|
|
<nav class="nav-links" aria-label="Users navigation">
|
|
<div class="nav-group nav-core">
|
|
<a class="text-button" href="/dashboard">Dashboard</a>
|
|
<a class="text-button" href="/account">Account</a>
|
|
<a class="text-button admin-only" href="/admin" hidden>Admin</a>
|
|
</div>
|
|
<div class="nav-group nav-tools">
|
|
<div class="printer-switcher-group" aria-label="Printer switcher">
|
|
<label class="printer-switcher-label" for="printer-switcher">Printer</label>
|
|
<select id="printer-switcher" class="printer-switcher" aria-label="Switch printer">
|
|
<option value="">Loading printers...</option>
|
|
</select>
|
|
<button class="text-button" id="printer-switcher-open" type="button">Open</button>
|
|
</div>
|
|
<button class="text-button" id="refresh" type="button">Refresh</button>
|
|
<form class="logout-form" method="post" action="/logout">
|
|
<input type="hidden" name="csrf_token" value="{{CSRF_TOKEN}}">
|
|
<button class="text-button" type="submit">Sign out</button>
|
|
</form>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="dashboard-shell users-shell">
|
|
<section class="dashboard-heading">
|
|
<p class="eyebrow">Account management</p>
|
|
<h1 class="dashboard-title">Users</h1>
|
|
</section>
|
|
|
|
<section class="detail-grid users-grid" aria-live="polite">
|
|
<div class="detail-panel">
|
|
<div class="panel-heading">
|
|
<h2>Add user</h2>
|
|
</div>
|
|
<p class="auth-copy">Create another login for family members or shared access on the same printer server.</p>
|
|
<form id="create-user-form" class="user-form">
|
|
<label>
|
|
<span>Username</span>
|
|
<input name="username" autocomplete="off" required>
|
|
</label>
|
|
<label>
|
|
<span>Password</span>
|
|
<input name="password" type="password" autocomplete="new-password" required>
|
|
</label>
|
|
<label>
|
|
<span>Role</span>
|
|
<select name="role">
|
|
<option value="user">User</option>
|
|
<option value="admin">Admin</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
<span>Printer grants</span>
|
|
<textarea name="printer_grants" rows="4" placeholder="real-printer:read spare-printer:control"></textarea>
|
|
</label>
|
|
<button class="button primary" type="submit">Create user</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="detail-panel users-table-panel">
|
|
<div class="panel-heading">
|
|
<h2>Existing users</h2>
|
|
</div>
|
|
<p id="users-status" class="empty-state">Loading users...</p>
|
|
<div id="users-list" class="users-list"></div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<script src="/static/session.js"></script>
|
|
<script src="/static/printer-switcher.js"></script>
|
|
<script src="/static/session.js"></script>
|
|
<script src="/static/users.js"></script>
|
|
</body>
|
|
</html>
|