Add test/local environment configurations and fix #147
This commit is contained in:
@@ -10,6 +10,8 @@ import { DragAndDropService } from '../drag-and-drop.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { ProcessBucketService } from '../process-bucket.service';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
interface ReplaceText {
|
||||
key: string;
|
||||
value: string;
|
||||
@@ -45,6 +47,7 @@ export class HeaderComponent implements OnInit {
|
||||
adbCommandToRun: string;
|
||||
osPlatform: string;
|
||||
saveLogcatPath: string;
|
||||
webUrl = environment.configuration.web_url;
|
||||
favourites: {
|
||||
browserFavourites: FavouriteItem[];
|
||||
fileFavourites: FavouriteItem[];
|
||||
@@ -98,7 +101,8 @@ export class HeaderComponent implements OnInit {
|
||||
public statusService: StatusBarService,
|
||||
public beatonService: BeatOnService,
|
||||
public dragAndDropService: DragAndDropService,
|
||||
public processService: ProcessBucketService
|
||||
public processService: ProcessBucketService,
|
||||
private router: Router
|
||||
) {
|
||||
this.osPlatform = this.appService.os.platform();
|
||||
console.log('Platform: ' + this.osPlatform);
|
||||
@@ -107,6 +111,19 @@ export class HeaderComponent implements OnInit {
|
||||
this.resetFavourites('commandFavourites');
|
||||
this.appService.headerComponent = this;
|
||||
}
|
||||
doBack() {
|
||||
if (
|
||||
this.appService.isTasksOpen ||
|
||||
this.appService.isFilesOpen ||
|
||||
this.appService.isPackagesOpen ||
|
||||
this.appService.isSettingsOpen
|
||||
) {
|
||||
this.router.navigateByUrl('/webview');
|
||||
return;
|
||||
} else {
|
||||
this.webService.back();
|
||||
}
|
||||
}
|
||||
resetFavourites(type: string) {
|
||||
let defaultFavs;
|
||||
switch (type) {
|
||||
@@ -182,7 +199,7 @@ export class HeaderComponent implements OnInit {
|
||||
}
|
||||
|
||||
updateAvailable() {
|
||||
this.appService.opn('https://sidequestvr.com/download');
|
||||
this.appService.opn(`${environment.configuration.web_url || 'https://sidequestvr.com'}/download`);
|
||||
}
|
||||
|
||||
startLogcat() {
|
||||
|
||||
Reference in New Issue
Block a user