1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-14 01:26:03 +08:00
Files
AzurLaneAutoScript/webapp/packages/main/src/relaunchApp.ts
SevCrane 5e482958f6 AlasGG
2024-06-05 23:20:28 +08:00

16 lines
398 B
TypeScript

import {app} from 'electron';
import {ALAS_RELAUNCH_ARGV} from '@common/constant/config';
export const isRelaunch = process.argv.includes(ALAS_RELAUNCH_ARGV);
function relaunchApp() {
/**
* TODO Some events need to be rehandled for restart operations
*/
if (!isRelaunch) {
app.relaunch({args: process.argv.slice(1).concat([ALAS_RELAUNCH_ARGV])});
}
}
export default relaunchApp;