fix(web): restore chat composer disabled-state messaging and clean up code (#2526)

This commit is contained in:
wenjie authored and GitHub committed 2026-04-15 11:24:27 +08:00
1 parent 773a94c414
commit 51ab3b1385
10 files changed
+184 -161

No files matched your search

+5 -4
View File
@@ -41,9 +41,7 @@ export async function postLauncherDashboardLogout(): Promise<boolean> {
return res.ok
}
export type SetupResult =
| { ok: true }
| { ok: false; error: string }
export type SetupResult = { ok: true } | { ok: false; error: string }
export async function postLauncherDashboardSetup(
password: string,
@@ -53,7 +51,10 @@ export async function postLauncherDashboardSetup(
method: "POST",
headers: { "Content-Type": "application/json" },
credentials: "same-origin",
body: JSON.stringify({ password: password.trim(), confirm: confirm.trim() }),
body: JSON.stringify({
password: password.trim(),
confirm: confirm.trim(),
}),
})
if (res.ok) return { ok: true }
let msg = "Unknown error"