perf(webui): reduce initial loading delays

This commit is contained in:
DrSmoothl committed 2026-08-08 00:04:51 +08:00
1 parent c53c6651a5
commit 751217c13d
2 files changed
+13 -6

No files matched your search

+5 -2
View File
@@ -139,11 +139,14 @@ function AuthBoundary({ onboardingSteps }: { onboardingSteps: AdditionalOnboardi
if (ok) {
setAuthed(true);
setStatus('已连接');
setMustChange(await client.mustChangePassword());
const [nextMustChange] = await Promise.all([
client.mustChangePassword(),
refreshAgreements(),
]);
setMustChange(nextMustChange);
// Carry the URL password into the forced change-password gate so it
// needn't re-prompt for the old password (matches the login flow).
if (urlPassword) setLoginPassword(urlPassword);
await refreshAgreements();
}
setAuthChecked(true);
})();