mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-15 08:47:20 +08:00
AlasGG
This commit is contained in:
15
webapp/packages/main/src/relaunchApp.ts
Normal file
15
webapp/packages/main/src/relaunchApp.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user