Files
cfdav/web/index.html

78 lines
2.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>cfdav Admin</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<main class="container">
<h1>cfdav Admin</h1>
<section id="loginCard" class="card">
<h2>Login</h2>
<div class="row">
<label>API Base URL</label>
<input id="apiBase" placeholder="https://cfdav.fnos.workers.dev" />
</div>
<div class="row">
<label>Email</label>
<input id="email" placeholder="admin@example.com" />
</div>
<div class="row">
<label>Password</label>
<input id="password" type="password" placeholder="******" />
</div>
<button id="loginBtn">Login</button>
<p class="hint">提示API Base 留空则默认同域(/api/admin</p>
</section>
<section id="app" class="hidden">
<section class="card">
<h2>Users</h2>
<div class="toolbar">
<button id="refreshBtn">Refresh</button>
<button id="logoutBtn" class="ghost">Logout</button>
</div>
<table>
<thead>
<tr>
<th>Email</th>
<th>Admin</th>
<th>Created</th>
<th>Action</th>
</tr>
</thead>
<tbody id="userList"></tbody>
</table>
</section>
<section class="card">
<h2>Create User</h2>
<div class="row">
<label>Email</label>
<input id="newEmail" placeholder="user@example.com" />
</div>
<div class="row">
<label>Password</label>
<input id="newPassword" type="password" placeholder="password" />
</div>
<div class="row">
<label>Admin</label>
<input id="newIsAdmin" type="checkbox" />
</div>
<button id="createBtn">Create</button>
</section>
</section>
<section class="card">
<h2>Log</h2>
<pre id="log"></pre>
</section>
</main>
<script src="./app.js"></script>
</body>
</html>