move from PHP to VUE, improved Certificate listning

This commit is contained in:
Антон
2026-01-09 10:30:49 +03:00
parent c9af0a5bb1
commit 9b501a8585
23 changed files with 4235 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
import { ref } from 'vue';
const config = ref(null);
const isLoaded = ref(false);
export function useAppConfig() {
const loadConfig = async () => {
if (isLoaded.value) return;
try {
const response = await fetch('/config.json');
config.value = await response.json();
isLoaded.value = true;
} catch (error) {
console.error('Failed to load configuration:', error);
// Fallback or critical error handling
config.value = {
api_base_url: 'http://localhost:5001/api/v1',
refresh_interval: 30000
};
}
};
return {
config,
isLoaded,
loadConfig
};
}