mirror of
https://github.com/xxnuo/MTranServer.git
synced 2026-05-07 05:56:12 +08:00
17 lines
320 B
JavaScript
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();
|
|
});
|
|
}
|