feat(webui): optimize CSS build system and enhance UI quality
This commit is contained in:
@@ -69,6 +69,11 @@ document.addEventListener('alpine:init', () => {
|
||||
|
||||
this.connectionStatus = 'connected';
|
||||
this.lastUpdated = new Date().toLocaleTimeString();
|
||||
|
||||
// Fetch version from config endpoint if not already loaded
|
||||
if (this.initialLoad) {
|
||||
this.fetchVersion(password);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fetch error:', error);
|
||||
this.connectionStatus = 'disconnected';
|
||||
@@ -80,6 +85,20 @@ document.addEventListener('alpine:init', () => {
|
||||
}
|
||||
},
|
||||
|
||||
async fetchVersion(password) {
|
||||
try {
|
||||
const { response } = await window.utils.request('/api/config', {}, password);
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
if (data.version) {
|
||||
Alpine.store('global').version = data.version;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Failed to fetch version:', error);
|
||||
}
|
||||
},
|
||||
|
||||
computeQuotaRows() {
|
||||
const models = this.models || [];
|
||||
const rows = [];
|
||||
|
||||
Reference in New Issue
Block a user