feat: initial cfdav project with webdav+r2+d1 and pages admin docs
This commit is contained in:
77
web/index.html
Normal file
77
web/index.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user