mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 18:50:49 +08:00
feat(versioning): implement UI and server version tracking with build date display in footer
This commit is contained in:
@@ -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}`);
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
@@ -100,6 +100,7 @@ export const loginModule = {
|
||||
this.isConnected = false;
|
||||
this.clearCache();
|
||||
this.stopStatusUpdateTimer();
|
||||
this.resetVersionInfo();
|
||||
|
||||
localStorage.removeItem('isLoggedIn');
|
||||
secureStorage.removeItem('managementKey');
|
||||
|
||||
Reference in New Issue
Block a user