'commit'
This commit is contained in:
@@ -6,6 +6,12 @@ createApp({
|
||||
// Common State
|
||||
// ==========================================
|
||||
const activeTab = ref('dashboard');
|
||||
|
||||
// Ad Overlay State
|
||||
const showAd = ref(true);
|
||||
const adCountdown = ref(10);
|
||||
let adTimer = null;
|
||||
|
||||
const apiBase = ref(window.location.origin || "http://localhost:8000");
|
||||
const isMobile = ref(window.innerWidth <= 768);
|
||||
|
||||
@@ -498,6 +504,11 @@ createApp({
|
||||
}
|
||||
});
|
||||
|
||||
const closeAd = () => {
|
||||
showAd.value = false;
|
||||
if (adTimer) clearInterval(adTimer);
|
||||
};
|
||||
|
||||
// ==========================================
|
||||
// Lifecycle
|
||||
// ==========================================
|
||||
@@ -514,6 +525,14 @@ createApp({
|
||||
renderChart();
|
||||
}, 10000);
|
||||
|
||||
// Ad Auto Close Timer
|
||||
adTimer = setInterval(() => {
|
||||
adCountdown.value--;
|
||||
if (adCountdown.value <= 0) {
|
||||
closeAd();
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// Degree QR Code
|
||||
if (!isMobile.value && typeof QRCode !== 'undefined') {
|
||||
const qrEl = document.getElementById("qrcode");
|
||||
@@ -538,7 +557,9 @@ createApp({
|
||||
loadAllOperatorsPrices, exportAllPrices, exportAiReport, startAiAnalysis, formatCell, getPriceColor, renderedAiText,
|
||||
// Degree
|
||||
userQuery, queryLoading, queryResult, examples,
|
||||
handleDegreeSearch, setExample, renderedResult, stopDegreeGeneration
|
||||
handleDegreeSearch, setExample, renderedResult, stopDegreeGeneration,
|
||||
// Ad
|
||||
showAd, adCountdown, closeAd
|
||||
};
|
||||
}
|
||||
}).use(ElementPlus).mount("#app");
|
||||
|
||||
Reference in New Issue
Block a user