mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 19:46:16 -08:00
fix: shortcut to close the app
This commit is contained in:
1 parent
cd2413951b
commit
753b06a7a8
2 files changed
+2
-13
No files matched your search
+1
-13
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable no-useless-catch */
|
||||
import { app, BrowserWindow, globalShortcut, Menu } from 'electron';
|
||||
import { app, BrowserWindow, Menu } from 'electron';
|
||||
import * as path from 'path';
|
||||
import * as url from 'url';
|
||||
import { Api } from './api';
|
||||
@@ -78,21 +78,9 @@ function createWindow(): BrowserWindow {
|
||||
}
|
||||
});
|
||||
|
||||
registerGlobalShortcuts();
|
||||
return win;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers common keyboard shortcuts
|
||||
*/
|
||||
function registerGlobalShortcuts() {
|
||||
if (process.platform === 'darwin') {
|
||||
globalShortcut.register('Command+Q', () => {
|
||||
app.quit();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates hidden window for EPG worker
|
||||
* Hidden window is used as an additional thread to avoid blocking of the UI by long operations
|
||||
|
||||
@@ -72,6 +72,7 @@ export class AppMenu {
|
||||
{
|
||||
label: 'Exit',
|
||||
click: () => app.quit(),
|
||||
accelerator: 'CmdOrCtrl+Q',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user