mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): dual-mount topbar capsule, live multi-session HUD, and customizable topbar metrics (v1.4.3)
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
/**
|
||||
* @fileoverview Async entry point for Antigravity Usage & Speed Monitor.
|
||||
* Automatically branches between Auxiliary Sidebar Webview mode (`#app-root`)
|
||||
* and Main Window Dual-Mount Overlay mode (`window.__AGUsageMonitorBridge`).
|
||||
*/
|
||||
|
||||
import { App } from './App.js';
|
||||
import { mountWindowOverlay } from './components/layout/WindowOverlayShell.js';
|
||||
import { isWindowOverlayMode } from './core/httpClient.js';
|
||||
import { startAsyncTelemetryLoop } from './store/telemetryStore.js';
|
||||
|
||||
export async function bootstrapApp(mountTarget = document.getElementById('app-root')) {
|
||||
async function bootstrapApp(mountTarget = document.getElementById('app-root')) {
|
||||
if (!mountTarget) return null;
|
||||
const appInstance = App();
|
||||
mountTarget.appendChild(appInstance.el);
|
||||
@@ -16,14 +20,22 @@ export async function bootstrapApp(mountTarget = document.getElementById('app-ro
|
||||
};
|
||||
}
|
||||
|
||||
export function init() {
|
||||
function startEntry() {
|
||||
if (isWindowOverlayMode()) {
|
||||
mountWindowOverlay();
|
||||
return;
|
||||
}
|
||||
bootstrapApp();
|
||||
}
|
||||
|
||||
function init() {
|
||||
if (typeof document === 'undefined') return;
|
||||
if (document.readyState === 'loading' && typeof document.addEventListener === 'function') {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
bootstrapApp();
|
||||
startEntry();
|
||||
});
|
||||
} else {
|
||||
bootstrapApp();
|
||||
startEntry();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user