implement user authentication, role-based access control, and multi-user instance isolation
This commit is contained in:
parent
844879d301
commit
bb7053b01e
6 changed files with 354 additions and 19 deletions
|
|
@ -5,6 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>XIVLauncher Remote OTP</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<link rel="icon" type="image/png" href="/static/favicon.png">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -26,8 +27,15 @@
|
|||
</button>
|
||||
</header>
|
||||
|
||||
<nav id="main-nav" class="main-nav" style="display: none;">
|
||||
<button class="nav-item active" data-tab="instances">Instances</button>
|
||||
<button class="nav-item" id="nav-admin" data-tab="admin" style="display: none;">Admin</button>
|
||||
<button class="nav-item" data-tab="profile">Profile</button>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<div class="card add-instance-card">
|
||||
<div id="instances-section" class="tab-content active">
|
||||
<div class="card add-instance-card">
|
||||
<h2>Add Instance</h2>
|
||||
<form id="add-form">
|
||||
<div class="form-group">
|
||||
|
|
@ -89,6 +97,42 @@
|
|||
<!-- Instances injected via JS -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="admin-section" class="tab-content">
|
||||
<div class="card user-management-card">
|
||||
<h2>User Management</h2>
|
||||
<form id="create-user-form" class="form-row">
|
||||
<div class="form-group">
|
||||
<input type="text" id="new-username" placeholder="Username" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" id="new-password" placeholder="Password" required>
|
||||
</div>
|
||||
<div class="form-group checkbox-group">
|
||||
<label><input type="checkbox" id="new-is-admin"> Admin</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Create User</button>
|
||||
</form>
|
||||
<div id="users-list" class="users-list">
|
||||
<!-- Users injected via JS -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="profile-section" class="tab-content">
|
||||
<div class="card profile-card">
|
||||
<h2>My Profile</h2>
|
||||
<p class="helper-text">Change your account password below.</p>
|
||||
<form id="change-password-form">
|
||||
<div class="form-group">
|
||||
<label for="profile-new-password">New Password</label>
|
||||
<input type="password" id="profile-new-password" placeholder="Enter new password" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Update Password</button>
|
||||
</form>
|
||||
<div id="profile-success" class="success-msg" style="display: none;">Password updated successfully!</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
|
@ -99,16 +143,20 @@
|
|||
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
|
||||
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
|
||||
</svg>
|
||||
<h2>Login Required</h2>
|
||||
<h2>Login</h2>
|
||||
</div>
|
||||
<form id="login-form">
|
||||
<div class="form-group">
|
||||
<label for="login-username">Username</label>
|
||||
<input type="text" id="login-username" placeholder="Enter your username" required autocomplete="username">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="login-password">Password</label>
|
||||
<input type="password" id="login-password" placeholder="Enter your password" required autocomplete="current-password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Login</button>
|
||||
</form>
|
||||
<div id="login-error" class="login-error" style="display: none;">Invalid password</div>
|
||||
<div id="login-error" class="login-error" style="display: none;">Invalid username or password</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue