remove alert interface and use new error interface

This commit is contained in:
alu
2026-07-28 20:41:01 +00:00
parent 5786b7e1be
commit 1f672e16e6
7 changed files with 43 additions and 80 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { requestAPI, setAppearance } from "./utils.js";
import { dialog } from "./dialog.js";
import { dialog, error } from "./dialog.js";
window.addEventListener("DOMContentLoaded", init);
@@ -15,7 +15,7 @@ function handlePasswordChangeButton () {
if (result === "confirm") {
const result = await requestAPI("/access/password", "POST", { password: form.get("new-password") });
if (result.status !== 200) {
alert(`Attempted to change password but got: ${result.error}`);
error(`Attempted to change password but got: ${result.error}`);
}
}
});