如何覆盖或删除签名"electron.app.Electron"?从桌面通知 [英] how can you overwrite or remove the signature "electron.app.Electron" 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:
我正在尝试通过知道以下内容来覆盖签名的electronic.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"?从桌面通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文