mirror of
https://github.com/xxnuo/MTranServer.git
synced 2026-09-03 06:35:20 +08:00
17 lines
319 B
JavaScript
17 lines
319 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();
|
|
});
|
|
}
|