added passkey support (closes #6)
All checks were successful
test-and-lint / test-and-lint (pull_request) Successful in 2m50s
All checks were successful
test-and-lint / test-and-lint (pull_request) Successful in 2m50s
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<div class="modal-split" style="align-items: start;">
|
||||
<div class="card" style="max-width: 100%; text-align: left; padding: 1.5rem;">
|
||||
<h2 style="font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text);">Profile</h2>
|
||||
<p style="color: var(--text-muted); margin-bottom: 1.5rem;">Change your username. Avatar upload is planned for later.</p>
|
||||
<p style="color: var(--text-muted); margin-bottom: 1.5rem;">Change your username.</p>
|
||||
|
||||
<form id="username-form" onsubmit="saveAccountUsername(event)">
|
||||
<div class="form-group">
|
||||
@@ -22,17 +22,6 @@
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Save username</button>
|
||||
</form>
|
||||
|
||||
<div style="margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border);">
|
||||
<h3 style="font-size: 1rem; margin-bottom: 0.75rem; color: var(--text);">Avatar</h3>
|
||||
<div style="display:flex; align-items:center; gap:1rem; color: var(--text-muted);">
|
||||
<div id="settings-avatar-preview" class="avatar">M</div>
|
||||
<div>
|
||||
<div>Avatar upload is not implemented yet.</div>
|
||||
<div style="font-size:0.85rem; margin-top:0.25rem;">This placeholder keeps the settings layout ready for it.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="max-width: 100%; text-align: left; padding: 1.5rem;">
|
||||
@@ -136,5 +125,48 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="max-width: 100%; text-align: left; padding: 1.5rem; margin-top: 1.5rem;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap;">
|
||||
<div>
|
||||
<h2 style="font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text);">Passkeys</h2>
|
||||
<p id="passkey-status" style="color: var(--text-muted); margin-bottom: 1rem;">Loading passkey status...</p>
|
||||
</div>
|
||||
<span id="passkey-badge" class="badge">Unknown</span>
|
||||
</div>
|
||||
|
||||
<p style="color: var(--text-muted); margin-bottom: 1rem;">Use device-bound or synced passkeys for phishing-resistant sign-in. Passkeys are protected by your browser, operating system, or security key.</p>
|
||||
|
||||
<div id="passkey-unsupported-message" class="message error" style="display: none; margin-bottom: 1rem;">This browser does not support passkeys.</div>
|
||||
|
||||
<div id="passkey-list" style="display: grid; gap: 0.75rem; margin-bottom: 1.5rem;"></div>
|
||||
|
||||
<div class="modal-split" style="align-items: start;">
|
||||
<div>
|
||||
<h3 style="font-size: 1rem; margin-bottom: 0.75rem; color: var(--text);">Add passkey</h3>
|
||||
<p style="color: var(--text-muted); margin-bottom: 1rem;">Confirm with your current password, then follow your browser's passkey prompt.</p>
|
||||
<form id="passkey-add-form" onsubmit="addPasskey(event)">
|
||||
<div class="form-group">
|
||||
<input type="text" id="passkey-name" placeholder="Passkey name" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="password" id="passkey-add-password" placeholder="Current password" required autocomplete="current-password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="width: auto; padding: 0.6rem 1.2rem;">Add passkey</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3 style="font-size: 1rem; margin-bottom: 0.75rem; color: var(--text);">Disable passkeys</h3>
|
||||
<p style="color: var(--text-muted); margin-bottom: 1rem;">This removes all stored passkeys and revokes active refresh sessions.</p>
|
||||
<form id="passkey-disable-form" onsubmit="disablePasskeys(event)">
|
||||
<div class="form-group">
|
||||
<input type="password" id="passkey-disable-password" placeholder="Current password" required autocomplete="current-password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-secondary danger-btn">Disable all passkeys</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user