新增当列表文件损坏时对损坏文件的备份

This commit is contained in:
lyswhut
2020-07-06 18:15:03 +08:00
parent bcd13b6f27
commit 1efd56f48b
10 changed files with 80 additions and 10 deletions
+12
View File
@@ -0,0 +1,12 @@
const { mainOn, NAMES: { mainWindow: ipcMainWindowNames } } = require('../../common/ipc')
const { dialog } = require('electron')
mainOn(ipcMainWindowNames.show_dialog, (event, { type, message, detail }) => {
if (!global.modules.mainWindow) throw new Error('mainWindow is undefined')
dialog.showMessageBoxSync(global.modules.mainWindow, {
type,
message,
detail,
})
})