mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Better window size controls
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
<div *ngIf="settingsService.rateLimitDelay < 30" class="ui warning message">
|
||||
<i class="exclamation circle icon"></i>
|
||||
<b>Warning:</b> downloading files from Google with a delay less than about 30 seconds will eventually cause Google to
|
||||
refuse download requests from this program for a few hours. If you can find a way around this limitation, contact the devs.
|
||||
refuse download requests from this program for a few hours. If you can find a way around this limitation, contact Geo#8488 on discord.
|
||||
</div>
|
||||
|
||||
<h3 class="ui header">Theme</h3>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="right menu">
|
||||
<a class="item traffic-light" (click)="minimize()"><i class="minus icon"></i></a>
|
||||
<a class="item traffic-light" (click)="maximize()"><i class="plus icon"></i></a>
|
||||
<a class="item traffic-light" (click)="maximize()"><i class="icon window" [ngClass]="isMaximized ? 'restore' : 'maximize'"></i></a>
|
||||
<a class="item traffic-light" (click)="close()"><i class="x icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { Component, OnInit } from '@angular/core'
|
||||
import { ElectronService } from '../../core/services/electron.service'
|
||||
|
||||
@Component({
|
||||
@@ -6,16 +6,27 @@ import { ElectronService } from '../../core/services/electron.service'
|
||||
templateUrl: './toolbar.component.html',
|
||||
styleUrls: ['./toolbar.component.scss']
|
||||
})
|
||||
export class ToolbarComponent {
|
||||
export class ToolbarComponent implements OnInit {
|
||||
|
||||
isMaximized: boolean
|
||||
|
||||
constructor(private electronService: ElectronService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.isMaximized = this.electronService.currentWindow.isMaximized()
|
||||
}
|
||||
|
||||
minimize() {
|
||||
this.electronService.currentWindow.minimize()
|
||||
}
|
||||
|
||||
maximize() {
|
||||
this.electronService.currentWindow.maximize()
|
||||
if (this.isMaximized) {
|
||||
this.electronService.currentWindow.restore()
|
||||
} else {
|
||||
this.electronService.currentWindow.maximize()
|
||||
}
|
||||
this.isMaximized = !this.isMaximized
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
Reference in New Issue
Block a user