feat(updates): improve check updates confirmation

This commit is contained in:
pixelpaws
2025-11-03 22:36:57 +08:00
parent d73903e82e
commit 6dea9a76bc
15 changed files with 231 additions and 4 deletions

View File

@@ -235,13 +235,22 @@ export class PageControls {
this._updateCheckInProgress = true;
setLoadingState(true);
const handleComplete = () => {
this._updateCheckInProgress = false;
setLoadingState(false);
};
try {
await performModelUpdateCheck();
await performModelUpdateCheck({
onComplete: handleComplete,
});
} catch (error) {
console.error('Failed to check model updates:', error);
} finally {
this._updateCheckInProgress = false;
setLoadingState(false);
if (this._updateCheckInProgress) {
this._updateCheckInProgress = false;
setLoadingState(false);
}
dropdownGroup?.classList.remove('active');
}
}