Files
MTranServer/scripts/electron-main.js
2026-01-01 17:21:06 +08:00

17 lines
320 B
JavaScript

import { app } from 'electron';
import { focusMainWindow, startDesktop } from '../desktop/app.js';
const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) {
app.quit();
} else {
app.on('second-instance', () => {
focusMainWindow();
});
app.whenReady().then(() => {
startDesktop();
});
}