how can you overwrite or remove the signature quot;electron.app.Electronquot; from the desktop notification(您如何覆盖或删除签名“electron.app.Electron?从桌面通知)
问题描述
我正在尝试删除或覆盖我由电子制作的通知签名.
I'm trying to remove or overwrite my notification signature made by electron.
这是我得到的:
here is what i get:
我正在尝试是否覆盖签名 electron.app.Electron 或完全删除它,通过知道我已经在测试模式 (npm run start
) 以及打包为 .exe
时对其进行了测试我也注意到我删除了签名的图标,但是没有一个会很不愉快.
I am trying to whether overwrite the signature electron.app.Electron or remove it completely, by knowing
that I have tested it on test mode (npm run start
), and also when packed as .exe
also I have noticed that I remove the icon the signature goes a way, but it is very unpleasant without one.
我当前的通知代码如下:
my current notification code is bellow:
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()
};
任何帮助将不胜感激^^
any help would be gratefully appreciated ^^
推荐答案
// If this is running on Windows then set UserModelID for notification
if (isWin()) {
app.setAppUserModelId("Proper name to be replaced");
}
这篇关于您如何覆盖或删除签名“electron.app.Electron"?从桌面通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:您如何覆盖或删除签名“electron.app.Electron"?从


- 是否可以将标志传递给 Gulp 以使其以不同的方式 2022-01-01
- 从原点悬停时触发 translateY() 2022-01-01
- 使用 iframe URL 的 jQuery UI 对话框 2022-01-01
- 如何向 ipc 渲染器发送添加回调 2022-01-01
- 在不使用循环的情况下查找数字数组中的一项 2022-01-01
- 如何调试 CSS/Javascript 悬停问题 2022-01-01
- 如何显示带有换行符的文本标签? 2022-01-01
- 我不能使用 json 使用 react 向我的 web api 发出 Post 请求 2022-01-01
- 为什么悬停在委托事件处理程序中不起作用? 2022-01-01
- 为什么我的页面无法在 Github 上加载? 2022-01-01