mirror of
https://github.com/koel/koel
synced 2025-01-12 12:48:44 +00:00
11 lines
291 B
TypeScript
11 lines
291 B
TypeScript
// App (electron)-only methods
|
|
let mainWindow: any
|
|
|
|
if (KOEL_ENV === 'app') {
|
|
mainWindow = require('electron').remote.getCurrentWindow()
|
|
}
|
|
|
|
export const app = {
|
|
triggerMaximize: (): void =>
|
|
mainWindow && (mainWindow.isMaximized() ? mainWindow.unmaximize() : mainWindow.maximize())
|
|
}
|