Files
NTSH-Control/frontend/views/dashboard/ts/main.ts
2025-10-22 22:06:16 +02:00

38 lines
1.0 KiB
TypeScript

import { io } from 'socket.io-client';
import { MenuBar } from './menuBar';
import { TabController } from './tabController';
import { MorphFeature } from 'morphux';
import { DashboardCameraRunner } from './dashboard.camerarunner';
import { LogsHandler } from './logsHandler';
import { Calibration } from './calibration';
import { DashboardUnity } from './dashboard.unity';
const socket = io('/');
export class Main {
socket = socket;
MenuBar = new MenuBar(this);
TabController = new TabController(this);
Logs = new LogsHandler(this);
Calibration = new Calibration(this);
DashboardCameraRunner = new DashboardCameraRunner(this);
DashboardUnityRunner = new DashboardUnity(this);
constructor() {
if (window.location.search.includes('debug')) {
(window as any).SN = this;
console.log('Debug mode enabled');
}
}
}
MorphFeature.Loader({ active: true, message: 'Connecting to server...' });
socket.on('connect', () => {
console.log('Connected to server');
MorphFeature.Loader({ active: false });
});
const _Main = new Main();