Add test/local environment configurations and fix #147

This commit is contained in:
Max Myers
2021-10-19 14:26:19 -04:00
parent c6d1f69fd4
commit cfcf2f0890
15 changed files with 203 additions and 16 deletions
+19 -2
View File
@@ -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() {