如何从桌面通知中覆盖或删除签名“ electron.app.Electron”

问题描述

我正在尝试删除或覆盖我的电子通知签名。

这就是我得到的:

enter image description here

我正在尝试通过了解是否覆盖签名的electronic.app.Electron或将其完全删除 我已经在测试模式(npm run start)以及以.exe包装时进行了测试 我还注意到我删除了签名的图标,但是这种签名很不愉快。

我当前的通知代码如下:

function showNotification() {
  const notification = new Notification("new message",{
    body: "app launched",icon: __dirname + '/icon.ico',tag: 'soManyNotification',hasReply: true
  })
}
console.log(Notification.permission)
if (Notification.permission === "granted") {
  showNotification()
  //alert('we have permission');
} else if (Notification.permission === "denied") {
  Notification.requestPermission()
};

任何帮助将不胜感激^^

解决方法

// If this is running on Windows then set UserModelID for notification

if (isWin()) {
    app.setAppUserModelId("Proper name to be replaced");
}