refactor(webui): replace real-time polling with click-to-check version updates
- Remove background PyPI polling loop and WebSocket broadcast - Remove UpdateBanner from ThreadHeader (keep main page clean) - Add on-demand version check endpoint (GET /api/settings/version-check) - Add 'About' section in Settings > Overview with check-for-updates button - Design: no auto-fetch, user initiates check explicitly via button click
This commit is contained in:
@@ -229,6 +229,26 @@ export async function fetchSettingsUsage(
|
||||
);
|
||||
}
|
||||
|
||||
export interface VersionCheckResult {
|
||||
updateAvailable: {
|
||||
currentVersion: string;
|
||||
latestVersion: string;
|
||||
pypiUrl?: string;
|
||||
} | null;
|
||||
}
|
||||
|
||||
export async function checkVersion(
|
||||
token: string,
|
||||
base: string = "",
|
||||
): Promise<VersionCheckResult> {
|
||||
return request<VersionCheckResult>(
|
||||
`${base}/api/settings/version-check`,
|
||||
token,
|
||||
undefined,
|
||||
10_000,
|
||||
);
|
||||
}
|
||||
|
||||
export async function fetchWorkspaces(
|
||||
token: string,
|
||||
base: string = "",
|
||||
|
||||
Reference in New Issue
Block a user