Vanessa 2026-03-07 22:44:23 +08:00
parent 8fca15e9ba
commit e514746cd6
2 changed files with 25 additions and 6 deletions

View file

@ -18,6 +18,7 @@ const {
net,
app,
BrowserWindow,
Notification,
shell,
Menu,
MenuItem,
@ -953,6 +954,12 @@ app.whenReady().then(() => {
case "showItemInFolder":
shell.showItemInFolder(data.filePath);
break;
case "notification":
new Notification({
title: data.title,
body: data.body,
}).show();
break;
case "setSpellCheckerLanguages":
BrowserWindow.getAllWindows().forEach(item => {
item.webContents.session.setSpellCheckerLanguages(data.languages);
@ -1542,4 +1549,4 @@ function writeLog(out) {
} catch (e) {
console.error(e);
}
}
}