mirror of
https://github.com/viarotel-org/escrcpy.git
synced 2024-12-18 10:25:54 +01:00
20 lines
419 B
JavaScript
20 lines
419 B
JavaScript
|
import { app, BrowserWindow, ipcMain } from 'electron'
|
||
|
|
||
|
export default () => {
|
||
|
ipcMain.on('restart-app', () => {
|
||
|
app.isQuiting = true
|
||
|
app.relaunch()
|
||
|
app.quit()
|
||
|
})
|
||
|
|
||
|
ipcMain.on('close-active-window', (event) => {
|
||
|
const win = BrowserWindow.getFocusedWindow()
|
||
|
win.close()
|
||
|
})
|
||
|
|
||
|
ipcMain.on('hide-active-window', (event) => {
|
||
|
const win = BrowserWindow.getFocusedWindow()
|
||
|
win.hide()
|
||
|
})
|
||
|
}
|