mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
close window by esc
This commit is contained in:
parent
be04031e82
commit
066475237e
@ -1,7 +1,9 @@
|
|||||||
### New Features
|
### New Features
|
||||||
|
|
||||||
- 支持删除 Webdav 备份文件
|
- 支持删除 Webdav 备份文件
|
||||||
|
- Esc关闭窗口
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- 修复拨号网络系统代理问题
|
- 修复拨号网络系统代理问题
|
||||||
|
- 尝试修复部分白屏问题
|
||||||
|
|||||||
@ -137,7 +137,9 @@ export function createWindow(show = false): void {
|
|||||||
mainWindow?.focusOnWebView()
|
mainWindow?.focusOnWebView()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
mainWindow.webContents.on('did-fail-load', () => {
|
||||||
|
mainWindow?.webContents.reload()
|
||||||
|
})
|
||||||
mainWindow.on('resize', () => {
|
mainWindow.on('resize', () => {
|
||||||
mainWindow?.webContents.send('resize')
|
mainWindow?.webContents.send('resize')
|
||||||
})
|
})
|
||||||
|
|||||||
@ -19,6 +19,10 @@ init().then(() => {
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
quitApp()
|
quitApp()
|
||||||
}
|
}
|
||||||
|
if (e.key === 'Escape') {
|
||||||
|
e.preventDefault()
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user