fix 13
This commit is contained in:
@ -41,14 +41,14 @@
|
||||
const result = await postJson("/auth/login", { username, password });
|
||||
pendingToken = result.pending_token;
|
||||
|
||||
passwordFields.style.display = "none";
|
||||
totpFields.style.display = "block";
|
||||
passwordFields.classList.add("hidden");
|
||||
totpFields.classList.remove("hidden");
|
||||
|
||||
if (!result.totp_enrolled) {
|
||||
mode = "enroll_start";
|
||||
const enroll = await postJson("/auth/totp/enroll/start", { pending_token: pendingToken });
|
||||
document.getElementById("qr-img").src = "data:image/png;base64," + enroll.qr_png_base64;
|
||||
enrollBox.style.display = "block";
|
||||
enrollBox.classList.remove("hidden");
|
||||
mode = "enroll_confirm";
|
||||
submitBtn.textContent = "TOTP bestaetigen & einrichten";
|
||||
} else {
|
||||
@ -68,7 +68,7 @@
|
||||
if (mode === "enroll_confirm") {
|
||||
const code = document.getElementById("totp-code").value.trim();
|
||||
const result = await postJson("/auth/totp/enroll/confirm", { pending_token: pendingToken, code });
|
||||
recoveryBox.style.display = "block";
|
||||
recoveryBox.classList.remove("hidden");
|
||||
document.getElementById("recovery-codes").textContent = result.recovery_codes.join("\n");
|
||||
submitBtn.textContent = "Weiter zum Dashboard";
|
||||
mode = "done";
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
const hostId = window.JUMPHOST_HOST_ID;
|
||||
const statusEl = document.getElementById("status");
|
||||
const shell = document.getElementById("session-shell");
|
||||
const hostId = shell.dataset.hostId;
|
||||
const statusEl = document.getElementById("status");
|
||||
const displayDiv = document.getElementById("rdp-display");
|
||||
|
||||
const proto = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
(() => {
|
||||
"use strict";
|
||||
|
||||
const hostId = window.JUMPHOST_HOST_ID;
|
||||
const statusEl = document.getElementById("status");
|
||||
const shell = document.getElementById("session-shell");
|
||||
const hostId = shell.dataset.hostId;
|
||||
const statusEl = document.getElementById("status");
|
||||
|
||||
const term = new Terminal({
|
||||
cursorBlink: true,
|
||||
|
||||
Reference in New Issue
Block a user