feat(versioning): implement UI and server version tracking with build date display in footer

This commit is contained in:
Supra4E8C
2025-11-20 18:35:22 +08:00
parent 23d8d20dbf
commit 6e0dec4567
7 changed files with 120 additions and 3 deletions

View File

@@ -732,6 +732,8 @@ export const authFilesModule = {
body: formData
});
this.updateVersionFromHeaders(response.headers);
if (!response.ok) {
let errorMessage = `HTTP ${response.status}`;
try {
@@ -891,6 +893,8 @@ export const authFilesModule = {
}
});
this.updateVersionFromHeaders(response.headers);
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
@@ -1029,6 +1033,8 @@ export const authFilesModule = {
body: formData
});
this.updateVersionFromHeaders(response.headers);
if (!response.ok) {
const errorData = await response.json().catch(() => ({}));
throw new Error(errorData.error || `HTTP ${response.status}`);

View File

@@ -160,6 +160,8 @@ export const configEditorModule = {
}
});
this.updateVersionFromHeaders(response.headers);
if (!response.ok) {
const errorText = await response.text().catch(() => '');
const message = errorText || `HTTP ${response.status}`;
@@ -235,6 +237,8 @@ export const configEditorModule = {
body: yamlText
});
this.updateVersionFromHeaders(response.headers);
if (!response.ok) {
const contentType = response.headers.get('content-type') || '';
let errorText = '';

View File

@@ -100,6 +100,7 @@ export const loginModule = {
this.isConnected = false;
this.clearCache();
this.stopStatusUpdateTimer();
this.resetVersionInfo();
localStorage.removeItem('isLoggedIn');
secureStorage.removeItem('managementKey');