35 lines
588 B
TypeScript
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();
|
|
}
|
|
|
|
}
|