cordis/client/webapp/elements/events-window-buttons.ts

17 lines
439 B
TypeScript
Raw Normal View History

2021-10-30 17:26:41 +00:00
import * as electron from 'electron';
import Q from '../q-module';
2021-10-30 17:26:41 +00:00
export default function bindWindowButtonEvents(q: Q): void {
q.$('#minimize').addEventListener('click', () => {
electron.ipcRenderer.send('minimize');
});
q.$('#maximize').addEventListener('click', () => {
electron.ipcRenderer.send('maximize');
});
q.$('#close').addEventListener('click', () => {
electron.ipcRenderer.send('close');
});
2021-10-30 17:26:41 +00:00
}