refactor(electron): tab title/icon update logic (#7675)

fix AF-1122
fix AF-1136
This commit is contained in:
pengx17
2024-08-01 16:43:18 +00:00
parent e60b2d64e5
commit 07409b8a91
20 changed files with 261 additions and 217 deletions
@@ -7,6 +7,7 @@ import {
addTab,
closeTab,
initAndShowMainWindow,
reloadView,
showDevTools,
showMainWindow,
undoCloseTab,
@@ -92,8 +93,13 @@ export function createApplicationMenu() {
{
label: 'View',
submenu: [
{ role: 'reload' },
{ role: 'forceReload' },
{
label: 'Reload',
accelerator: 'CommandOrControl+R',
click() {
reloadView().catch(console.error);
},
},
{
label: 'Open devtools',
accelerator: isMac ? 'Cmd+Option+I' : 'Ctrl+Shift+I',