本文介紹了您如何覆蓋或刪除簽名“electron.app.Electron"?從桌面通知的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
我正在嘗試刪除或覆蓋我由電子制作的通知簽名.
I'm trying to remove or overwrite my notification signature made by electron.
這是我得到的:
here is what i get:
我正在嘗試是否覆蓋簽名 electron.app.Electron 或完全刪除它,通過知道我已經(jīng)在測試模式 (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");
}
這篇關(guān)于您如何覆蓋或刪除簽名“electron.app.Electron"?從桌面通知的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!