mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): upgrade modular dashboard UI, 6-segment context meter, and consumption analytics
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @fileoverview Async entry point for Antigravity Usage & Speed Monitor.
|
||||
*/
|
||||
|
||||
import { App } from './App.js';
|
||||
import { startAsyncTelemetryLoop } from './store/telemetryStore.js';
|
||||
|
||||
export async function bootstrapApp(mountTarget = document.getElementById('app-root')) {
|
||||
if (!mountTarget) return null;
|
||||
const appInstance = App();
|
||||
mountTarget.appendChild(appInstance.el);
|
||||
const stopPolling = startAsyncTelemetryLoop(2000);
|
||||
return {
|
||||
appInstance,
|
||||
stopPolling,
|
||||
};
|
||||
}
|
||||
|
||||
export function init() {
|
||||
if (typeof document === 'undefined') return;
|
||||
if (document.readyState === 'loading' && typeof document.addEventListener === 'function') {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
bootstrapApp();
|
||||
});
|
||||
} else {
|
||||
bootstrapApp();
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
Reference in New Issue
Block a user