Fixes for Upgrade, ability to pull latest sidequest app from site, added permissions, added additional environmental support.
This commit is contained in:
@@ -40,6 +40,7 @@ export class AdbClientService {
|
||||
pollInterval: number = 1000 * 1;
|
||||
savePath: string;
|
||||
isTransferring: boolean;
|
||||
skipStatusUpdates: boolean = false;
|
||||
adbResolves: any;
|
||||
files: any;
|
||||
localFiles: any;
|
||||
@@ -390,16 +391,17 @@ export class AdbClientService {
|
||||
}
|
||||
}
|
||||
|
||||
boundConnectedStatus: any = null;
|
||||
async connectedStatus() {
|
||||
if (!this.boundConnectedStatus) { this.boundConnectedStatus = this.connectedStatus.bind(this); }
|
||||
let now = performance.now();
|
||||
if (now - this.lastConnectionCheck < this.pollInterval || this.isTransferring)
|
||||
return requestAnimationFrame(this.connectedStatus.bind(this));
|
||||
if (now - this.lastConnectionCheck < this.pollInterval || this.isTransferring || this.skipStatusUpdates) {
|
||||
return requestAnimationFrame(this.boundConnectedStatus);
|
||||
}
|
||||
this.lastConnectionCheck = now;
|
||||
return this.adbCommand('listDevices')
|
||||
.then((devices: any) => {
|
||||
console.log("d1", devices);
|
||||
let f = devices.filter(device => device.type !== 'offline')
|
||||
return f;
|
||||
return devices.filter(device => device.type !== 'offline')
|
||||
})
|
||||
.then(async devices => {
|
||||
if (devices.length > 1 && this.justChangedMPT) {
|
||||
@@ -416,10 +418,10 @@ export class AdbClientService {
|
||||
this.appVersionCode = await this.getAppVersion(true);
|
||||
} catch {}
|
||||
}
|
||||
requestAnimationFrame(this.connectedStatus.bind(this));
|
||||
requestAnimationFrame(this.boundConnectedStatus);
|
||||
})
|
||||
.catch(err => {
|
||||
console.warn(err, err.stack);
|
||||
console.error("Wrong Install Error:", err, err.stack);
|
||||
alert(
|
||||
this.appService.os.platform() === 'win32'
|
||||
? `It looks like there is something wrong with your install.
|
||||
@@ -429,6 +431,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
adbCommand(command: string, settings?, callback?) {
|
||||
const uuid = this.appService.uuidv4();
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
@@ -441,6 +444,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
const { clipboard } = (window as any).require('electron');
|
||||
clipboard.writeText(value);
|
||||
}
|
||||
|
||||
async getAppVersion(isCode: boolean): Promise<string | null> {
|
||||
const versionInfo = await this.runAdbCommand('shell dumpsys package ' + this.VR_APP_PACKAGE, true);
|
||||
this.notInstalled = versionInfo.includes('Unable to find package');
|
||||
@@ -459,7 +463,6 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
await this.appService.seedPlatformTools();
|
||||
}
|
||||
this.appService.electron.ipcRenderer.on('adb-command', (event, arg: any) => {
|
||||
console.log("result", arg.uuid, arg.status, arg.error, arg.resp)
|
||||
if (this.adbResolves[arg.uuid]) {
|
||||
if (arg.status && this.adbResolves[arg.uuid].callback) {
|
||||
this.adbResolves[arg.uuid].callback(arg.status);
|
||||
@@ -481,6 +484,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
this.lastErrorMessage = e.toString();
|
||||
}
|
||||
}
|
||||
|
||||
isAdbDownloaded() {
|
||||
try {
|
||||
let downloaded = true;
|
||||
@@ -504,6 +508,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
setPermission(packageName: string, permission: string, isRevoke?: boolean) {
|
||||
return this.adbCommand('shell', {
|
||||
serial: this.deviceSerial,
|
||||
@@ -512,6 +517,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
this.statusService.showStatus('Permission set OK!!');
|
||||
});
|
||||
}
|
||||
|
||||
doesFileExist(path) {
|
||||
try {
|
||||
return this.appService.fs.existsSync(path);
|
||||
@@ -519,6 +525,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
getAdbBinary() {
|
||||
if (this.appService.os.platform() === 'win32') {
|
||||
return 'adb.exe';
|
||||
@@ -526,6 +533,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
return 'adb';
|
||||
}
|
||||
}
|
||||
|
||||
getFilenameDate() {
|
||||
return JSON.stringify(new Date())
|
||||
.split('"')
|
||||
@@ -534,6 +542,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
.join('-')
|
||||
.trim();
|
||||
}
|
||||
|
||||
getPackageLocation(packageName) {
|
||||
return this.adbCommand('shell', { serial: this.deviceSerial, command: 'pm list packages -f ' + packageName }).then(res => {
|
||||
let parts = res.split(':');
|
||||
@@ -544,6 +553,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async makeBackupFolders(packageName: string) {
|
||||
let mainBackupPath = this.appService.path.join(this.appService.backupPath, packageName);
|
||||
return this.appService
|
||||
@@ -551,6 +561,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
.then(() => this.appService.mkdir(this.appService.path.join(mainBackupPath, 'apks')))
|
||||
.then(() => this.appService.mkdir(this.appService.path.join(mainBackupPath, 'data')));
|
||||
}
|
||||
|
||||
async getBackups(packageName: string) {
|
||||
await this.makeBackupFolders(packageName);
|
||||
let backupPath = this.appService.path.join(this.appService.backupPath, packageName, 'apks');
|
||||
@@ -560,6 +571,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
.filter(file => !this.appService.fs.lstatSync(file).isDirectory() && this.appService.path.extname(file) === '.apk')
|
||||
.reverse();
|
||||
}
|
||||
|
||||
async getDataBackups(packageName: string) {
|
||||
await this.makeBackupFolders(packageName);
|
||||
let backupPath = this.appService.path.join(this.appService.backupPath, packageName, 'data');
|
||||
@@ -604,6 +616,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
installAPK(
|
||||
filePath: string,
|
||||
isLocal?: boolean,
|
||||
@@ -646,6 +659,9 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
if (filePath.indexOf('com.weloveoculus.BMBF') > -1) {
|
||||
return this.beatonService.setBeatOnPermission(this);
|
||||
}
|
||||
if (filePath.indexOf('quest.side.vr') > -1) {
|
||||
return this.addVRPermissions();
|
||||
}
|
||||
})
|
||||
.catch(async e => {
|
||||
if (deleteAfter) {
|
||||
@@ -685,6 +701,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
name
|
||||
);
|
||||
}
|
||||
|
||||
uninstallAPK(pkg) {
|
||||
return this.processService.addItem('apk_uninstall', task => {
|
||||
task.status = 'Uninstalling ' + pkg + '...';
|
||||
@@ -706,12 +723,14 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
.catch(e => Promise.reject(e.message ? e.message : e.code ? e.code : e.toString() + pkg));
|
||||
});
|
||||
}
|
||||
|
||||
makeFolder(files) {
|
||||
if (!files.length) return null;
|
||||
let f: any = files.shift();
|
||||
this.spinnerService.setMessage('Making folder: <br>' + f.saveName);
|
||||
return this.appService.mkdir(f.saveName).then(() => this.makeFolder(files));
|
||||
}
|
||||
|
||||
downloadFile(files, task) {
|
||||
if (!files.length) return;
|
||||
let f: any = files.shift();
|
||||
@@ -724,6 +743,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
'MB';
|
||||
}).then(r => this.downloadFile(files, task));
|
||||
}
|
||||
|
||||
async getFoldersRecursive(root: string) {
|
||||
return this.getFolders(root).then(entries => {
|
||||
entries.forEach(f => {
|
||||
@@ -739,6 +759,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
return recurse();
|
||||
});
|
||||
}
|
||||
|
||||
async getLocalFoldersRecursive(root: string) : Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
this.appService.fs.readdir(root, async (err, entries) => {
|
||||
@@ -757,6 +778,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async uploadFile(files, task) {
|
||||
if (!files.length) return;
|
||||
let f: any = files.shift();
|
||||
@@ -765,6 +787,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
task.status = 'File uploading: ' + f.name + ' ' + Math.round((stats.bytesTransferred / 1024 / 1024) * 100) / 100 + 'MB';
|
||||
}).then(r => this.uploadFile(files, task));
|
||||
}
|
||||
|
||||
async launchYurOverlay() {
|
||||
await this.adbCommand('shell', {
|
||||
serial: this.deviceSerial,
|
||||
@@ -775,6 +798,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
command: 'am startservice com.yur.fitquest/.service.YURCounterService',
|
||||
});
|
||||
}
|
||||
|
||||
async restoreDataBackup(packageName: string, folderName: string) {
|
||||
return this.processService.addItem('restore_files', async task => {
|
||||
task.status = 'Transferring Files...';
|
||||
@@ -823,6 +847,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
return Promise.resolve();
|
||||
});
|
||||
}
|
||||
|
||||
async makeDataBackup(packageName: string) {
|
||||
return this.processService.addItem('save_files', async task => {
|
||||
task.status = 'Starting Backup...';
|
||||
@@ -881,15 +906,18 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async hasSDFolder(name: string, packageName: string) {
|
||||
let folders = await this.getFolders('/sdcard/Android/' + name + '/');
|
||||
return !!~folders.map(d => d.name).indexOf(packageName);
|
||||
}
|
||||
|
||||
async getFolders(root) {
|
||||
return this.adbCommand('readdir', { serial: this.deviceSerial, path: root }).catch(e =>
|
||||
this.statusService.showStatus('Error: ' + e.toString() + ' while reading path ' + root, true)
|
||||
);
|
||||
}
|
||||
|
||||
installFile(url, destinationFolder: string, number?: number, total?: number) {
|
||||
return this.processService.addItem('file_install', async task => {
|
||||
return this.appService
|
||||
@@ -905,6 +933,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
.then((_path: string) => this.installLocalFile(_path, destinationFolder, false, null, number, total, task));
|
||||
});
|
||||
}
|
||||
|
||||
installLocalFile(
|
||||
filepath: string,
|
||||
destinationFolder: string,
|
||||
@@ -962,6 +991,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
installZip(url, number?: number, total?: number, deleteAfter?: boolean) {
|
||||
return this.processService.addItem('file_install', async task => {
|
||||
return this.appService
|
||||
@@ -991,6 +1021,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
installObb(url, number?: number, total?: number, name?: string) {
|
||||
return this.processService.addItem(
|
||||
'file_install',
|
||||
@@ -1022,6 +1053,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
name
|
||||
);
|
||||
}
|
||||
|
||||
installLocalObb(filepath: string, dontCatchError = false, cb = null, number?: number, total?: number, task?, name?: string) {
|
||||
let filename = this.appService.path.basename(filepath);
|
||||
let match = filename.match(this.obbRegex);
|
||||
@@ -1059,6 +1091,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
async installLocalZip(filepath, dontCatchError, cb, task?, deleteAfter?) : Promise<void> {
|
||||
const typeBasedActions = {
|
||||
'.apk': filepath => {
|
||||
@@ -1116,6 +1149,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
cleanUpFolder(folderPath = this.appService.path.join(this.appService.appData, 'tmp')) {
|
||||
this.appService.fs.readdir(folderPath, (readErr, files) => {
|
||||
files.forEach((val, index) => {
|
||||
@@ -1183,6 +1217,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
return { permission, enabled };
|
||||
});
|
||||
}
|
||||
|
||||
async getFreeSpace() {
|
||||
return this.adbCommand('shell', { serial: this.deviceSerial, command: 'df -h' }).then(data => {
|
||||
data = data.split(' ').filter(d => d);
|
||||
@@ -1191,6 +1226,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
this.freespace.percent = data[data.length - 2];
|
||||
});
|
||||
}
|
||||
|
||||
async getBatteryLevel() {
|
||||
return this.adbCommand('shell', { serial: this.deviceSerial, command: 'dumpsys battery' }).then(data => {
|
||||
let batteryObject = {};
|
||||
@@ -1209,9 +1245,51 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
||||
this.batteryLevel = batteryObject['level'];
|
||||
});
|
||||
}
|
||||
|
||||
async getDeviceModel() {
|
||||
return this.adbCommand('shell', { serial: this.deviceSerial, command: 'getprop ro.product.model' }).then(
|
||||
data => (this.deviceModel = data.trim())
|
||||
);
|
||||
}
|
||||
|
||||
private async addVRPermissions() {
|
||||
await this.adbCommand('shell "pm grant quest.side.vr android.permission.WRITE_SECURE_SETTINGS"', { serial: this.deviceSerial });
|
||||
await this.adbCommand('shell "pm grant quest.side.vr android.permission.READ_LOGS"', { serial: this.deviceSerial });
|
||||
try {
|
||||
const homedir = process.env.USERPROFILE || process.env.HOME;
|
||||
if (this.appService.fs.existsSync(homedir + '/.android/adbkey')) {
|
||||
let rawCertificate = this.appService.fs.readFileSync(homedir + '/.android/adbkey', 'utf8').toString();
|
||||
rawCertificate = rawCertificate
|
||||
.replace('-----BEGIN RSA PRIVATE KEY-----', '')
|
||||
.replace('-----END RSA PRIVATE KEY-----', '');
|
||||
rawCertificate = rawCertificate
|
||||
.replace('-----BEGIN PRIVATE KEY-----', '')
|
||||
.replace('-----END PRIVATE KEY-----', '');
|
||||
rawCertificate = rawCertificate.replace(/\n|\r|\n\r|\r\n/g, '');
|
||||
|
||||
if (rawCertificate && rawCertificate.length) {
|
||||
await this.adbCommand(
|
||||
[
|
||||
'shell',
|
||||
'am',
|
||||
'start',
|
||||
'-a',
|
||||
'android.intent.action.MAIN',
|
||||
'-n',
|
||||
'quest.side.vr/.SignInActivity',
|
||||
'--es',
|
||||
'CERTIFICATE',
|
||||
rawCertificate,
|
||||
].join(' '), { serial: this.deviceSerial }
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error sending certificate to SideQuestVR', e);
|
||||
}
|
||||
|
||||
this.skipStatusUpdates = true;
|
||||
await this.adbCommand('tcpip 5555', { serial: this.deviceSerial });
|
||||
setTimeout(() => { this.skipStatusUpdates = false; }, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AppService } from '../app.service';
|
||||
import { AdbClientService } from '../adb-client.service';
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
declare const process;
|
||||
|
||||
@@ -26,6 +27,7 @@ export class HeaderBannerComponent implements OnInit {
|
||||
isOutOfDate: boolean;
|
||||
// the latest available version of the in-headset app
|
||||
private latestAppVersion: string | null = null;
|
||||
private appId: string | null = null;
|
||||
constructor(public appService: AppService, public adb: AdbClientService) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -47,36 +49,26 @@ export class HeaderBannerComponent implements OnInit {
|
||||
}
|
||||
|
||||
async getLatestApk() {
|
||||
this.latestAppVersion = '28';
|
||||
|
||||
const request = (await fetch(environment.configuration.http_url + '/v2/apps/get-sidequest-apk', {
|
||||
body: JSON.stringify({ package_name: 'quest.side.vr' }), method: 'POST',
|
||||
headers: { "Content-Type": "application/json" }
|
||||
}));
|
||||
|
||||
let json = await request.json();
|
||||
this.appId = json.app_id;
|
||||
this.latestAppVersion = json.version_code;
|
||||
this.apkDownloadPath = json.url;
|
||||
this.setOutOfDate();
|
||||
return;
|
||||
|
||||
const { apk, version } = await this.getExperimentalAPK();
|
||||
if (apk.length) {
|
||||
this.latestAppVersion = version;
|
||||
this.setOutOfDate();
|
||||
this.apkDownloadPath = apk[0].browser_download_url;
|
||||
}
|
||||
}
|
||||
|
||||
async getExperimentalAPK() {
|
||||
const json = await fetch('https://api.github.com/repos/SideQuestVR/Lite/releases/latest');
|
||||
const r = await json.json();
|
||||
r.assets.reverse();
|
||||
const apk = r.assets.filter(a => a.name.split('.').pop() === 'apk');
|
||||
const versionFile = r.assets.filter(a => a.name.split('.').pop() === 'versionCode');
|
||||
let version;
|
||||
if (versionFile.length > 0) {
|
||||
version = versionFile[0].name.split('.')[0];
|
||||
}
|
||||
return { apk, version };
|
||||
}
|
||||
|
||||
async downloadExperimentalAPK() {
|
||||
async downloadAPK() {
|
||||
if (!this.apkDownloadPath) {
|
||||
return Promise.reject('Could not download latest apk, please try again!');
|
||||
}
|
||||
console.log('downloadExperimentalAPK', this.apkDownloadPath);
|
||||
|
||||
console.log('downloadAPK', this.appId);
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
const requestOptions = {
|
||||
timeout: 30000,
|
||||
@@ -123,9 +115,9 @@ export class HeaderBannerComponent implements OnInit {
|
||||
// this.telemetry.telemetry({ event: 'install-sidequest-apk', installType: telemEvent, oldVersion });
|
||||
this.isLoading = true;
|
||||
try {
|
||||
throw new Error('bypass_experimental');
|
||||
throw new Error('bypass_sdk_download');
|
||||
await this.getLatestApk();
|
||||
await this.downloadExperimentalAPK();
|
||||
await this.downloadAPK();
|
||||
} catch (e) {
|
||||
// this.toast.show('Failed to download updated SQ apk, falling back to bundled apk. Are you online?', true);
|
||||
console.warn(e);
|
||||
@@ -136,8 +128,8 @@ export class HeaderBannerComponent implements OnInit {
|
||||
// this.toast.show('SideQuest installed to headset!');
|
||||
// this.showConfetti = true;
|
||||
this.adb.appVersionCode = await this.adb.getAppVersion(true);
|
||||
await this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.WRITE_SECURE_SETTINGS"');
|
||||
await this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.READ_LOGS"');
|
||||
await this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.WRITE_SECURE_SETTINGS"', true);
|
||||
await this.adb.runAdbCommand('shell "pm grant quest.side.vr android.permission.READ_LOGS"', true);
|
||||
try {
|
||||
const homedir = process.env.USERPROFILE || process.env.HOME;
|
||||
if (this.appService.fs.existsSync(homedir + '/.android/adbkey')) {
|
||||
@@ -163,7 +155,7 @@ export class HeaderBannerComponent implements OnInit {
|
||||
'--es',
|
||||
'CERTIFICATE',
|
||||
rawCertificate,
|
||||
].join(' ')
|
||||
].join(' '), true
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -171,7 +163,10 @@ export class HeaderBannerComponent implements OnInit {
|
||||
console.error('Error sending certificate to SideQuestVR', e);
|
||||
}
|
||||
|
||||
this.adb.skipStatusUpdates = true;
|
||||
await this.adb.runAdbCommand('tcpip 5555');
|
||||
setTimeout(() => { this.adb.skipStatusUpdates = false; }, 3000);
|
||||
|
||||
// this.telemetry.telemetry({ event: 'install-sidequest-apk-success',
|
||||
// installType: telemEvent, oldVersion, newVersion: this.adb.appVersionCode || null});
|
||||
// setTimeout(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="header">
|
||||
<div id=header class="header">
|
||||
<div class="top-bar">
|
||||
<div class="relative">
|
||||
<div class="topper"></div>
|
||||
<div class="topper {{headerClass}}"></div>
|
||||
<div class="user-menu-back" (click)="browserMenu.style.display = 'none';browserMenuBack.style.display = 'none'"
|
||||
#browserMenuBack></div>
|
||||
<div class="user-menu-back" (click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none'"
|
||||
@@ -16,6 +16,9 @@
|
||||
>[{{device.id}}] {{device.deviceName}}</div><br>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div class="sideenvironment {{headerClass}}">{{headerText}}</div>
|
||||
|
||||
<div class="title-menu-container">
|
||||
<div class="user-menu command-menu" #commandMenu>
|
||||
<div class="btn-flat waves-light waves-light full-width center-align white-text truncate"
|
||||
@@ -52,7 +55,8 @@
|
||||
</div>
|
||||
<div class="pure-material-button-contained slim update-available" *ngIf="appService.updateAvailable" (click)="updateAvailable()">Update Available</div>
|
||||
|
||||
<!-- <app-link *ngIf="appService.updateAvailable"-->
|
||||
|
||||
<!-- <app-link *ngIf="appService.updateAvailable"-->
|
||||
<!-- class="waves-effect waves-light btn-flat link small-button warning" (click)="updateAvailable()"-->
|
||||
<!-- text="Update"></app-link>-->
|
||||
<i routerLink="/webview" (click)="doBack()"
|
||||
@@ -95,7 +99,7 @@
|
||||
apps
|
||||
</i>
|
||||
<i routerLink="tasks" class="material-icons white-text no-outline" data-position="bottom"
|
||||
mTooltip [attr.data-tooltip]="'Running' + processService.left_length + 'tasks.'">
|
||||
mTooltip [attr.data-tooltip]="'Running ' + processService.left_length + ' tasks.'">
|
||||
playlist_add_check
|
||||
</i><span routerLink="tasks" *ngIf="processService.left_length" data-position="bottom"
|
||||
mTooltip data-tooltip="Running {{processService.left_length}} tasks."
|
||||
@@ -140,7 +144,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-dnd-backing">
|
||||
|
||||
<div class="top-banner">
|
||||
<!-- <div>-->
|
||||
<!-- <a href="#/" class="logo">-->
|
||||
|
||||
@@ -464,3 +464,26 @@ virtual-scroller{
|
||||
.footer-margin-right{
|
||||
margin-right: 1em!important;
|
||||
}
|
||||
|
||||
.sidetestvr {
|
||||
background-color: darkgreen;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.friedquestvr {
|
||||
background-color: darkred;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.localtest {
|
||||
background-color: darkblue;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.sideenvironment {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: calc(50% - 50px);
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -35,9 +35,9 @@ interface LogCatEntry {
|
||||
styleUrls: ['./header.component.scss'],
|
||||
})
|
||||
export class HeaderComponent implements OnInit {
|
||||
@ViewChild('header') header;
|
||||
// @ViewChild('header') header;
|
||||
@ViewChild('bookmarksModal') bookmarksModal;
|
||||
@ViewChild('beatOnModal') beatOnModal;
|
||||
// @ViewChild('beatOnModal') beatOnModal;
|
||||
@ViewChild('mainLogo') mainLogo;
|
||||
@ViewChild('safeModal') safeModal;
|
||||
@ViewChild('manageFavs') manageFavs;
|
||||
@@ -94,6 +94,8 @@ export class HeaderComponent implements OnInit {
|
||||
currentLogCat: LogCatEntry[] = [];
|
||||
isStarted: boolean;
|
||||
showAddFavourite: boolean;
|
||||
protected headerClass: string;
|
||||
protected headerText: string;
|
||||
constructor(
|
||||
public adbService: AdbClientService,
|
||||
public appService: AppService,
|
||||
@@ -111,6 +113,9 @@ export class HeaderComponent implements OnInit {
|
||||
this.resetFavourites('fileFavourites');
|
||||
this.resetFavourites('commandFavourites');
|
||||
this.appService.headerComponent = this;
|
||||
this.headerClass = environment.header?.color || "";
|
||||
this.headerText = environment.header?.text || "";
|
||||
console.log('Header: ' + this.headerClass + ' ' + this.headerText);
|
||||
}
|
||||
doBack() {
|
||||
if (
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
header: {color: "friedquestvr", text: "Fried Quest VR"},
|
||||
configuration: {
|
||||
web_url: 'https://friedquestvr.com',
|
||||
ws_url: 'wss://ws.friedquestvr.com',
|
||||
http_url: 'https://api.friedquestvr.com',
|
||||
cdnUrl: 'https://cdn.friedquestvr.com',
|
||||
shortenerUrl: 'https://links.friedquestvr.com'
|
||||
},
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
header: {color: "localtest", text: "Local Test VR"},
|
||||
configuration: {
|
||||
web_url: 'https://sidequestvr.local',
|
||||
ws_url: 'wss://ws.sidetestvr.local',
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
header: {color: "localtest", text: "LocalHost Test VR"},
|
||||
configuration: {
|
||||
web_url: 'http://127.0.0.1:3005',
|
||||
ws_url: 'ws://127.0.0.1:3008',
|
||||
http_url: 'http://127.0.0.1:3000',
|
||||
cdnUrl: 'http://127.0.0.1:3001',
|
||||
shortenerUrl: 'http://127.0.0.1:3004',
|
||||
},
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
header: null,
|
||||
configuration: {
|
||||
web_url: 'https://sidequestvr.com',
|
||||
ws_url: 'wss://ws.sidequestvr.com',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
header: {color: "sidetestvr", text: "Side Test VR"},
|
||||
configuration: {
|
||||
web_url: 'https://sidetestvr.com',
|
||||
ws_url: 'wss://ws.sidetestvr.com',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
header: {color: "sidetestvr", text: "Side Test VR"},
|
||||
configuration: {
|
||||
web_url: 'https://test.side.quest',
|
||||
ws_url: 'wss://testws.side.quest',
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
header: null, // {color: "sidetestvr", text: "Side Test VR"},
|
||||
configuration: {
|
||||
web_url: 'https://sidequestvr.com',
|
||||
ws_url: 'wss://ws.sidequestvr.com',
|
||||
http_url: 'https://api.sidequestvr.com',
|
||||
cdnUrl: 'https://cdn.sidequestvr.com',
|
||||
web_url: 'https://sidetestvr.com',
|
||||
ws_url: 'wss://ws.sidetestvr.com',
|
||||
http_url: 'https://api.sidetestvr.com',
|
||||
cdnUrl: 'https://cdn.sidetestvr.com',
|
||||
shortenerUrl: 'https://sdq.st',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user