app/@overflow/commons/ui/component/window/window-controls.component.ts
2018-08-14 21:26:23 +09:00

35 lines
588 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { ipcRenderer, remote } from 'electron';
@Component({
selector: 'of-window-controls',
templateUrl: './window-controls.component.html',
})
export class WindowControlsComponent implements OnInit {
private windowState: string;
constructor(
) { }
ngOnInit() {
}
onMinimize() {
remote.getCurrentWindow().minimize();
}
onRestore() {
remote.getCurrentWindow().unmaximize();
}
onMaximize() {
remote.getCurrentWindow().maximize();
}
onClose() {
remote.getCurrentWindow().close();
}
}