implement instance editing capability and move user creation to a modal

This commit is contained in:
CPTN Cosmo 2026-04-18 17:19:13 +02:00
parent b185c7a70b
commit 2e160cdd14
3 changed files with 123 additions and 35 deletions

View file

@ -68,24 +68,13 @@
<div id="admin-section" class="tab-content">
<div class="card user-management-card">
<h2>User Management</h2>
<form id="create-user-form" class="user-create-form">
<div class="form-group">
<label for="new-username">Username</label>
<input type="text" id="new-username" placeholder="Enter username" required>
</div>
<div class="form-group">
<label for="new-password">Password</label>
<input type="password" id="new-password" placeholder="Enter password" required>
</div>
<div class="form-group">
<label class="checkbox-container">
<input type="checkbox" id="new-is-admin">
<span class="checkbox-label">Grant Administrator Privileges</span>
</label>
</div>
<button type="submit" class="btn btn-primary">Create User</button>
</form>
<div class="instances-header">
<h2>User Management</h2>
<button class="btn btn-primary btn-sm" id="show-add-user-btn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
Add User
</button>
</div>
<div id="users-list" class="users-list">
<!-- Users injected via JS -->
</div>
@ -140,6 +129,32 @@
</div>
</div>
<div id="add-user-modal" class="modal">
<div class="modal-content card">
<div class="modal-header">
<h2>Add User</h2>
<button class="btn-close">&times;</button>
</div>
<form id="create-user-form" class="user-create-form">
<div class="form-group">
<label for="new-username">Username</label>
<input type="text" id="new-username" placeholder="Enter username" required>
</div>
<div class="form-group">
<label for="new-password">Password</label>
<input type="password" id="new-password" placeholder="Enter password" required>
</div>
<div class="form-group">
<label class="checkbox-container">
<input type="checkbox" id="new-is-admin">
<span class="checkbox-label">Grant Administrator Privileges</span>
</label>
</div>
<button type="submit" class="btn btn-primary">Create User</button>
</form>
</div>
</div>
<div id="help-modal" class="modal">
<div class="modal-content card">
<div class="modal-header">