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