fix
This commit is contained in:
@@ -27,27 +27,93 @@
|
|||||||
<div id="dashboard-layout" class="hidden">
|
<div id="dashboard-layout" class="hidden">
|
||||||
<header class="flex items-center justify-between">
|
<header class="flex items-center justify-between">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<h3 class="text-xl mb-4">Add/Edit User</h3>
|
<img src="/static/img/logo.png" alt="ASF Logo" class="logo">
|
||||||
<form id="user-form">
|
<h1 class="text-xl">ASF SSO Admin</h1>
|
||||||
<input type="hidden" id="user-id">
|
|
||||||
<input type="text" id="user-username" placeholder="Username" required>
|
|
||||||
<input type="email" id="user-email" placeholder="Email" required>
|
|
||||||
<input type="password" id="user-password" placeholder="Password (leave blank to keep current)">
|
|
||||||
<div class="flex items-center gap-4 mb-4">
|
|
||||||
<label class="flex items-center gap-2">
|
|
||||||
<input type="checkbox" id="user-is-admin" style="width: auto; margin: 0;"> Admin
|
|
||||||
</label>
|
|
||||||
<label class="flex items-center gap-2">
|
|
||||||
<input type="checkbox" id="user-is-active" style="width: auto; margin: 0;" checked> Active
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-end gap-4">
|
|
||||||
<button type="button" class="btn btn-secondary"
|
|
||||||
onclick="closeModal('user-modal')">Cancel</button>
|
|
||||||
<button type="submit" class="btn btn-primary">Save</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
<button id="logout-btn" class="btn btn-secondary">Logout</button>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="p-8">
|
||||||
|
<!-- Tabs -->
|
||||||
|
<div class="flex gap-4 mb-8">
|
||||||
|
<button class="btn btn-primary" onclick="showSection('users')">Users</button>
|
||||||
|
<button class="btn btn-secondary" onclick="showSection('apps')">Applications</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Users Section -->
|
||||||
|
<section id="users-section">
|
||||||
|
<div class="flex justify-between items-center mb-4">
|
||||||
|
<h2 class="text-2xl">Users</h2>
|
||||||
|
<button class="btn btn-primary" onclick="addUser()">Add User</button>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<table id="users-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Username</th>
|
||||||
|
<th>Email</th>
|
||||||
|
<th>Admin</th>
|
||||||
|
<th>Active</th>
|
||||||
|
<th>Assigned Apps</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- Users will be populated here -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Applications Section -->
|
||||||
|
<section id="apps-section" class="hidden">
|
||||||
|
<div class="flex justify-between items-center mb-4">
|
||||||
|
<h2 class="text-2xl">Applications</h2>
|
||||||
|
<button class="btn btn-primary" onclick="addApp()">Add Application</button>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<table id="apps-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>URL</th>
|
||||||
|
<th>API Key</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<!-- Apps will be populated here -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- User Modal -->
|
||||||
|
<div id="user-modal" class="modal-overlay hidden">
|
||||||
|
<div class="card modal">
|
||||||
|
<h3 class="text-xl mb-4">Add/Edit User</h3>
|
||||||
|
<form id="user-form">
|
||||||
|
<input type="hidden" id="user-id">
|
||||||
|
<input type="text" id="user-username" placeholder="Username" required>
|
||||||
|
<input type="email" id="user-email" placeholder="Email" required>
|
||||||
|
<input type="password" id="user-password" placeholder="Password (leave blank to keep current)">
|
||||||
|
<div class="flex items-center gap-4 mb-4">
|
||||||
|
<label class="flex items-center gap-2">
|
||||||
|
<input type="checkbox" id="user-is-admin" style="width: auto; margin: 0;"> Admin
|
||||||
|
</label>
|
||||||
|
<label class="flex items-center gap-2">
|
||||||
|
<input type="checkbox" id="user-is-active" style="width: auto; margin: 0;" checked> Active
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-end gap-4">
|
||||||
|
<button type="button" class="btn btn-secondary" onclick="closeModal('user-modal')">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- App Modal -->
|
<!-- App Modal -->
|
||||||
@@ -82,7 +148,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/js/app.js?v=2"></script>
|
<script src="/static/js/app.js?v=3"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user