revamp of most screens complete, status bar still needs to be completed

This commit is contained in:
Shane Harris
2022-07-30 10:07:26 +01:00
parent 6dc9b11368
commit 7e438b63c8
48 changed files with 1471 additions and 663 deletions
+33 -3
View File
@@ -25,6 +25,10 @@ interface ADBDevice {
providedIn: 'root', providedIn: 'root',
}) })
export class AdbClientService { export class AdbClientService {
VR_APP_PACKAGE = 'quest.side.vr';
notInstalled: boolean;
appVersion: string | null = null;
appVersionCode: string | null = null;
ADB: any; ADB: any;
adbPath: string; adbPath: string;
devicePackages: string[] = []; devicePackages: string[] = [];
@@ -41,7 +45,9 @@ export class AdbClientService {
localFiles: any; localFiles: any;
hasSynthRiderz: any; hasSynthRiderz: any;
deviceIp: string; deviceIp: string;
wifiEnabled: boolean; get wifiEnabled(): boolean {
return this.deviceSerial && this.deviceSerial.includes(':5555') && this.isReady;
}
wifiHost: string; wifiHost: string;
isBatteryCharging: boolean; isBatteryCharging: boolean;
batteryLevel: number; batteryLevel: number;
@@ -398,11 +404,18 @@ export class AdbClientService {
} }
this.devices = devices; this.devices = devices;
}) })
.then(status => { .then(async status => {
this.updateConnectedStatus(); this.updateConnectedStatus();
if (this.isReady) {
try {
this.appVersion = await this.getAppVersion(false);
this.appVersionCode = await this.getAppVersion(true);
} catch {}
}
requestAnimationFrame(this.connectedStatus.bind(this)); requestAnimationFrame(this.connectedStatus.bind(this));
}) })
.catch(err => { .catch(err => {
console.warn(err);
alert( alert(
this.appService.os.platform() === 'win32' this.appService.os.platform() === 'win32'
? `It looks like there is something wrong with your install. ? `It looks like there is something wrong with your install.
@@ -419,6 +432,23 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
this.appService.electron.ipcRenderer.send('adb-command', { command, settings, uuid }); this.appService.electron.ipcRenderer.send('adb-command', { command, settings, uuid });
}); });
} }
copyToClipboard(value: string) {
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);
this.notInstalled = versionInfo.includes('Unable to find package');
const versionParts = versionInfo
.split('\n')
.map(x => x.trim())
.filter(d => d.includes(isCode ? 'versionCode' : 'versionName'));
if (versionParts.length) {
return versionParts[0].split('=')[1].split(' minSdk')[0];
}
return null;
}
async setupAdb() { async setupAdb() {
try { try {
if (!this.isAdbDownloaded()) { if (!this.isAdbDownloaded()) {
@@ -1135,7 +1165,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
batteyInfo.split('\n ').forEach(element => { batteyInfo.split('\n ').forEach(element => {
let attribute = element.replace(/\s/g, '').split(':'); let attribute = element.replace(/\s/g, '').split(':');
const matcher = /true|false|[0-9].{0,}/g; const matcher = /true|false|[0-9].{0,}/g;
if (attribute[1].match(matcher)) { if (attribute.length > 1 && attribute[1].match(matcher)) {
try { try {
attribute[1] = JSON.parse(attribute[1]); attribute[1] = JSON.parse(attribute[1]);
Object.assign(batteryObject, { [attribute[0]]: attribute[1] }); Object.assign(batteryObject, { [attribute[0]]: attribute[1] });
+1
View File
@@ -1,4 +1,5 @@
<app-header></app-header> <app-header></app-header>
<app-header-banner></app-header-banner>
<div class="app-container"> <div class="app-container">
<router-outlet></router-outlet> <router-outlet></router-outlet>
</div> </div>
+31 -26
View File
@@ -1,29 +1,29 @@
//
.add-to-drag { //.add-to-drag {
width: 100%; // width: 100%;
padding: 1em; // padding: 1em;
border: 2px dashed #3f3f3f; // border: 2px dashed #3f3f3f;
text-align: center; // text-align: center;
} //}
.spinner, //.spinner,
.spinner-drag { //.spinner-drag {
position: fixed; // position: fixed;
top: 50%; // top: 50%;
left: 50%; // left: 50%;
transform: translate(-50%, -50%); // transform: translate(-50%, -50%);
z-index: 10; // z-index: 10;
display: none; // display: none;
} //}
.spinner-background { //.spinner-background {
background-color: rgba(255, 255, 255, 0.5); // background-color: rgba(255, 255, 255, 0.5);
position: absolute; // position: absolute;
left: 0; // left: 0;
top: 0; // top: 0;
height: 100%; // height: 100%;
width: 100%; // width: 100%;
border-top-left-radius: 40px; // border-top-left-radius: 40px;
z-index: 9; // z-index: 9;
} //}
#mainWebView{ #mainWebView{
width: 100%; width: 100%;
height: calc(100% - 35px); height: calc(100% - 35px);
@@ -33,3 +33,8 @@
z-index: 8; z-index: 8;
background:#12152d; background:#12152d;
} }
.app-container{
padding-top: 35px;
}
+6 -2
View File
@@ -1,7 +1,6 @@
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { ContentComponent } from './content/content.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MzButtonModule, MzCheckboxModule, MzModalModule, MzTooltipModule } from 'ngx-materialize'; import { MzButtonModule, MzCheckboxModule, MzModalModule, MzTooltipModule } from 'ngx-materialize';
@@ -29,10 +28,12 @@ import { VirtualScrollerModule } from 'ngx-virtual-scroller';
import { HeadsetSettingsComponent } from './headset-settings/headset-settings.component'; import { HeadsetSettingsComponent } from './headset-settings/headset-settings.component';
import { SetupGuideComponent } from './setup-guide/setup-guide.component'; import { SetupGuideComponent } from './setup-guide/setup-guide.component';
import { ConnectionStatusComponent } from './connection-status/connection-status.component'; import { ConnectionStatusComponent } from './connection-status/connection-status.component';
import { HeaderBannerComponent } from './header-banner/header-banner.component';
import { WirelessConnectionComponent } from './wireless-connection/wireless-connection.component';
import { StreamOptionsComponent } from './stream-options/stream-options.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
ContentComponent,
HeaderComponent, HeaderComponent,
StatusBarComponent, StatusBarComponent,
LoadingSpinnerComponent, LoadingSpinnerComponent,
@@ -50,6 +51,9 @@ import { ConnectionStatusComponent } from './connection-status/connection-status
HeadsetSettingsComponent, HeadsetSettingsComponent,
SetupGuideComponent, SetupGuideComponent,
ConnectionStatusComponent, ConnectionStatusComponent,
HeaderBannerComponent,
WirelessConnectionComponent,
StreamOptionsComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
+4 -2
View File
@@ -1,4 +1,3 @@
import { SetupComponent } from './setup/setup.component';
import { Routes } from '@angular/router'; import { Routes } from '@angular/router';
import { PackagesComponent } from './packages/packages.component'; import { PackagesComponent } from './packages/packages.component';
import { WebviewComponent } from './webview/webview.component'; import { WebviewComponent } from './webview/webview.component';
@@ -6,15 +5,18 @@ import { FilesComponent } from './files/files.component';
import { CurrentTasksComponent } from './current-tasks/current-tasks.component'; import { CurrentTasksComponent } from './current-tasks/current-tasks.component';
import { HeadsetSettingsComponent } from './headset-settings/headset-settings.component'; import { HeadsetSettingsComponent } from './headset-settings/headset-settings.component';
import { SetupGuideComponent } from './setup-guide/setup-guide.component'; import { SetupGuideComponent } from './setup-guide/setup-guide.component';
import { WirelessConnectionComponent } from './wireless-connection/wireless-connection.component';
import { StreamOptionsComponent } from './stream-options/stream-options.component';
export const AppRoutes: Routes = [ export const AppRoutes: Routes = [
// { path: 'setup', component: SetupComponent },
{ path: 'tasks', component: CurrentTasksComponent }, { path: 'tasks', component: CurrentTasksComponent },
{ path: 'packages', component: PackagesComponent }, { path: 'packages', component: PackagesComponent },
{ path: 'packages/:packageName', component: PackagesComponent }, { path: 'packages/:packageName', component: PackagesComponent },
{ path: 'tools', component: HeadsetSettingsComponent }, { path: 'tools', component: HeadsetSettingsComponent },
{ path: 'setup', component: SetupGuideComponent }, { path: 'setup', component: SetupGuideComponent },
{ path: 'webview', component: WebviewComponent }, { path: 'webview', component: WebviewComponent },
{ path: 'wireless', component: WirelessConnectionComponent },
{ path: 'streaming', component: StreamOptionsComponent },
{ path: 'device-files', component: FilesComponent }, { path: 'device-files', component: FilesComponent },
{ path: '**', component: WebviewComponent }, { path: '**', component: WebviewComponent },
]; ];
+54 -10
View File
@@ -3,6 +3,7 @@ import { LoadingSpinnerService } from './loading-spinner.service';
import { WebviewService } from './webview.service'; import { WebviewService } from './webview.service';
import { FilesComponent } from './files/files.component'; import { FilesComponent } from './files/files.component';
import { HeaderComponent } from './header/header.component'; import { HeaderComponent } from './header/header.component';
import { Router } from '@angular/router';
declare let __dirname, process; declare let __dirname, process;
export enum FolderType { export enum FolderType {
MAIN, MAIN,
@@ -26,14 +27,15 @@ export class AppService {
showTaskActions: boolean; showTaskActions: boolean;
updateAvailable: boolean; updateAvailable: boolean;
showRepo: boolean; showRepo: boolean;
isSetupOpen: boolean; // isSetupOpen: boolean;
isFilesOpen: boolean; // isFilesOpen: boolean;
isPackagesOpen: boolean; // isPackagesOpen: boolean;
isSettingsOpen: boolean; // isSettingsOpen: boolean;
isTasksOpen: boolean; // isTasksOpen: boolean;
hideNSFW: boolean; hideNSFW: boolean;
filesComponent: FilesComponent; filesComponent: FilesComponent;
appData: string; appData: string;
apkPath: string;
fs: any; fs: any;
path: any; path: any;
nativeApp: any; nativeApp: any;
@@ -62,7 +64,7 @@ export class AppService {
downloadResolves: any = {}; downloadResolves: any = {};
extractResolves: any = {}; extractResolves: any = {};
headerComponent: HeaderComponent; headerComponent: HeaderComponent;
constructor(private spinnerService: LoadingSpinnerService) { constructor(private spinnerService: LoadingSpinnerService, private router: Router) {
this.path = (<any>window).require('path'); this.path = (<any>window).require('path');
this.fs = (<any>window).require('fs'); this.fs = (<any>window).require('fs');
this.request = (<any>window).require('request'); this.request = (<any>window).require('request');
@@ -78,6 +80,8 @@ export class AppService {
this.remote = (<any>window).require('@electron/remote'); this.remote = (<any>window).require('@electron/remote');
this.nativeApp = this.remote.app; this.nativeApp = this.remote.app;
this.appData = this.path.join(this.nativeApp.getPath('appData'), 'SideQuest'); this.appData = this.path.join(this.nativeApp.getPath('appData'), 'SideQuest');
this.apkPath = this.path.join(this.appData, 'experimental.apk');
this.exec = (<any>window).require('child_process').exec; this.exec = (<any>window).require('child_process').exec;
this.execSync = (<any>window).require('child_process').execSync; this.execSync = (<any>window).require('child_process').execSync;
this.uuidv4 = (<any>window).require('uuid/v4'); this.uuidv4 = (<any>window).require('uuid/v4');
@@ -123,6 +127,50 @@ export class AppService {
} }
}); });
} }
isPageOpen(page: string) {
return this.router.url.includes(page);
}
get pageTitle() {
if (this.isSettingsOpen) {
return 'Headset Settings';
} else if (this.isFilesOpen) {
return 'File Manager';
} else if (this.isPackagesOpen) {
return 'App Manager';
} else if (this.isTasksOpen) {
return 'Task Manager';
} else if (this.isSetupOpen) {
return 'Setup & Support';
} else if (this.isWirelessOpen) {
return 'Wireless Connection';
} else if (this.isStreamingOpen) {
return 'Streaming Options';
}
}
get isSetupOpen() {
return this.isPageOpen('/setup');
}
get isFilesOpen() {
return this.isPageOpen('/device-files');
}
get isPackagesOpen() {
return this.isPageOpen('/packages');
}
get isSettingsOpen() {
return this.isPageOpen('/tools');
}
get isTasksOpen() {
return this.isPageOpen('/tasks');
}
get isWirelessOpen() {
return this.isPageOpen('/wireless');
}
get isStreamingOpen() {
return this.isPageOpen('/streaming');
}
extract(path, options, callback, task?) { extract(path, options, callback, task?) {
return this.extractFileAPI(options.dir, path, task).then(callback); return this.extractFileAPI(options.dir, path, task).then(callback);
} }
@@ -155,10 +203,6 @@ export class AppService {
this.showCustomActions = false; this.showCustomActions = false;
this.showTaskActions = false; this.showTaskActions = false;
this.showRepo = false; this.showRepo = false;
this.isFilesOpen = false;
this.isPackagesOpen = false;
this.isSettingsOpen = false;
this.isTasksOpen = false;
} }
doesFileExist(path) { doesFileExist(path) {
try { try {
@@ -1,5 +1,5 @@
<div class="right-side-diagnostics"> <div class="right-side-diagnostics" *ngIf="adb.diagnostics">
<h3 i18n>Connection Status</h3> <h3 i18n>Connection Status</h3>
<div i18n> <div i18n>
<div class="status-circle" [ngClass]="{'green': adb.diagnostics.usb && adb.diagnostics.usb.is_connected}"></div> <div class="status-circle" [ngClass]="{'green': adb.diagnostics.usb && adb.diagnostics.usb.is_connected}"></div>
@@ -18,37 +18,22 @@
<span class="status-text">{{adb.devices.length && adb.deviceStatus === ConnectionStatus.UNAUTHORIZED?'Not Authorized.':'Device Authorized'}}</span> <span class="status-text">{{adb.devices.length && adb.deviceStatus === ConnectionStatus.UNAUTHORIZED?'Not Authorized.':'Device Authorized'}}</span>
</div> </div>
<br> <br>
<!--<div class="hint-text" *ngIf="adb.currentHint">{{adb.currentHint}}</div>-->
<!--<br>-->
<!--<div i18n *ngIf="adb.isReady" >-->
<!-- <div class="status-circle" [ngClass]="{'green': adb.diagnostics.usb && adb.diagnostics.usb.is_mtp_enabled}"></div>-->
<!-- <span class="status-text">{{adb.diagnostics.usb && adb.diagnostics.usb.is_mtp_enabled?'MTP Enabled ( Optional )':'MTP Not Enabled ( Optional )'}}</span>-->
<!--</div>-->
<!--<br *ngIf="adb.isReady" >-->
<!-- <button class="pure-material-button-contained small spaced" *ngIf="adb.isReady" [ngClass]="{'reset': adb.diagnostics.usb && adb.diagnostics.usb.is_mtp_enabled}" (click)="adb.toggleMTP()" i18n>{{adb.diagnostics.usb && adb.diagnostics.usb.is_mtp_enabled ? 'disable MTP':'enable mtp'}}</button>-->
<!--<div class="switch switch-margin-bottom" *ngIf="adb.isReady" >-->
<!-- <label>-->
<!-- Off-->
<!-- <input type="checkbox" class="disable-reviews" [checked]="adb.diagnostics.usb && adb.diagnostics.usb.is_mtp_enabled" (click)="adb.toggleMTP()">-->
<!-- <span class="lever disable-reviews-switch"></span>-->
<!-- On-->
<!-- </label>-->
<!--</div>-->
<div class="pure-material-button-contained button-margin-bottom" (click)="helpOpen = true;" *ngIf="!adb.isReady">Fix It For Me</div> <div class="pure-material-button-contained button-margin-bottom" (click)="helpOpen = true;" *ngIf="!adb.isReady">Fix It For Me</div>
<!--<button class="pure-material-button-contained button-margin-bottom" (click)="backHome.emit()" *ngIf="adb.isReady && (adb.isOutOfDate || adb.notInstalled)">Install SideQuest</button>-->
<!-- <button class="pure-material-button-contained button-margin-bottom flat" (click)="backHome.emit()" *ngIf="adb.isReady && !(adb.isOutOfDate || adb.notInstalled)">Back Home</button>-->
</div> </div>
<div class="help-section" *ngIf="helpOpen"> <div class="help-section" *ngIf="helpOpen">
<div class="diag-recommend"> <div class="diag-recommend">
<div class="back-arrow" (click)="helpOpen = false"></div><h2 class="clearfix" i18n> <h2 class="clearfix" i18n>
{{(adb.diagnostics.usb && adb.diagnostics.usb.result_status=='diag-good' && adb.devices.length && adb.deviceStatus !== ConnectionStatus.UNAUTHORIZED)?'You\'re all set!':'So how do I fix it?'}} {{(adb.diagnostics.usb && adb.diagnostics.usb.result_status=='diag-good' && adb.devices.length && adb.deviceStatus !== ConnectionStatus.UNAUTHORIZED)?'You\'re all set!':'So how do I fix it?'}}
</h2> </h2>
<div class="switch-margin-bottom"> <div class="switch-margin-bottom">
Here are some solutions we have come across related to this problem. <br>Please try the recommendations here before following tutorials online, this information is always the most up to date. Here are some solutions we have come across related to this problem. <br>Please try the recommendations here before following tutorials online, this information is always the most up to date.
</div> </div>
<div class="diag-recommend-details" i18n>{{(adb.diagnostics.usb && adb.diagnostics.usb.result_status=='diag-good' && adb.devices.length && adb.deviceStatus !== ConnectionStatus.UNAUTHORIZED) ? "Check for a popup to accept inside the headset.":adb.diagnostics.usb ? adb.diagnostics.usb.recommendation : ''}}</div> <div class="diag-recommend-details" i18n>{{(adb.diagnostics.usb && adb.diagnostics.usb.result_status=='diag-good' && adb.devices.length && adb.deviceStatus !== ConnectionStatus.UNAUTHORIZED) ? "Check for a popup to accept inside the headset.":adb.diagnostics.usb ? adb.diagnostics.usb.recommendation : ''}}</div>
<br>
<div class="pure-material-button-contained button-margin-bottom" (click)="helpOpen = false">Close</div>
</div> </div>
</div> </div>
@@ -13,7 +13,7 @@
z-index: 200; z-index: 200;
top: 0px; top: 0px;
left: 0px; left: 0px;
right: 270px; right: 0px;
bottom: 0px; bottom: 0px;
background: #111124; background: #111124;
box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px; box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
@@ -22,7 +22,7 @@
.right-side-diagnostics{ .right-side-diagnostics{
position: absolute; position: absolute;
width: 245px; width: 545px;
top: 56px; top: 56px;
right: 20px; right: 20px;
} }
@@ -51,3 +51,20 @@
margin-left: 5px; margin-left: 5px;
vertical-align: middle; vertical-align: middle;
} }
@media only screen and (max-width: 1448px){
.right-side-diagnostics{
width: 445px;
}
}
@media only screen and (max-width: 1279px){
.right-side-diagnostics{
width: 345px;
}
}
@@ -1,3 +0,0 @@
<div class="content content-dark-theme">
</div>
@@ -1,29 +0,0 @@
.body-content {
height: calc(100% - 200px);
width: 100%;
position: relative;
overflow: auto;
}
.content {
padding-top: 1em;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
transition: background-color 350ms ease-out;
}
/*.content-dark-theme{*/
/*background-color:#211c23;*/
/*}*/
/*.content-light-theme{*/
/*background-color:#f0f0f0;*/
/*}*/
.loader-initial {
border: 16px solid #f3f3f3; /* Light grey */
border-top: 16px solid #0094ca; /* Blue */
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
display: inline-block;
margin-bottom: 20px;
}
@@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ContentComponent } from './content.component';
describe('ContentComponent', () => {
let component: ContentComponent;
let fixture: ComponentFixture<ContentComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ContentComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ContentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,13 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { AppService } from '../app.service';
@Component({
selector: 'app-content',
templateUrl: './content.component.html',
styleUrls: ['./content.component.scss'],
})
export class ContentComponent implements OnInit {
constructor(public appService: AppService) {}
ngOnInit() {}
}
@@ -5,6 +5,9 @@
position="bottom" [innerHTML]="'<i class=material-icons>' + task.icon + '</i>' + task.status"> position="bottom" [innerHTML]="'<i class=material-icons>' + task.icon + '</i>' + task.status">
</div> </div>
</div> </div>
<div class="col s2 package-height centered package-item"> <div class="col s2 package-height centered package-item right-align">
<i class="material-icons red-text cursor settings" (click)="task.running?processService.skipCurrent(task):deleteItem()">close</i> <i class="material-icons white-text cursor settings" (click)="task.running?processService.skipCurrent(task):deleteItem()">close</i>
</div>
<div class="col s12 no-padding">
<div class="divider margin-bottom"></div>
</div> </div>
@@ -1,15 +1,30 @@
<div class="inner-app-container">
<div class="screen-description">Manage tasks for downloading, transferring and installing to your headset.</div>
<div class="sync-songs" *ngIf="appService.showTaskActions">
<div class="container"> <div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom"
<div *ngIf="!processService.tasks.length" class="white-text"> tooltip="Clear out the finished tasks." (click)="processService.clearDone()">
Clear Done
<br>No tasks running. </div>
<br><br> <div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom"
<div class="pure-material-button-contained" routerLink="/">Back Home</div> tooltip="Restart the failed tasks." (click)="processService.retryFailed()">
Retry Failed
</div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom"
tooltip="Clear out the failed tasks." (click)="processService.clearFailed()">
Clear Failed
</div>
<div class="pure-material-button-contained spaced active red" mz-tooltip position="bottom"
tooltip="Clear out the finished tasks." (click)="processService.clearAll()">
Clear All
</div>
</div>
<div class="divider divider-margin-top margin-bottom"></div>
<div *ngIf="!processService.tasks.length" class="no-tasks">
No tasks running...
<!-- <div class="pure-material-button-contained" routerLink="/">Back Home</div>-->
</div> </div>
<div class="row" *ngIf="processService.tasks.length"> <div class="row margin-bottom" *ngIf="processService.tasks.length">
<app-current-task-item *ngFor="let task of processService.tasks;" [task]="task"></app-current-task-item> <app-current-task-item *ngFor="let task of processService.tasks;" [task]="task"></app-current-task-item>
</div> </div>
</div> </div>
@@ -13,7 +13,7 @@ export class CurrentTasksComponent implements OnInit {
this.appService.resetTop(); this.appService.resetTop();
appService.webService.isWebviewOpen = false; appService.webService.isWebviewOpen = false;
this.appService.showTaskActions = true; this.appService.showTaskActions = true;
appService.isTasksOpen = true; // appService.isTasksOpen = true;
} }
ngOnInit() { ngOnInit() {
+17 -2
View File
@@ -1,6 +1,6 @@
<div *ngIf="isConnected()" class="top-bar"> <div *ngIf="isConnected()" class="top-bar">
<nav class="pink lighten-2 breadcrumb-wrapper "> <nav class="pink lighten-2 breadcrumb-wrapper ">
<div class="nav-wrapper container"> <div class="nav-wrapper inner-app-container">
<div class="col s12 truncate"> <div class="col s12 truncate">
<a *ngFor="let breadcrumb of breadcrumbs; let i = index" href="javascript:void(0)" class="breadcrumb" <a *ngFor="let breadcrumb of breadcrumbs; let i = index" href="javascript:void(0)" class="breadcrumb"
(click)="open('/'+breadcrumb.path)">{{breadcrumb.name}}<span *ngIf="i === breadcrumbs.length-1 && folderSize"> ({{folderSize}})</span> </a> (click)="open('/'+breadcrumb.path)">{{breadcrumb.name}}<span *ngIf="i === breadcrumbs.length-1 && folderSize"> ({{folderSize}})</span> </a>
@@ -8,7 +8,7 @@
</div> </div>
</nav> </nav>
</div> </div>
<div class="container files-section"> <div class="inner-app-container files-section">
<div *ngIf="!isConnected()" class="white-text"> <div *ngIf="!isConnected()" class="white-text">
<br>You are not currently connected. <br>You are not currently connected.
<br><br> <br><br>
@@ -21,6 +21,18 @@
<div class="grey-text">{{this.currentPath}}</div> <div class="grey-text">{{this.currentPath}}</div>
</div> </div>
<div class="beast-saber-buttons">
<ng-container *ngFor="let favourite of appService.headerComponent.favourites.fileFavourites">
<a href="javascript:void(0)" class="waves-effect waves-light synthrideerz margin-right"
(click)="appService.filesComponent.open(favourite.uri)"
mz-tooltip tooltip="{{favourite.name}}">
<img *ngIf="favourite.icon" src="{{favourite.icon}}" class="responsive-img" /></a>
</ng-container>
<div class="divider divider-margin-top margin-bottom"></div>
</div>
<div *ngFor="let file of files" class="cursor text-dark-theme"> <div *ngFor="let file of files" class="cursor text-dark-theme">
<div class="file" (click)="selectFile($event, file); $event.stopPropagation()"> <div class="file" (click)="selectFile($event, file); $event.stopPropagation()">
<div class="right"> <div class="right">
@@ -48,6 +60,9 @@
<i class="large material-icons">add</i> <i class="large material-icons">add</i>
</a> </a>
<ul> <ul>
<li mz-tooltip position="left" tooltip="Manage favourite folders"
(click)="appService.headerComponent.manageFavs.openModal(); appService.headerComponent.favouriteMax = 10; appService.headerComponent.favoritePathType = 'Url';"
><a class="btn-floating red"><i class="material-icons">favorite</i></a></li>
<li mz-tooltip position="left" tooltip="Upload file to this folder" (click)="uploadFiles()"><a <li mz-tooltip position="left" tooltip="Upload file to this folder" (click)="uploadFiles()"><a
class="btn-floating purple"><i class="material-icons">file_upload</i></a></li> class="btn-floating purple"><i class="material-icons">file_upload</i></a></li>
<li mz-tooltip position="left" tooltip="Make new folder in this folder" (click)="mkDirModal.openModal()"><a <li mz-tooltip position="left" tooltip="Make new folder in this folder" (click)="mkDirModal.openModal()"><a
@@ -7,6 +7,11 @@
line-height: 40px; line-height: 40px;
} }
.synthrideerz{
width: 40px;
height: 40px;
border-radius: 50%;
}
.drag-indicator{ .drag-indicator{
font-size: 2rem; font-size: 2rem;
line-height: 3rem; line-height: 3rem;
@@ -18,6 +23,7 @@
.selected{ .selected{
background: #e93c96; background: #e93c96;
border-radius: 10px; border-radius: 10px;
height: 4em;
} }
.save-icon{ .save-icon{
+1 -1
View File
@@ -46,7 +46,7 @@ export class FilesComponent implements OnInit {
) { ) {
this.appService.resetTop(); this.appService.resetTop();
appService.filesComponent = this; appService.filesComponent = this;
appService.isFilesOpen = true; // appService.isFilesOpen = true;
appService.webService.isWebviewOpen = false; appService.webService.isWebviewOpen = false;
} }
ngOnAfterViewInit() { ngOnAfterViewInit() {
@@ -0,0 +1,33 @@
<div class="banner-container">
<div class="right in-vr-installer">
<img src="assets/images/in-vr-logo.png" class="left"/>
<div class="right">
<div class="in-vr-title">SideQuest inside your VR headset</div>
<div class="in-vr-description">Discover, Download & Play thousands of FREE VR apps and games with SideQuest's VR App</div>
<!-- <div class="pure-material-button-contained" mz-tooltip position="bottom"-->
<!-- tooltip="Clear out the finished tasks.">-->
<!-- Install SideQuest in your headset-->
<!-- </div>-->
<ng-container *ngIf="!adb.isReady">
<div class="pure-material-button-contained " routerLink="/setup">
Open Setup Instructions
</div>
</ng-container>
<ng-container *ngIf="adb.isReady">
<div class="pure-material-button-contained " (click)="install()" *ngIf="!isLoading && (adb.notInstalled || isOutOfDate)">
{{ (adb.notInstalled ? 'Install SideQuest in your Headset' : 'Update SideQuest in your Headset') }}
</div>
<div *ngIf="!adb.notInstalled && !isOutOfDate && !isLoading " class="in-vr-installed">
Latest version installed <i class="material-icons green-text done-icon">done</i>
</div>
<div *ngIf="isLoading" class="loader-tiny"></div>
</ng-container>
</div>
</div>
<div class="back-button pointer" routerLink="/webview">
<i class="material-icons">arrow_back_ios</i> Back Home
</div>
<div class="title">
{{appService.pageTitle}}
</div>
</div>
@@ -0,0 +1,70 @@
.banner-container{
background: linear-gradient(89.97deg, #1A1D3C 0.02%, #2A3067 99.96%);
//background-size: cover;
height: 170px;
width: 100%;
position: relative;
top: 35px;
padding-right: 46px;
}
.back-button{
position: absolute;
height: 21px;
left: 46px;
top: 32px;
font-style: normal;
font-weight: 400;
font-size: 18px;
line-height: 21px;
align-items: center;
text-align: center;
color: #B9BBD2;
i{
vertical-align: text-bottom;
}
}
.title{
position: absolute;
height: 35px;
left: 46px;
top: 77px;
font-style: normal;
font-weight: 500;
font-size: 30px;
line-height: 35px;
display: flex;
align-items: center;
color: #FFFFFF;
}
.in-vr-title, .in-vr-installed{
color: white;
font-style: normal;
font-weight: 500;
font-size: 20px;
line-height: 23px;
margin-top: 24px;
margin-bottom: 10px;
}
.in-vr-installed{
margin-top: 10px;
}
.in-vr-description{
font-style: normal;
font-weight: 400;
font-size: 14px;
max-width: 300px;
line-height: 16px;
margin-bottom: 10px;
}
.in-vr-installed, .in-vr-description{
color: #B9BBD2;
}
.in-vr-installer img{
margin-top: 10px;
margin-right: 19px;
}
.done-icon{
vertical-align: text-bottom;
font-size: 1.5em;
}
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HeaderBannerComponent } from './header-banner.component';
describe('HeaderBannerComponent', () => {
let component: HeaderBannerComponent;
let fixture: ComponentFixture<HeaderBannerComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [HeaderBannerComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HeaderBannerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,184 @@
import { Component, OnInit } from '@angular/core';
import { AppService } from '../app.service';
import { AdbClientService } from '../adb-client.service';
const ADBErrors = {
INSTALL_FAILED_INSUFFICIENT_STORAGE: `Your headset does not have enough storage to install this app. Try removing some apps and trying again.`,
INSTALL_FAILED_USER_RESTRICTED: `The install was cancelled, please try again.`,
INSTALL_FAILED_NO_MATCHING_ABIS: `The install failed because the app is not compatible with this device, is this a supported VR headset?`,
INSTALL_FAILED_VERSION_DOWNGRADE: `The installed failed because the app is already installed and the installed version is newer than this version.`,
INSTALL_FAILED_VERIFICATION_FAILURE: `The installed failed because the app is possibly corrupt. Try restarting your headset just in-case.`,
INSTALL_FAILED_UPDATE_INCOMPATIBLE: `The installed failed because the new version is signed differently. Try uninstalling first.`,
INSTALL_FAILED_OLDER_SDK: `The installed failed because the app is intended for a newer version of Android than is on the headset.`,
INSTALL_FAILED_TEST_ONLY: `The installed failed because I'm a teapot.`,
INSTALL_FAILED_CONFLICTING_PROVIDER: `The installed failed for an unknown reason: CONFLICTING_PROVIDER`,
};
@Component({
selector: 'app-header-banner',
templateUrl: './header-banner.component.html',
styleUrls: ['./header-banner.component.scss'],
})
export class HeaderBannerComponent implements OnInit {
apkDownloadPath: string;
isLoading: boolean;
isOutOfDate: boolean;
// the latest available version of the in-headset app
private latestAppVersion: string | null = null;
constructor(private appService: AppService, public adb: AdbClientService) {}
ngOnInit() {
setInterval(() => {
this.getLatestApk();
}, 120000);
this.getLatestApk();
}
setOutOfDate() {
// any time we don't know the currently installed app version or we don't know the latest available version, treat it as up to date
if (this.latestAppVersion !== null && this.adb.appVersionCode !== null && this.adb.appVersionCode !== undefined) {
if (Number(this.adb.appVersionCode) < Number(this.latestAppVersion)) {
this.isOutOfDate = true;
return;
}
}
this.isOutOfDate = false;
}
async getLatestApk() {
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() {
if (!this.apkDownloadPath) {
return Promise.reject('Could not download latest apk, please try again!');
}
console.log('downloadExperimentalAPK', this.apkDownloadPath);
return new Promise<void>((resolve, reject) => {
const requestOptions = {
timeout: 30000,
'User-Agent': this.appService.getUserAgent(),
};
this.appService
.request(this.apkDownloadPath, requestOptions)
.on('error', error => {
console.log(`Request Error ${error}`);
reject(error);
})
.on('progress', state => {})
.on('end', () => {
return resolve();
})
.pipe(this.appService.fs.createWriteStream(this.appService.path.join(this.appService.appData, 'experimental.apk')));
});
}
useBundledAPK() {
const sourcesPath = this.appService.getPlatformToolsSeedPath().replace('platform-tools', 'experimental.apk');
console.log(sourcesPath);
if (sourcesPath == null) {
console.error('Unable to locate experimental apk! Try reinstalling sidequest.');
throw new Error(`Unable to locate experimental apk! Try reinstalling sidequest.`);
}
this.appService.fs.copyFileSync(
this.appService.path.join(sourcesPath),
this.appService.path.join(this.appService.appData, 'experimental.apk')
);
}
async install() {
try {
const oldVersion = this.adb.appVersionCode || null;
let telemEvent;
if (this.isOutOfDate) {
telemEvent = 'upgrade';
} else if (this.adb.notInstalled) {
telemEvent = 'new';
} else {
telemEvent = 'reinstall';
}
// this.telemetry.telemetry({ event: 'install-sidequest-apk', installType: telemEvent, oldVersion });
this.isLoading = true;
try {
await this.getLatestApk();
await this.downloadExperimentalAPK();
} catch (e) {
// this.toast.show('Failed to download updated SQ apk, falling back to bundled apk. Are you online?', true);
console.warn(e);
this.useBundledAPK();
}
await this.adb.runAdbCommand('push "' + this.appService.apkPath + '" /data/local/tmp/sq.apk');
await this.adb.runAdbCommand('shell pm install -r /data/local/tmp/sq.apk');
// this.toast.show('SideQuest installed to headset!');
// this.showConfetti = true;
this.adb.appVersionCode = await this.adb.getAppVersion(true);
// this.telemetry.telemetry({ event: 'install-sidequest-apk-success',
// installType: telemEvent, oldVersion, newVersion: this.adb.appVersionCode || null});
// setTimeout(() => {
// this.showConfetti = false;
// }, 8000);
} catch (e) {
console.log(e);
await this.handleInstallError(e);
} finally {
this.isLoading = false;
}
}
async handleInstallError(e) {
let err;
for (const error of Object.keys(ADBErrors)) {
if (e.toString().includes(error)) {
err = error;
}
}
if (err) {
if (err === 'INSTALL_FAILED_VERSION_DOWNGRADE') {
await this.uninstall();
await this.install();
} else if (err === 'INSTALL_FAILED_UPDATE_INCOMPATIBLE') {
// TODO need to show a better error here and confirm with the user to uninstall first.
await this.uninstall();
await this.install();
} else {
// this.telemetry.telemetry({event: 'install-error-adb', errorMessage: ADBErrors[err]});
// this.toast.show(ADBErrors[err], true);
}
} else {
// this.telemetry.telemetry({event: 'install-error-unhandled', errorMessage: e.toString()});
// this.toast.show(e, true);
}
}
async uninstall() {
await this.adb.runAdbCommand('uninstall ' + this.adb.VR_APP_PACKAGE);
}
async userUninstall() {
try {
// await this.telemetry.telemetry({event: 'user-uninstall'});
await this.uninstall();
// await this.telemetry.telemetry({event: 'user-uninstall-success'});
} catch (e) {
// await this.telemetry.telemetry({event: 'user-uninstall-failed', error: e.toString()});
// this.toast.show(e, true);
}
}
}
+163 -207
View File
@@ -45,28 +45,13 @@
routerLink="/webview"><i class="material-icons left">public</i>Go to url</div><br> routerLink="/webview"><i class="material-icons left">public</i>Go to url</div><br>
<div class="btn-flat waves-light waves-light full-width center-align white-text" <div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="browserMenu.style.display = 'none';browserMenuBack.style.display = 'none';favoriteType = 'browserFavourites';favouriteMax = 20;favoritePathType = 'Url';manageFavs.openModal()" (click)="browserMenu.style.display = 'none';browserMenuBack.style.display = 'none';favoriteType = 'browserFavourites';favouriteMax = 20;favoritePathType = 'Url';manageFavs.openModal()"
><i class="material-icons left">edit</i>Manage</div><br> ><i class="material-icons left">edit</i>Manage Favs</div><br>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="addCurrentFavourite()"
><i class="material-icons left">add</i>Add Current</div><br>
<ng-container *ngFor="let favourite of favourites.browserFavourites"> <ng-container *ngFor="let favourite of favourites.browserFavourites">
<div class="btn-flat waves-light waves-light full-width center-align white-text truncate" <div class="btn-flat waves-light waves-light full-width center-align white-text truncate"
(click)="browserMenu.style.display = 'none';browserMenuBack.style.display = 'none';webService.loadUrl(favourite.uri)" (click)="browserMenu.style.display = 'none';browserMenuBack.style.display = 'none';webService.loadUrl(favourite.uri)"
routerLink="/webview"><img *ngIf="favourite.icon" class="left browser-menu-image" src="{{favourite.icon}}"/>{{favourite.name}}</div><br> routerLink="/webview"><img *ngIf="favourite.icon" class="left browser-menu-image" src="{{favourite.icon}}"/>{{favourite.name}}</div><br>
</ng-container> </ng-container>
</div> </div>
<div class="user-menu" #userMenu>
<!-- <div class="btn-flat waves-light waves-light full-width center-align white-text"-->
<!-- *ngIf="isConnected()&&osPlatform === 'win32'"-->
<!-- (click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';scrcpyModal.openModal();">-->
<!-- <i class="material-icons left">live_tv</i>Streaming</div>-->
<!-- <div class="btn-flat waves-light waves-light full-width center-align white-text" *ngIf="adbService.deviceIp"-->
<!-- (click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';wifiModal.openModal()"><i-->
<!-- class="material-icons left">wifi</i>Wifi</div>-->
<!-- <div class="btn-flat waves-light waves-light full-width center-align white-text"-->
<!-- (click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';adbModal.openModal()"><i-->
<!-- class="material-icons left">input</i>ADB Commands</div>-->
</div>
<app-link *ngIf="appService.updateAvailable" <app-link *ngIf="appService.updateAvailable"
class="waves-effect waves-light btn-flat update-available link small-button warning" (click)="updateAvailable()" class="waves-effect waves-light btn-flat update-available link small-button warning" (click)="updateAvailable()"
@@ -90,12 +75,12 @@
class="material-icons white-text no-outline" position="bottom" tooltip="Forward"> class="material-icons white-text no-outline" position="bottom" tooltip="Forward">
arrow_forward arrow_forward
</i> </i>
<i mz-tooltip (click)="scrcpyModal.openModal();" *ngIf="isConnected()&&osPlatform === 'win32'" <i mz-tooltip routerLink="/streaming" *ngIf="isConnected()&&osPlatform === 'win32'"
class="material-icons white-text no-outline" position="bottom" class="material-icons white-text no-outline" position="bottom"
tooltip="Stream from your headset to your PC with ScrCpy."> tooltip="Stream from your headset to your PC with ScrCpy.">
live_tv live_tv
</i> </i>
<i mz-tooltip *ngIf="adbService.deviceIp" (click)="wifiModal.openModal()" <i mz-tooltip *ngIf="adbService.deviceIp" routerLink="/wireless"
class="material-icons no-outline" class="material-icons no-outline"
[ngClass]="{'green-text':adbService.wifiEnabled,'white-text':!adbService.wifiEnabled}" position="bottom" [ngClass]="{'green-text':adbService.wifiEnabled,'white-text':!adbService.wifiEnabled}" position="bottom"
tooltip="Enable wireless mode. (Experimental)"> tooltip="Enable wireless mode. (Experimental)">
@@ -128,6 +113,12 @@
tooltip="Device settings & tools"> tooltip="Device settings & tools">
build build
</i> </i>
<i id="support-screen" routerLink="/setup" mz-tooltip
class="material-icons white-text no-outline" position="bottom"
tooltip="Help and support with SideQuest">
contact_support
</i>
<i mz-tooltip (click)="commandMenu.style.display = 'block';commandMenuBack.style.display = 'block'" <i mz-tooltip (click)="commandMenu.style.display = 'block';commandMenuBack.style.display = 'block'"
class="material-icons white-text no-outline" class="material-icons white-text no-outline"
position="bottom" tooltip="Run ADB commands"> position="bottom" tooltip="Run ADB commands">
@@ -156,11 +147,11 @@
<div class="top-dnd-backing"> <div class="top-dnd-backing">
<div class="top-banner"> <div class="top-banner">
<div> <!-- <div>-->
<a href="#/" class="logo"> <!-- <a href="#/" class="logo">-->
<img src="assets/images/new-logo.png" /> <!-- <img src="assets/images/new-logo.png" />-->
</a> <!-- </a>-->
</div> <!-- </div>-->
<div class="top-buttons hide-on-med-and-down"> <div class="top-buttons hide-on-med-and-down">
</div> </div>
<div class="well well-lg drop-message center-align" *ngIf="dragAndDropService.isDragging"> <div class="well well-lg drop-message center-align" *ngIf="dragAndDropService.isDragging">
@@ -174,42 +165,6 @@
(click)="webService.loadUrl('https://synthriderz.com/beatmaps/recent')"> (click)="webService.loadUrl('https://synthriderz.com/beatmaps/recent')">
<img src="assets/images/Synth.png" class="responsive-img" /></a>&nbsp;&nbsp;&nbsp; <img src="assets/images/Synth.png" class="responsive-img" /></a>&nbsp;&nbsp;&nbsp;
</div> </div>
<div *ngIf="appService.isFilesOpen" class="beast-saber-buttons">
<ng-container *ngFor="let favourite of favourites.fileFavourites">
<a href="javascript:void(0)" class="waves-effect waves-light synthrideerz margin-right"
(click)="appService.filesComponent.open(favourite.uri)"
mz-tooltip tooltip="{{favourite.name}}">
<img *ngIf="favourite.icon" src="{{favourite.icon}}" class="responsive-img" /></a>
</ng-container>
<ng-container>
<a href="javascript:void(0)" class="btn-floating pink-button waves-effect waves-light" mz-tooltip tooltip="Manage"
(click)="manageFavs.openModal(); favouriteMax = 10; favoritePathType = 'Url';"><i class="material-icons">add</i></a>
</ng-container>
</div>
<div class="sync-songs" *ngIf="appService.showTaskActions">
<div class="waves-effect waves-light btn small-button pink-button" mz-tooltip position="bottom"
tooltip="Clear out the finished tasks." (click)="processService.clearDone()">
Clear Done
</div>
&nbsp;&nbsp;
<div class="waves-effect waves-light btn small-button pink-button" mz-tooltip position="bottom"
tooltip="Restart the failed tasks." (click)="processService.retryFailed()">
Retry Failed
</div>
&nbsp;&nbsp;
<div class="waves-effect waves-light btn small-button pink-button" mz-tooltip position="bottom"
tooltip="Clear out the failed tasks." (click)="processService.clearFailed()">
Clear Failed
</div>
&nbsp;&nbsp;
<div class="waves-effect waves-light btn small-button red" mz-tooltip position="bottom"
tooltip="Clear out the finished tasks." (click)="processService.clearAll()">
Clear All
</div>
&nbsp;&nbsp;
</div>
<div id="searchFilterContainer" *ngIf="appService.showSearch"> <div id="searchFilterContainer" *ngIf="appService.showSearch">
<div class="search" *ngIf="false"> <div class="search" *ngIf="false">
<div class="input-field inline search-box"> <div class="input-field inline search-box">
@@ -261,37 +216,37 @@
</mz-modal> </mz-modal>
<mz-modal #wifiModal [fixedFooter]="true"> <!--<mz-modal #wifiModal [fixedFooter]="true">-->
<mz-modal-header> <!-- <mz-modal-header>-->
<h4>Wireless</h4> <!-- <h4>Wireless</h4>-->
</mz-modal-header> <!-- </mz-modal-header>-->
<mz-modal-content> <!-- <mz-modal-content>-->
<div class="center-align"> <!-- <div class="center-align">-->
Enable wifi mode to install apps wirelessly.<br> <!-- Enable wifi mode to install apps wirelessly.<br>-->
<div class="chip">Experimental</div> <!-- <div class="chip">Experimental</div>-->
<br><br><br> <!-- <br><br><br>-->
<i mz-tooltip class="material-icons large cursor" [ngClass]="{'green-text':adbService.wifiEnabled}" <!-- <i mz-tooltip class="material-icons large cursor" [ngClass]="{'green-text':adbService.wifiEnabled}"-->
(click)="adbService.wifiEnabled=!adbService.wifiEnabled;adbService.toggleWifiMode()" position="bottom" <!-- (click)="adbService.wifiEnabled=!adbService.wifiEnabled;adbService.toggleWifiMode()" position="bottom"-->
tooltip="Enable wireless mode. (Experimental)"> <!-- tooltip="Enable wireless mode. (Experimental)">-->
wifi <!-- wifi-->
</i> <!-- </i>-->
<br> <!-- <br>-->
<br> <!-- <br>-->
<div> <!-- <div>-->
<h5>Device IP:</h5> <!-- <h5>Device IP:</h5>-->
{{adbService.deviceIp}}<br> <!-- {{adbService.deviceIp}}<br>-->
<a class="waves-effect waves-dark btn search-button-margin white black-text" mz-modal-close <!-- <a class="waves-effect waves-dark btn search-button-margin white black-text" mz-modal-close-->
(click)="connectWifi()">Connect</a> <!-- (click)="connectWifi()">Connect</a>-->
<br><br> <!-- <br><br>-->
<a class="waves-effect waves-dark btn search-button-margin white black-text" mz-modal-close <!-- <a class="waves-effect waves-dark btn search-button-margin white black-text" mz-modal-close-->
(click)="adbCommandToRun = 'adb disconnect';runAdbCommand()">Reset</a> <!-- (click)="adbCommandToRun = 'adb disconnect';runAdbCommand()">Reset</a>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</mz-modal-content> <!-- </mz-modal-content>-->
<mz-modal-footer> <!-- <mz-modal-footer>-->
<button mz-button [flat]="true" mz-modal-close>Close</button> <!-- <button mz-button [flat]="true" mz-modal-close>Close</button>-->
</mz-modal-footer> <!-- </mz-modal-footer>-->
</mz-modal> <!--</mz-modal>-->
<mz-modal #logcatModal [fixedFooter]="true" [options]="{dismissible: false}"> <mz-modal #logcatModal [fixedFooter]="true" [options]="{dismissible: false}">
@@ -425,125 +380,126 @@
</mz-modal> </mz-modal>
<mz-modal #scrcpyModal [fixedFooter]="true"> <!--<mz-modal #scrcpyModal [fixedFooter]="true">-->
<mz-modal-header> <!-- <mz-modal-header>-->
<h4>Stream Options</h4> <!-- <h4>Stream Options</h4>-->
</mz-modal-header> <!-- </mz-modal-header>-->
<mz-modal-content> <!-- <mz-modal-content>-->
<div class="row"> <!-- <div class="row">-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
Always On Top <!-- Always On Top-->
<div class="grey-text small"> <!-- <div class="grey-text small">-->
Make scrcpy window always on top (above other windows). <!-- Make scrcpy window always on top (above other windows).-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
<div class="switch"> <!-- <div class="switch">-->
<label> <!-- <label>-->
Off <!-- Off-->
<input type="checkbox" [(ngModel)]="scrcpy_options.always_on_top" /> <!-- <input type="checkbox" [(ngModel)]="scrcpy_options.always_on_top" />-->
<span class="lever"></span> <!-- <span class="lever"></span>-->
On <!-- On-->
</label> <!-- </label>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
Bit Rate <!-- Bit Rate-->
<div class="grey-text small"> <!-- <div class="grey-text small">-->
Encode the video at the given bit-rate, expressed in bits/s. Unit suffixes are supported: 'K' (x1000) and 'M' <!-- Encode the video at the given bit-rate, expressed in bits/s. Unit suffixes are supported: 'K' (x1000) and 'M'-->
(x1000000). <!-- (x1000000).-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 input-field fixed-height"> <!-- <div class="col s6 input-field fixed-height">-->
<input id="bit_rate_" [(ngModel)]="scrcpy_options.bit_rate" type="text" /> <!-- <input id="bit_rate_" [(ngModel)]="scrcpy_options.bit_rate" type="text" />-->
<label for="bit_rate_" class="active">Bit Rate</label> <!-- <label for="bit_rate_" class="active">Bit Rate</label>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
Crop <!-- Crop-->
<div class="grey-text small"> <!-- <div class="grey-text small">-->
Crop the device screen on the server. The values are expressed in the device natural orientation (typically, <!-- Crop the device screen on the server. The values are expressed in the device natural orientation (typically,-->
portrait for a phone, landscape for a tablet). Any MaxSize value is computed on the cropped size. <!-- portrait for a phone, landscape for a tablet). Any MaxSize value is computed on the cropped size.-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 input-field fixed-height"> <!-- <div class="col s6 input-field fixed-height">-->
<input id="crop_" [(ngModel)]="scrcpy_options.crop" type="text" /> <!-- <input id="crop_" [(ngModel)]="scrcpy_options.crop" type="text" />-->
<label for="crop_" class="active">Crop</label> <!-- <label for="crop_" class="active">Crop</label>-->
<div class="btn pink-button small-button waves-light waves-effect margin-right" (click)="scrcpy_options.crop = '1280:720:1500:350'">Quest 1 Crop</div> <!-- <div class="btn pink-button small-button waves-light waves-effect margin-right" (click)="scrcpy_options.crop = '1280:720:1500:350'">Quest 1 Crop</div>-->
<div class="btn pink-button small-button waves-light waves-effect margin-right" (click)="scrcpy_options.crop = '1600:900:2017:510'">Quest 2 Crop</div> <!-- <div class="btn pink-button small-button waves-light waves-effect margin-right" (click)="scrcpy_options.crop = '1600:900:2017:510'">Quest 2 Crop</div>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
Fullscreen <!-- Fullscreen-->
<div class="grey-text small"> <!-- <div class="grey-text small">-->
Start in fullscreen. <!-- Start in fullscreen.-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
<div class="switch"> <!-- <div class="switch">-->
<label> <!-- <label>-->
Off <!-- Off-->
<input type="checkbox" [(ngModel)]="scrcpy_options.fullscreen" /> <!-- <input type="checkbox" [(ngModel)]="scrcpy_options.fullscreen" />-->
<span class="lever"></span> <!-- <span class="lever"></span>-->
On <!-- On-->
</label> <!-- </label>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
No Input <!-- No Input-->
<div class="grey-text small"> <!-- <div class="grey-text small">-->
Disable device control (mirror the device in read-only). <!-- Disable device control (mirror the device in read-only).-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
<div class="switch"> <!-- <div class="switch">-->
<label> <!-- <label>-->
Off <!-- Off-->
<input type="checkbox" [(ngModel)]="scrcpy_options.no_control" /> <!-- <input type="checkbox" [(ngModel)]="scrcpy_options.no_control" />-->
<span class="lever"></span> <!-- <span class="lever"></span>-->
On <!-- On-->
</label> <!-- </label>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
Max FPS <!-- Max FPS-->
<div class="grey-text small"> <!-- <div class="grey-text small">-->
Limit the frame rate of screen capture. 0 is unlimited. <!-- Limit the frame rate of screen capture. 0 is unlimited.-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 input-field fixed-height"> <!-- <div class="col s6 input-field fixed-height">-->
<input id="max_fps_" [(ngModel)]="scrcpy_options.max_fps" type="text" /> <!-- <input id="max_fps_" [(ngModel)]="scrcpy_options.max_fps" type="text" />-->
<label for="max_fps_" class="active">Max FPS</label> <!-- <label for="max_fps_" class="active">Max FPS</label>-->
</div> <!-- </div>-->
<div class="col s6 fixed-height"> <!-- <div class="col s6 fixed-height">-->
Max Size <!-- Max Size-->
<div class="grey-text small"> <!-- <div class="grey-text small">-->
Limit both the width and height of the video to value. The other dimension is computed so that the device <!-- Limit both the width and height of the video to value. The other dimension is computed so that the device-->
aspect-ratio is preserved. 0 is unlimited. <!-- aspect-ratio is preserved. 0 is unlimited.-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="col s6 input-field fixed-height"> <!-- <div class="col s6 input-field fixed-height">-->
<input id="max_size_" [(ngModel)]="scrcpy_options.max_size" type="text" /> <!-- <input id="max_size_" [(ngModel)]="scrcpy_options.max_size" type="text" />-->
<label for="max_size_" class="active">Max Size</label> <!-- <label for="max_size_" class="active">Max Size</label>-->
</div> <!-- </div>-->
<div class="col s12" *ngIf="osPlatform === 'darwin'"> <!-- <div class="col s12" *ngIf="osPlatform === 'darwin'">-->
To use ScrCpy on mac you will need to install Homebrew and then install scrcpy with <span class="chip">brew install scrcpy</span> <!-- To use ScrCpy on mac you will need to install Homebrew and then install scrcpy with <span class="chip">brew install scrcpy</span>-->
<br><br> <!-- <br><br>-->
</div> <!-- </div>-->
<div class="col s12" *ngIf="osPlatform === 'linux'"> <!-- <div class="col s12" *ngIf="osPlatform === 'linux'">-->
To use ScrCpy on Linux you will need to install snap package manager with <span class="chip">sudo snap install scrcpy</span> <!-- To use ScrCpy on Linux you will need to install snap package manager with <span class="chip">sudo snap install scrcpy</span>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</mz-modal-content> <!-- </mz-modal-content>-->
<mz-modal-footer> <!-- <mz-modal-footer>-->
<div class="left margin-left"><br>Put your headset on before clicking Start Stream</div> <!-- <div class="left margin-left"><br>Put your headset on before clicking Start Stream</div>-->
<button mz-button [flat]="true" class="footer-margin-right" mz-modal-close>Close</button> <!-- <button mz-button [flat]="true" class="footer-margin-right" mz-modal-close>Close</button>-->
<button mz-button class="pink-button footer-margin-right" mz-modal-close (click)="runscrcpy()">Start Stream</button> <!-- <button mz-button class="pink-button footer-margin-right" mz-modal-close (click)="runscrcpy()">Start Stream</button>-->
<button mz-button class="pink-button" mz-modal-close (click)="appService.opn('https://www.oculus.com/casting')">Oculus Casting</button> <!-- <button mz-button class="pink-button" mz-modal-close (click)="appService.opn('https://www.oculus.com/casting')">Oculus Casting</button>-->
</mz-modal-footer> <!-- </mz-modal-footer>-->
</mz-modal> <!--</mz-modal>-->
<mz-modal #manageFavs [fixedFooter]="true"> <mz-modal #manageFavs [fixedFooter]="true">
<mz-modal-header> <mz-modal-header>
<button mz-button class="right pink-button" (click)="showAddFavourite = !showAddFavourite">{{showAddFavourite? 'Hide' : 'Add New'}}</button> <button mz-button class="right pink-button" (click)="showAddFavourite = !showAddFavourite">{{showAddFavourite? 'Hide' : 'Add New'}}</button>
<button mz-button class="right pink-button margin-right" *ngIf="!showAddFavourite" (click)="addCurrentFavourite()"><i class="material-icons left">add</i>Add Current to favs</button>
<h4>Manage Favourites</h4> <h4>Manage Favourites</h4>
</mz-modal-header> </mz-modal-header>
<mz-modal-content> <mz-modal-content>
@@ -565,7 +521,7 @@
<div class="row fav-padding"> <div class="row fav-padding">
<div class="col s4">Name</div> <div class="col s4">Name</div>
<div class="col s4">{{favoritePathType}}</div> <div class="col s4">{{favoritePathType}}</div>
<div class="col s4">Icon Url</div> <div class="col s4">Icon Url (Optional)</div>
</div> </div>
<hr> <hr>
<div class="no-margin" *ngIf="!this.favourites[favoriteType].length"> <div class="no-margin" *ngIf="!this.favourites[favoriteType].length">
@@ -581,8 +537,8 @@
<i class="material-icons delete-button orange-text" (click)="removeFromFavourites(favoriteType, i)">close</i> <i class="material-icons delete-button orange-text" (click)="removeFromFavourites(favoriteType, i)">close</i>
</div> </div>
</div> </div>
</ng-container> </ng-container>
</mz-modal-content> </mz-modal-content>
<mz-modal-footer> <mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close (click)="resetFavourites(favoriteType); showAddFavourite = false;">Cancel</button> <button mz-button [flat]="true" mz-modal-close (click)="resetFavourites(favoriteType); showAddFavourite = false;">Cancel</button>
@@ -83,13 +83,13 @@ virtual-scroller{
margin-left: 60px; margin-left: 60px;
} }
.top-banner{ .top-banner{
background: #100e11 url(../../assets/images/TopBack.png) bottom right no-repeat; //background: #100e11 url(../../assets/images/TopBack.png) bottom right no-repeat;
background-size: cover; //background-size: cover;
height: 170px; //height: 170px;
width: 100%; //width: 100%;
border-bottom: 1px solid #8f8f8f; //border-bottom: 1px solid #8f8f8f;
transition: 0.35s; //transition: 0.35s;
margin-top: 35px; //margin-top: 35px;
} }
.spider-image{ .spider-image{
margin-top: 50px; margin-top: 50px;
@@ -108,12 +108,12 @@ virtual-scroller{
left: 120px; left: 120px;
} }
.header { .header {
height: 205px; //height: 205px;
/*background: #312249 url(../../assets/images/bg-header.png) left bottom no-repeat;*/ ///*background: #312249 url(../../assets/images/bg-header.png) left bottom no-repeat;*/
position: relative; //position: relative;
-webkit-user-select: none; //-webkit-user-select: none;
border-top-right-radius: 12px; //border-top-right-radius: 12px;
border-top-left-radius: 12px; //border-top-left-radius: 12px;
/*overflow:hidden;*/ /*overflow:hidden;*/
} }
.header-title{ .header-title{
@@ -275,11 +275,11 @@ virtual-scroller{
border-top-left-radius: 5px; border-top-left-radius: 5px;
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
} }
.top-dnd-backing{ //.top-dnd-backing{
position:absolute; // position:absolute;
width: 100%; // width: 100%;
height: 200px; // height: 200px;
} //}
.padding-top{ .padding-top{
padding-top: 2em; padding-top: 2em;
} }
@@ -40,6 +40,7 @@ export class HeaderComponent implements OnInit {
@ViewChild('beatOnModal', { static: false }) beatOnModal; @ViewChild('beatOnModal', { static: false }) beatOnModal;
@ViewChild('mainLogo', { static: false }) mainLogo; @ViewChild('mainLogo', { static: false }) mainLogo;
@ViewChild('safeModal', { static: false }) safeModal; @ViewChild('safeModal', { static: false }) safeModal;
@ViewChild('manageFavs', { static: false }) manageFavs;
ConnectionStatus = ConnectionStatus; ConnectionStatus = ConnectionStatus;
folder = FolderType; folder = FolderType;
isAlive = true; isAlive = true;
@@ -1,4 +1,7 @@
<div class="container text-dark-theme">
<div class="inner-app-container">
<div class="screen-description">Manage settings on your headset.</div>
<div class="divider divider-margin-top margin-bottom"></div>
<div *ngIf="!adbService.isReady" class="diagnostics-inner white-text"> <div *ngIf="!adbService.isReady" class="diagnostics-inner white-text">
<br>You are not currently connected. <br>You are not currently connected.
<br><br> <br><br>
@@ -7,201 +10,192 @@
<ng-container *ngIf="adbService.isReady"> <ng-container *ngIf="adbService.isReady">
<h4 class="section-title">Quality & Performance</h4> <h4 class="section-title">Quality & Performance</h4>
<div class="section-container card z-depth-2"> <div class="section-container card z-depth-2">
<div class="row"> <h5 class="section-title">Set CPU and GPU level</h5>
<div class="col s6"> <h4 class="description-section">
<h5 class="section-title">Set CPU and GPU level</h5> This can improve performance for apps & games at the expense of quicker battery draining and your device may get a little hotter than normal but totally within limits.
<h4 class="description-section"> </h4>
This can improve performance for apps & games at the expense of quicker battery draining and your device may get a little hotter than normal but totally within limits. <p>
</h4> <label>
<p> <input name="cpuGpuLevel" type="radio" value="app-app" [(ngModel)]="cpuGpuLevel" (click)="setGPU(GPU._app)"/>
<label> <span>Set by App ( Default )</span>
<input name="cpuGpuLevel" type="radio" value="app-app" [(ngModel)]="cpuGpuLevel" (click)="setGPU(GPU._app)"/> </label>
<span>Set by App ( Default )</span> </p>
</label> <p>
</p> <label>
<p> <input name="cpuGpuLevel" type="radio" value="2-2" [(ngModel)]="cpuGpuLevel" (click)="setGPU(GPU._2)"/>
<label> <span>Level 2</span>
<input name="cpuGpuLevel" type="radio" value="2-2" [(ngModel)]="cpuGpuLevel" (click)="setGPU(GPU._2)"/> </label>
<span>Level 2</span> </p>
</label> <p>
</p> <label>
<p> <input name="cpuGpuLevel" type="radio" value="4-4" [(ngModel)]="cpuGpuLevel" (click)="setGPU(GPU._4)"/>
<label> <span>Level 4</span>
<input name="cpuGpuLevel" type="radio" value="4-4" [(ngModel)]="cpuGpuLevel" (click)="setGPU(GPU._4)"/> </label>
<span>Level 4</span> </p>
</label> <h5 class="section-title">Default Texture Size</h5>
</p> <div class="description-section">
<h5 class="section-title">Default Texture Size</h5> This will change how high quality some of the in game textures are rendered at.
<div class="description-section">
This will change how high quality some of the in game textures are rendered at.
</div>
<div class="inline margin-right">
<p>
<label>
<input name="textureSize" type="radio" value="1216-1344" [(ngModel)]="textureSize" (click)="setSSO(SSO._Quest1)"/>
<span>Default - Quest 1</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="1440-1584" [(ngModel)]="textureSize" (click)="setSSO(SSO._Quest2)"/>
<span>Default - Quest 2</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="512-563" [(ngModel)]="textureSize" (click)="setSSO(SSO._512)"/>
<span>512</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="768-845" [(ngModel)]="textureSize" (click)="setSSO(SSO._768)"/>
<span>768</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="1024-1127" [(ngModel)]="textureSize" (click)="setSSO(SSO._1024)"/>
<span>1024</span>
</label>
</p>
</div>
<div class="inline">
<p>
<label>
<input name="textureSize" type="radio" value="1280-1408" [(ngModel)]="textureSize" (click)="setSSO(SSO._1280)"/>
<span>1280</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="1536-1690" [(ngModel)]="textureSize" (click)="setSSO(SSO._1536)"/>
<span>1536</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="2048-2253" [(ngModel)]="textureSize" (click)="setSSO(SSO._2048)"/>
<span>2048</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="2560-2816" [(ngModel)]="textureSize" (click)="setSSO(SSO._2560)"/>
<span>2560</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="3072-3380" [(ngModel)]="textureSize" (click)="setSSO(SSO._3072)"/>
<span>3072</span>
</label>
</p>
</div>
<h5 class="section-title">Refresh Rate</h5>
<h4 class="description-section">This will allow you to change to 90Hz refresh rate for 90fps support in games on Quest 2.</h4>
<p>
<label>
<input name="refreshRate" type="radio" value="60" [(ngModel)]="refreshRate" (click)="setRR(RR._60)"/>
<span>60Hz</span>
</label>
</p>
<p>
<label>
<input name="refreshRate" type="radio" value="72" [(ngModel)]="refreshRate" (click)="setRR(RR._72)"/>
<span>72Hz ( Default )</span>
</label>
</p>
<p>
<label>
<input name="refreshRate" type="radio" value="90" [(ngModel)]="refreshRate" (click)="setRR(RR._90)"/>
<span>90Hz</span>
</label>
</p>
<p>
<label>
<input name="refreshRate" type="radio" value="120" [(ngModel)]="refreshRate" (click)="setRR(RR._120)"/>
<span>120Hz</span>
</label>
</p>
</div>
<div class="col s6">
<h5 class="section-title">
Set FFR ( Fixed Foveated Rendering ) level
</h5>
<h4 class="description-section">
This will change how the view is rendered in the outer edges of the viewscreen for each eye. Higher is better
performance, lower is better quality.
</h4>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="0" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.OFF)"/>
<span>Off</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="1" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.LOW)"/>
<span>Low</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="2" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.MEDIUM)"/>
<span>Medium ( Default )</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="3" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.HIGH)"/>
<span>High</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="4" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.HIGH_TOP)"/>
<span>High Top</span>
</label>
</p>
<h5 class="section-title">Chromatic Aberration</h5>
<h4 class="description-section">
This will enable/disable chromatic aberration.
</h4>
<p>
<label>
<input name="chromaticAberration" type="radio" value="1" [(ngModel)]="chromaticAberration" (click)="setCa(CA.ON)"/>
<span>On ( Default )</span>
</label>
</p>
<p>
<label>
<input name="chromaticAberration" type="radio" value="0" [(ngModel)]="chromaticAberration" (click)="setCa(CA.OFF)"/>
<span>Off</span>
</label>
</p>
<p>
<label>
<input name="chromaticAberration" type="radio" value="-1" [(ngModel)]="chromaticAberration" (click)="setCa(CA.APP)"/>
<span>App Selected</span>
</label>
</p>
</div>
</div> </div>
<div class="inline margin-right">
<p>
<label>
<input name="textureSize" type="radio" value="1216-1344" [(ngModel)]="textureSize" (click)="setSSO(SSO._Quest1)"/>
<span>Default - Quest 1</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="1440-1584" [(ngModel)]="textureSize" (click)="setSSO(SSO._Quest2)"/>
<span>Default - Quest 2</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="512-563" [(ngModel)]="textureSize" (click)="setSSO(SSO._512)"/>
<span>512</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="768-845" [(ngModel)]="textureSize" (click)="setSSO(SSO._768)"/>
<span>768</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="1024-1127" [(ngModel)]="textureSize" (click)="setSSO(SSO._1024)"/>
<span>1024</span>
</label>
</p>
</div>
<div class="inline">
<p>
<label>
<input name="textureSize" type="radio" value="1280-1408" [(ngModel)]="textureSize" (click)="setSSO(SSO._1280)"/>
<span>1280</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="1536-1690" [(ngModel)]="textureSize" (click)="setSSO(SSO._1536)"/>
<span>1536</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="2048-2253" [(ngModel)]="textureSize" (click)="setSSO(SSO._2048)"/>
<span>2048</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="2560-2816" [(ngModel)]="textureSize" (click)="setSSO(SSO._2560)"/>
<span>2560</span>
</label>
</p>
<p>
<label>
<input name="textureSize" type="radio" value="3072-3380" [(ngModel)]="textureSize" (click)="setSSO(SSO._3072)"/>
<span>3072</span>
</label>
</p>
</div>
<h5 class="section-title">Refresh Rate</h5>
<h4 class="description-section">This will allow you to change to 90Hz refresh rate for 90fps support in games on Quest 2.</h4>
<p>
<label>
<input name="refreshRate" type="radio" value="60" [(ngModel)]="refreshRate" (click)="setRR(RR._60)"/>
<span>60Hz</span>
</label>
</p>
<p>
<label>
<input name="refreshRate" type="radio" value="72" [(ngModel)]="refreshRate" (click)="setRR(RR._72)"/>
<span>72Hz ( Default )</span>
</label>
</p>
<p>
<label>
<input name="refreshRate" type="radio" value="90" [(ngModel)]="refreshRate" (click)="setRR(RR._90)"/>
<span>90Hz</span>
</label>
</p>
<p>
<label>
<input name="refreshRate" type="radio" value="120" [(ngModel)]="refreshRate" (click)="setRR(RR._120)"/>
<span>120Hz</span>
</label>
</p>
<h5 class="section-title">
Set FFR ( Fixed Foveated Rendering ) level
</h5>
<h4 class="description-section">
This will change how the view is rendered in the outer edges of the viewscreen for each eye. Higher is better
performance, lower is better quality.
</h4>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="0" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.OFF)"/>
<span>Off</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="1" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.LOW)"/>
<span>Low</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="2" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.MEDIUM)"/>
<span>Medium ( Default )</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="3" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.HIGH)"/>
<span>High</span>
</label>
</p>
<p>
<label>
<input name="fixedFoveatedRendering" type="radio" value="4" [(ngModel)]="fixedFoveatedRendering" (click)="setFFR(FFR.HIGH_TOP)"/>
<span>High Top</span>
</label>
</p>
<h5 class="section-title">Chromatic Aberration</h5>
<h4 class="description-section">
This will enable/disable chromatic aberration.
</h4>
<p>
<label>
<input name="chromaticAberration" type="radio" value="1" [(ngModel)]="chromaticAberration" (click)="setCa(CA.ON)"/>
<span>On ( Default )</span>
</label>
</p>
<p>
<label>
<input name="chromaticAberration" type="radio" value="0" [(ngModel)]="chromaticAberration" (click)="setCa(CA.OFF)"/>
<span>Off</span>
</label>
</p>
<p>
<label>
<input name="chromaticAberration" type="radio" value="-1" [(ngModel)]="chromaticAberration" (click)="setCa(CA.APP)"/>
<span>App Selected</span>
</label>
</p>
</div> </div>
<h4 class="section-title">Streaming & Video</h4> <h4 class="section-title">Streaming & Video</h4>
<div class="section-container card z-depth-2"> <div class="section-container card z-depth-2">
<div class="row">
<div class="col s6">
<h5 class="section-title">Tetiana's Presets</h5> <h5 class="section-title">Tetiana's Presets</h5>
<h4 class="description-section"> <h4 class="description-section">
@@ -248,20 +242,18 @@
</label> </label>
</p> </p>
<!-- <h5 class="section-title">Full Rate Capture</h5>--> <!-- <h5 class="section-title">Full Rate Capture</h5>-->
<!-- <h4 class="description-section">--> <!-- <h4 class="description-section">-->
<!-- This will enable/disable the full rate capture for videos recorded i.e. 60/72fps rather than 30fps.--> <!-- This will enable/disable the full rate capture for videos recorded i.e. 60/72fps rather than 30fps.-->
<!-- </h4>--> <!-- </h4>-->
<!-- <div class="switch">--> <!-- <div class="switch">-->
<!-- <label>--> <!-- <label>-->
<!-- Off--> <!-- Off-->
<!-- <input type="checkbox" class="disable-reviews" [checked]="fullRateCaptureEnabled" (click)="fullRateCaptureEnabled ? setFullRate(GU.OFF) : setFullRate(GU.ON)">--> <!-- <input type="checkbox" class="disable-reviews" [checked]="fullRateCaptureEnabled" (click)="fullRateCaptureEnabled ? setFullRate(GU.OFF) : setFullRate(GU.ON)">-->
<!-- <span class="lever disable-reviews-switch"></span>--> <!-- <span class="lever disable-reviews-switch"></span>-->
<!-- On--> <!-- On-->
<!-- </label>--> <!-- </label>-->
<!-- </div>--> <!-- </div>-->
</div>
<div class="col s6">
<h5 class="section-title">Video Capture FPS</h5> <h5 class="section-title">Video Capture FPS</h5>
@@ -317,8 +309,6 @@
<span>20mbps</span> <span>20mbps</span>
</label> </label>
</p> </p>
</div>
</div>
</div> </div>
<h4 class="section-title">Experimental & Miscellaneous </h4> <h4 class="section-title">Experimental & Miscellaneous </h4>
<div class="section-container card z-depth-2"> <div class="section-container card z-depth-2">
@@ -104,7 +104,7 @@ export class HeadsetSettingsComponent implements OnInit {
constructor(public adbService: AdbClientService, public appService: AppService, private statusService: StatusBarService) { constructor(public adbService: AdbClientService, public appService: AppService, private statusService: StatusBarService) {
this.appService.resetTop(); this.appService.resetTop();
appService.webService.isWebviewOpen = false; appService.webService.isWebviewOpen = false;
appService.isSettingsOpen = true; // appService.isSettingsOpen = true;
} }
async ngOnInit() { async ngOnInit() {
@@ -1,5 +1,5 @@
<div class="col s10 package-height chip-padding package-item"> <div class="col s10 package-height chip-padding package-item">
<span class="chip"><img *ngIf="package.icon" [src]="package.icon">{{package.name?package.name:package.packageName}}</span> <div *ngIf="package.icon" [style.background-image]="'url(' + package.icon + ')'" class="app-icon circle"></div><span class="app-name">{{package.name?package.name:package.packageName}}</span>
</div> </div>
<div class="col s2 package-height centered package-item"> <div class="col s2 package-height centered package-item">
<i class="material-icons cursor grey-text settings" (click)="openSettings()">settings</i> <i class="material-icons cursor grey-text settings" (click)="openSettings()">settings</i>
@@ -9,5 +9,17 @@
float: right; float: right;
} }
.chip-padding { .chip-padding {
padding-top: 3px !important; padding-top: 5px !important;
}
.app-icon{
width: 25px;
height: 25px;
margin-right: 10px;
background-size: cover;
background-position: center center;
display: inline-block;
vertical-align: middle;
}
.app-name{
vertical-align: middle;
} }
@@ -1,34 +1,42 @@
<div class="container"> <div class="inner-app-container">
<div class="screen-description">Manage settings on your headset.</div>
<div class="input-field right no-margin search-width">
<input id="SearchPackage" [(ngModel)]="search" type="text" class="no-margin" />
<label for="SearchPackage">Search apps...</label>
</div>
<div class="switch right margin-right margin-top">
<label>
Hide System Apps
<input type="checkbox" [(ngModel)]="hide_system_apps" (change)="setShowAll()" />
<span class="lever"></span>
</label>
</div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom"
tooltip="Trigger cloud backup for your apps." (click)="cloudBackup.openModal()">
Cloud Backup
</div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom"
tooltip="Bulk backup or restore your apps." (click)="backupEverything.openModal()">
Backup/Restore All
</div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom"
[tooltip]="'Current backup location: ' + appService.backupPath" (click)="pickLocation.openModal()">
Change Backup Location
</div>
<div class="divider divider-margin-top"></div>
<div *ngIf="!isConnected()" class="white-text"> <div *ngIf="!isConnected()" class="white-text">
<br>You are not currently connected. <br>You are not currently connected.
<br><br> <br><br>
<div class="pure-material-button-contained" routerLink="/setup">Open Setup Instructions</div> <div class="pure-material-button-contained" routerLink="/setup">Open Setup Instructions</div>
</div> </div>
<div *ngIf="isConnected()"> <div *ngIf="isConnected()">
<div class="row">
<div class="input-field col s9"> <div *ngIf="search && search.length && !totalApps" class="no-tasks">
<input id="SearchPackage" [(ngModel)]="search" type="text" /> No results found...
<label for="SearchPackage">Search package</label> <!-- <div class="pure-material-button-contained" routerLink="/">Back Home</div>-->
</div>
<div class="col s3 right-align show-all">
<div class="switch">
<label>
<input type="checkbox" [(ngModel)]="show_all" (change)="setShowAll()" />
<span class="lever"></span>
Show All
</label>
</div>
</div>
</div> </div>
<div class="right waves-effect waves-light btn pink-button small-button" (click)="cloudBackup.openModal()">
Cloud Backup</div>
<div class="right waves-effect waves-light btn pink-button small-button margin-right" (click)="backupEverything.openModal()">
Backup/Restore All</div>
<div class="right waves-effect waves-light btn pink-button small-button margin-right" mzTooltip
[tooltip]="'Current backup location: ' + appService.backupPath" position="bottom"
(click)="pickLocation.openModal()">Change Backup Location</div>
<br><br>
<div class="row"> <div class="row">
<ng-container *ngFor="let package of myApps;"> <ng-container *ngFor="let package of myApps;">
<app-package-item *ngIf="!search <app-package-item *ngIf="!search
@@ -131,7 +139,9 @@
</mz-modal-content> </mz-modal-content>
<mz-modal-footer> <mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close>Close</button> <div class="pure-material-button-contained spaced flat active" (click)="appSettingsModal.closeModal()">
Done
</div>
</mz-modal-footer> </mz-modal-footer>
</mz-modal> </mz-modal>
@@ -140,8 +150,12 @@
<mz-modal #backupEverything [fixedFooter]="true"> <mz-modal #backupEverything [fixedFooter]="true">
<mz-modal-header> <mz-modal-header>
<h4> <h4>
<div class="right waves-effect waves-light btn pink-button small-button"
(click)="isBackingUp = !isBackingUp;getMyBackups()">{{isBackingUp?'Change To Restore':'Change To Backup'}}</div> <div class="pure-material-button-contained spaced active right" (click)="isBackingUp = !isBackingUp;getMyBackups()">
{{isBackingUp?'Change To Restore':'Change To Backup'}}
</div>
<!-- <div class="right waves-effect waves-light btn pink-button small-button"-->
<!-- (click)="isBackingUp = !isBackingUp;getMyBackups()">{{isBackingUp?'Change To Restore':'Change To Backup'}}</div>-->
{{isBackingUp?'Backup':'Restore'}} Everything {{isBackingUp?'Backup':'Restore'}} Everything
</h4> </h4>
</mz-modal-header> </mz-modal-header>
@@ -151,9 +165,16 @@
This process can take a long time to complete, please do not restart SideQuest while the operation is running. This process can take a long time to complete, please do not restart SideQuest while the operation is running.
Select which apps you want to backup/restore: Select which apps you want to backup/restore:
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="waves-effect right waves-light btn pink-button small-button" (click)="selectAll()">Select All</div>
<div class="waves-effect right waves-light btn pink-button small-button margin-right" (click)="deSelectAll()"> <div class="pure-material-button-contained spaced active right" (click)="selectAll()">
Deselect All</div> Select All
</div>
<div class="pure-material-button-contained spaced active right" (click)="deSelectAll()">
Deselect All
</div>
<!-- <div class="waves-effect right waves-light btn pink-button small-button" (click)="selectAll()">Select All</div>-->
<!-- <div class="waves-effect right waves-light btn pink-button small-button margin-right" (click)="deSelectAll()">-->
<!-- Deselect All</div>-->
<div class="clearfix"></div><br> <div class="clearfix"></div><br>
<ng-container *ngIf="!isBackingUp"> <ng-container *ngIf="!isBackingUp">
@@ -191,9 +212,13 @@
</ng-container> </ng-container>
</mz-modal-content> </mz-modal-content>
<mz-modal-footer> <mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close>Close</button>
<button mz-button class="pink-button" <div class="pure-material-button-contained spaced flat active" (click)="backupEverything.closeModal()">
(click)="(isBackingUp?backupAll():restoreAll()); backupEverything.closeModal()">{{isBackingUp?'Run Backup':'Run Restore'}}</button> Done
</div>
<div class="pure-material-button-contained spaced active" (click)="(isBackingUp?backupAll():restoreAll()); backupEverything.closeModal()">
{{isBackingUp?'Run Backup':'Run Restore'}}
</div>
</mz-modal-footer> </mz-modal-footer>
</mz-modal> </mz-modal>
@@ -207,11 +232,17 @@
<ng-container *ngIf="!cloudBackupLoading&&!cloudBackupDone"> <ng-container *ngIf="!cloudBackupLoading&&!cloudBackupDone">
Trigger apps on your headset to run a cloud backup now in-case you want to do a factory reset.<br><br> Trigger apps on your headset to run a cloud backup now in-case you want to do a factory reset.<br><br>
WARNING: Not all apps support cloud backup - this is not guaranteed to work for all apps.<br><br> WARNING: Not all apps support cloud backup - this is not guaranteed to work for all apps.<br><br>
<button mz-button class="pink-button" (click)="triggerCloudBackup()">Trigger Cloud Backup</button><br><br>
<div class="pure-material-button-contained spaced active" (click)="triggerCloudBackup()">
Trigger Cloud Backup
</div><br><br>
</ng-container> </ng-container>
<ng-container *ngIf="!cloudBackupLoading&&cloudBackupDone"> <ng-container *ngIf="!cloudBackupLoading&&cloudBackupDone">
Cloud backup complete. <br><br>Check cloud backup status here: https://secure.oculus.com/my/cloud-backup/<br><br> Cloud backup complete. <br><br>Check cloud backup status here: https://secure.oculus.com/my/cloud-backup/<br><br>
<button mz-button class="pink-button" (click)="appService.opn('https://secure.oculus.com/my/cloud-backup/')">View On Oculus</button><br><br>
<div class="pure-material-button-contained spaced active" (click)="appService.opn('https://secure.oculus.com/my/cloud-backup/')">
View On Oculus
</div><br><br>
</ng-container> </ng-container>
<ng-container *ngIf="cloudBackupLoading"> <ng-container *ngIf="cloudBackupLoading">
{{cloudBackupStatus}}<br><br> {{cloudBackupStatus}}<br><br>
@@ -220,7 +251,10 @@
</div> </div>
</mz-modal-content> </mz-modal-content>
<mz-modal-footer> <mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close>Done</button>
<div class="pure-material-button-contained spaced flat active" (click)="cloudBackup.closeModal()">
Done
</div>
</mz-modal-footer> </mz-modal-footer>
</mz-modal> </mz-modal>
@@ -232,11 +266,17 @@
<mz-modal-content> <mz-modal-content>
<ng-container> <ng-container>
Pick a location on your PC to save backup files:<br><br> Pick a location on your PC to save backup files:<br><br>
<button mz-button class="pink-button" (click)="pickBackupLocation()">Select Location</button><br><br>
<div class="pure-material-button-contained spaced active" (click)="pickBackupLocation()">
Select Location
</div><br>
Current Location: {{appService.backupPath}} Current Location: {{appService.backupPath}}
</ng-container> </ng-container>
</mz-modal-content> </mz-modal-content>
<mz-modal-footer> <mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close>Done</button>
<div class="pure-material-button-contained spaced flat active" (click)="pickLocation.closeModal()">
Done
</div>
</mz-modal-footer> </mz-modal-footer>
</mz-modal> </mz-modal>
@@ -19,3 +19,6 @@
.backup-name{ .backup-name{
line-height: 30px; line-height: 30px;
} }
.search-width{
min-width: 300px;
}
@@ -25,7 +25,7 @@ export class PackagesComponent implements OnInit {
isBackingUp = true; isBackingUp = true;
isOpen: boolean; isOpen: boolean;
sub: Subscription; sub: Subscription;
show_all: boolean; hide_system_apps = true;
search: string; search: string;
savePath: string; savePath: string;
perms: any; perms: any;
@@ -43,21 +43,32 @@ export class PackagesComponent implements OnInit {
) { ) {
appService.webService.isWebviewOpen = false; appService.webService.isWebviewOpen = false;
appService.resetTop(); appService.resetTop();
appService.isPackagesOpen = true; // appService.isPackagesOpen = true;
this.appService.setTitle('Installed Apps'); // this.appService.setTitle('Installed Apps');
this.sub = router.events.subscribe(val => { this.sub = router.events.subscribe(val => {
if (val instanceof NavigationEnd) { if (val instanceof NavigationEnd) {
this.routerPackage = route.snapshot.paramMap.get('packageName'); this.routerPackage = route.snapshot.paramMap.get('packageName');
} }
}); });
this.show_all = !!localStorage.getItem('packages_show_all'); let hide_system_apps = localStorage.getItem('hide_system_apps');
this.hide_system_apps = !hide_system_apps || hide_system_apps === 'true';
this.setShowAll();
}
get totalApps() {
return this.myApps.filter(p => {
return (
(p.name && p.name.toLowerCase().indexOf(this.search.toLowerCase())) > -1 ||
p.packageName.toLowerCase().indexOf(this.search.toLowerCase()) > -1
);
}).length;
} }
setShowAll() { setShowAll() {
if (this.show_all) { if (this.hide_system_apps) {
localStorage.setItem('packages_show_all', 'true'); localStorage.setItem('hide_system_apps', 'true');
} else { } else {
localStorage.removeItem('packages_show_all'); localStorage.setItem('hide_system_apps', 'false');
} }
this.isOpen = false; this.isOpen = false;
} }
@@ -137,7 +148,8 @@ export class PackagesComponent implements OnInit {
if (isConnected && !this.isOpen) { if (isConnected && !this.isOpen) {
this.isOpen = true; this.isOpen = true;
this.adbService this.adbService
.getPackages(this.show_all) .getPackages(!this.hide_system_apps)
.then(() => this.packageService.getAppIndex())
.then(() => { .then(() => {
this.myApps = this.adbService.devicePackages this.myApps = this.adbService.devicePackages
.map(p => { .map(p => {
@@ -1,22 +1,52 @@
<div class="container text-dark-theme relative"> <div class="relative">
<!--<div class="description-section" i18n>--> <div class="tab" [ngClass]="{'active': !isSupport}" (click)="isSupport = false">Setup Instructions</div>
<!-- You need to do a one time setup of your quest the first time and usually not again after that. It is a 3 step process and it takes about 2-3 minutes to complete.--> <div class="tab" [ngClass]="{'active': isSupport}" (click)="isSupport = true">Support Options</div>
<!--</div>--> <!-- <div class="tab-underline"></div>-->
</div>
<button class="pure-material-button-contained flat" [ngClass]="{'active': page === 1}" (click)="page = 1">Step 1: Create Org</button> > <div class="inner-app-container text-dark-theme relative margin-top" *ngIf="isSupport">
<button class="pure-material-button-contained flat" [ngClass]="{'active': page === 2}" (click)="page = 2">Step 2: Dev Mode</button> > <app-connection-status #connectionStatus></app-connection-status>
<button class="pure-material-button-contained flat clearfix" [ngClass]="{'active': page === 3}" (click)="page = 3">Step 3: Connect</button> <div class="setup-container">
<div class="screen-description">Get help and support from SideQuest.</div>
<div class="divider divider-margin-top margin-bottom"></div>
<div class="hint-text">
<div class="pure-material-button-contained button-margin-bottom" (click)="connectionStatus.helpOpen = true">Fix It For Me</div>
<p>We have many solutions baked in to help you solve the most common problems. This is the best option becuase this info will always be the most up to date.</p><br>
<br><br>
<div class="pure-material-button-contained button-margin-bottom" (click)="appService.opn('https://sdq.st/support')">Open Support Community</div>
<p>If you are still having trouble then please visit our support community on SideQuest.</p><br>
<br><br>
<div *ngIf="adb.diagnostics.usb && adb.diagnostics.usb.log" class="pure-material-button-contained button-margin-bottom" (click)="uploadLogs();">{{'Upload Logs'}}</div>
<p *ngIf="adb.diagnostics.usb && adb.diagnostics.usb.log">If instructed to upload logs by a SideQuest support person, please click this button.</p><br>
<div *ngIf="link">
Copy and paste this link into your support request:
<h3>{{link}}</h3>
<div class="pure-material-button-contained button-margin-bottom" (click)="copyToClipboard()">Copy to Clipboard</div>
</div>
<div id="thankYou">
<ng-container *ngIf="link">Thank you!</ng-container>
</div>
</div>
</div>
</div>
<div class="inner-app-container text-dark-theme relative margin-top" *ngIf="!isSupport">
<div class="pure-material-button-contained flat" [ngClass]="{'active': page === 1}" (click)="page = 1">Step 1: Create Org</div> >
<div class="pure-material-button-contained flat" [ngClass]="{'active': page === 2}" (click)="page = 2">Step 2: Dev Mode</div> >
<div class="pure-material-button-contained flat clearfix" [ngClass]="{'active': page === 3}" (click)="page = 3">Step 3: Connect</div>
<app-connection-status (backHome)="backHome.emit()"></app-connection-status> <app-connection-status (backHome)="backHome.emit()"></app-connection-status>
<div class="setup-container"> <div class="setup-container">
<button class="pure-material-button-contained tiny slim left-arrow" [disabled]="page < 2" (click)="page < 2 ? page = 1 : page = page - 1;"> <div class="pure-material-button-contained tiny slim left-arrow" *ngIf="page > 1" (click)="page < 2 ? page = 1 : page = page - 1;">
<img src="assets/images/back_arrow.svg"/> <img src="assets/images/back_arrow.svg"/>
</button> </div>
<button class="pure-material-button-contained tiny slim right-arrow" [disabled]="page > 2" (click)="page > 2 ? page = 3 : page = page + 1;"> <div class="pure-material-button-contained tiny slim right-arrow" *ngIf="page < 3" (click)="page > 2 ? page = 3 : page = page + 1;">
<img class="flip-horizontal" src="assets/images/back_arrow.svg"/> <img class="flip-horizontal" src="assets/images/back_arrow.svg"/>
</button> </div>
<ng-container *ngIf="page === 1"> <ng-container *ngIf="page === 1">
<video class="setup-image" #createOrganisation autoplay="true" loop="true" controls="false" src="https://sidequestvr.com/assets/videos/create_organisation.mp4" (error)="videoError(createOrganisation, $event, 'assets/setup/create_organisation.mp4')"></video> <div class="setup-image-container">
<video class="setup-image" #createOrganisation autoplay="true" loop="true" controls="false" src="https://sidequestvr.com/assets/videos/create_organisation.mp4" (error)="videoError(createOrganisation, $event, 'assets/setup/create_organisation.mp4')"></video>
</div>
<h3 i18n> <h3 i18n>
Step 1: Meta Website - Create Organisation Step 1: Meta Website - Create Organisation
</h3> </h3>
@@ -25,7 +55,7 @@
To allow installing apps & games to your headset we need to enable developer mode. To do this, To allow installing apps & games to your headset we need to enable developer mode. To do this,
you have to be a registered "developer" on the Meta website, it's free, quick and easy. Open you have to be a registered "developer" on the Meta website, it's free, quick and easy. Open
</ng-container> </ng-container>
<a class="diagnosticator" (click)="open('https://dashboard.oculus.com')">dashboard.oculus.com</a> <a class="diagnosticator" (click)="open('https://developer.oculus.com/sign-up/ ')">developer.oculus.com/sign-up/</a>
<ng-container i18n> <ng-container i18n>
and create an 'organization'. and create an 'organization'.
You'll need to accept the developer agreement and to verify your account using either a credit card You'll need to accept the developer agreement and to verify your account using either a credit card
@@ -34,8 +64,10 @@
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="page === 2"> <ng-container *ngIf="page === 2">
<video class="setup-image tall" #enableDevMode autoplay="true" loop="true" controls="false" src="https://sidequestvr.com/assets/videos/enable_dev_mode.mp4" (error)="videoError(enableDevMode, $event, 'assets/setup/enable_dev_mode.mp4')" (click)="open('https://sidequestvr.com/assets/images/get-sidequest/verify.png')"></video> <div class="setup-image-container">
<h3 i18n> <video class="setup-image tall" #enableDevMode autoplay="true" loop="true" controls="false" src="https://sidequestvr.com/assets/videos/enable_dev_mode.mp4" (error)="videoError(enableDevMode, $event, 'assets/setup/enable_dev_mode.mp4')" (click)="open('https://sidequestvr.com/assets/images/get-sidequest/verify.png')"></video>
</div>
<h3 i18n>
Step 2: Enable Developer Mode and Reboot Step 2: Enable Developer Mode and Reboot
</h3> </h3>
<div class="description-section" i18n> <div class="description-section" i18n>
@@ -46,8 +78,10 @@
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="page === 3"> <ng-container *ngIf="page === 3">
<video class="setup-image" #connectAccept autoplay="true" loop="true" controls="false" src="https://sidequestvr.com/assets/videos/connect_accept.mp4" (error)="videoError(connectAccept, $event, 'assets/setup/connect_accept.mp4')"></video> <div class="setup-image-container">
<h3 i18n> <video class="setup-image" #connectAccept autoplay="true" loop="true" controls="false" src="https://sidequestvr.com/assets/videos/connect_accept.mp4" (error)="videoError(connectAccept, $event, 'assets/setup/connect_accept.mp4')"></video>
</div>
<h3 i18n>
Step 3: Connect USB Cable and Allow USB Debugging Step 3: Connect USB Cable and Allow USB Debugging
</h3> </h3>
<div class="description-section" i18n> <div class="description-section" i18n>
@@ -1,11 +1,10 @@
.setup-image { .setup-image {
width: 100%; width: 100%;
max-width: 600px; max-height: 450px;
cursor: pointer; cursor: pointer;
margin: 10px auto; margin: 10px auto;
margin-bottom: 2px; margin-bottom: 2px;
display: block; display: block;
} }
.setup-image.tall{ .setup-image.tall{
max-width: 280px; max-width: 280px;
@@ -16,14 +15,14 @@
margin-left: 1em; margin-left: 1em;
} }
.setup-container{ .setup-container{
width: calc(100% - 250px); width: calc(100% - 550px);
padding-right: 20px; padding-right: 20px;
padding-bottom: 20px; padding-bottom: 20px;
position: relative; position: relative;
} }
.left-arrow, .right-arrow{ .left-arrow, .right-arrow{
position: absolute; position: absolute;
top: 150px; top: 220px;
left: 5px; left: 5px;
z-index: 10; z-index: 10;
} }
@@ -35,3 +34,43 @@
.flip-horizontal{ .flip-horizontal{
transform: scaleX(-1); transform: scaleX(-1);
} }
.tab{
text-align: center;
padding: 10px;
width:50%;
display: inline-block;
height: 60px;
line-height: 40px;
color: white;
background: #24284E;
cursor: pointer;
}
.tab.active{
background: #7289DA;
}
.tab-underline{
border: 1px solid #CFCFCF;
}
.description-section{
max-width: 1024px;
}
.setup-image-container{
background: #000000;
margin-top: 20px;
}
@media only screen and (max-width: 1448px){
.setup-container {
width: calc(100% - 450px);
}
}
@media only screen and (max-width: 1279px){
.setup-container {
width: calc(100% - 350px);
}
}
@@ -12,10 +12,12 @@ export class SetupGuideComponent implements OnInit {
@Output() close = new EventEmitter(); @Output() close = new EventEmitter();
@Output() backHome = new EventEmitter(); @Output() backHome = new EventEmitter();
page = 1; page = 1;
constructor(public adb: AdbClientService, appService: AppService) { isSupport: boolean;
link;
logFailed: boolean;
constructor(public adb: AdbClientService, public appService: AppService) {
appService.resetTop(); appService.resetTop();
appService.webService.isWebviewOpen = false; appService.webService.isWebviewOpen = false;
appService.isSetupOpen = true;
} }
ngOnInit() {} ngOnInit() {}
@@ -30,4 +32,42 @@ export class SetupGuideComponent implements OnInit {
ele.play(); ele.play();
} }
} }
copyToClipboard() {
this.adb.copyToClipboard(this.link);
// this.toast.show('Copied to clipboard: ' + this.link);
}
async uploadLogs() {
let link = null;
const data = {
code: JSON.stringify(this.adb.diagnostics.usb.log),
expireUnit: 'month',
syntax: 'JSON',
title: 'SideQuest Log: ' + new Date().getTime(),
};
const formData = Object.keys(data)
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(data[key]))
.join('&');
try {
const ftch = (window as any).require('node-fetch');
const resp = await ftch('https://api.teknik.io/v1/Paste', {
body: formData,
method: 'POST',
headers: {
Authorization: 'AuthToken w8pvsx5z73d94cmpz1e8kh31jgpeechf6yp11dpy',
'Content-Type': 'application/x-www-form-urlencoded',
},
});
link = (await resp.json()).result.url;
this.link = link;
// this.toast.show('Logs Uploaded! Copy the Url to your support ticket.');
// this.scrollTo('thankYou');
} catch (e) {
console.log(e);
alert('Unable to upload logs, please try again later.');
}
// this.telemetry.telemetry({ event: 'log-upload', logData: this.adb.diagnostics.usb.log, logLink: link });
}
} }
@@ -0,0 +1,111 @@
<div class="inner-app-container">
<div class="screen-description">Stream your headset to your PC. Put your headset on before clicking Start Stream.</div>
<div class="pure-material-button-contained spaced" (click)="runscrcpy()">Start Stream</div>
<div class="pure-material-button-contained spaced" (click)="appService.opn('https://www.oculus.com/casting')">Oculus Casting</div>
<div class="divider divider-margin-top margin-bottom"></div>
<div class="row">
<div class="col s12 fixed-height">
Always On Top
<div class="grey-text small">
Make scrcpy window always on top (above other windows).
</div>
</div>
<div class="col s12 fixed-height">
<div class="switch">
<label>
Off
<input type="checkbox" [(ngModel)]="scrcpy_options.always_on_top" />
<span class="lever"></span>
On
</label>
</div>
</div>
<div class="col s12 fixed-height">
Bit Rate
<div class="grey-text small">
Encode the video at the given bit-rate, expressed in bits/s. Unit suffixes are supported: 'K' (x1000) and 'M'
(x1000000).
</div>
</div>
<div class="col s12 input-field fixed-height">
<input id="bit_rate_" [(ngModel)]="scrcpy_options.bit_rate" type="text" />
<label for="bit_rate_" class="active">Bit Rate</label>
</div>
<div class="col s12 fixed-height">
Crop
<div class="grey-text small">
Crop the device screen on the server. The values are expressed in the device natural orientation (typically,
portrait for a phone, landscape for a tablet). Any MaxSize value is computed on the cropped size.
</div>
</div>
<div class="col s12 input-field fixed-height">
<input id="crop_" [(ngModel)]="scrcpy_options.crop" type="text" />
<label for="crop_" class="active">Crop</label>
<div class="pure-material-button-contained spaced flat active" (click)="scrcpy_options.crop = '1280:720:1500:350'">Quest 1 Crop</div>
<div class="pure-material-button-contained spaced flat active" (click)="scrcpy_options.crop = '1600:900:2017:510'">Quest 2 Crop</div>
</div>
<div class="col s12 fixed-height">
Fullscreen
<div class="grey-text small">
Start in fullscreen.
</div>
</div>
<div class="col s12 fixed-height">
<div class="switch">
<label>
Off
<input type="checkbox" [(ngModel)]="scrcpy_options.fullscreen" />
<span class="lever"></span>
On
</label>
</div>
</div>
<div class="col s12 fixed-height">
No Input
<div class="grey-text small">
Disable device control (mirror the device in read-only).
</div>
</div>
<div class="col s12 fixed-height">
<div class="switch">
<label>
Off
<input type="checkbox" [(ngModel)]="scrcpy_options.no_control" />
<span class="lever"></span>
On
</label>
</div>
</div>
<div class="col s12 fixed-height">
Max FPS
<div class="grey-text small">
Limit the frame rate of screen capture. 0 is unlimited.
</div>
</div>
<div class="col s12 input-field fixed-height">
<input id="max_fps_" [(ngModel)]="scrcpy_options.max_fps" type="text" />
<label for="max_fps_" class="active">Max FPS</label>
</div>
<div class="col s12 fixed-height">
Max Size
<div class="grey-text small">
Limit both the width and height of the video to value. The other dimension is computed so that the device
aspect-ratio is preserved. 0 is unlimited.
</div>
</div>
<div class="col s12 input-field fixed-height">
<input id="max_size_" [(ngModel)]="scrcpy_options.max_size" type="text" />
<label for="max_size_" class="active">Max Size</label>
</div>
<div class="col s12" *ngIf="osPlatform === 'darwin'">
To use ScrCpy on mac you will need to install Homebrew and then install scrcpy with <span class="chip">brew install scrcpy</span>
<br><br>
</div>
<div class="col s12" *ngIf="osPlatform === 'linux'">
To use ScrCpy on Linux you will need to install snap package manager with <span class="chip">sudo snap install scrcpy</span>
</div>
</div>
</div>
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { StreamOptionsComponent } from './stream-options.component';
describe('StreamOptionsComponent', () => {
let component: StreamOptionsComponent;
let fixture: ComponentFixture<StreamOptionsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [StreamOptionsComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(StreamOptionsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,36 @@
import { Component, OnInit } from '@angular/core';
import { AppService } from '../app.service';
import { AdbClientService } from '../adb-client.service';
@Component({
selector: 'app-stream-options',
templateUrl: './stream-options.component.html',
styleUrls: ['./stream-options.component.scss'],
})
export class StreamOptionsComponent implements OnInit {
scrcpy_options: any = {
always_on_top: false,
bit_rate: '8000000',
crop: '1280:720:1500:350',
no_control: true,
fullscreen: false,
max_size: '0',
max_fps: '0',
device: '',
};
osPlatform: string;
constructor(private appService: AppService, private adbService: AdbClientService) {
appService.webService.isWebviewOpen = false;
appService.resetTop();
this.osPlatform = this.appService.os.platform();
}
ngOnInit() {}
runscrcpy() {
this.scrcpy_options.device = this.adbService.deviceSerial;
this.appService.runScrCpy(this.scrcpy_options);
// .then(() => this.statusService.showStatus('Stream closed.'))
// .catch(e => this.statusService.showStatus('ScrCpy Error: ' + JSON.stringify(e), true));
}
}
@@ -0,0 +1,25 @@
<div class="inner-app-container">
<div *ngIf="!isConnected()">
<br>You are not currently connected.
<br><br>
<div class="pure-material-button-contained" routerLink="/setup">Open Setup Instructions</div>
</div>
<div *ngIf="isConnected()">
<div class="screen-description">Enable wifi mode to install apps wirelessly. You must be connected with USB to enable wifi mode.</div>
<div class="pure-material-button-contained spaced" (click)="connectWifi()">Connect</div>
<div class="pure-material-button-contained spaced flat active" (click)="reset()">Reset</div>
<div class="divider divider-margin-top margin-bottom"></div>
<div class="screen-description">After you connect you will see an arrow appear in the top left, at that point you can disconnect the usb cable.</div>
<div class="">
<i class="material-icons large" [ngClass]="{'green-text':adbService.wifiEnabled}">
wifi
</i>
</div>
<div class="screen-description">Device IP: {{adbService.deviceIp}}</div>
</div>
</div>
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WirelessConnectionComponent } from './wireless-connection.component';
describe('WirelessConnectionComponent', () => {
let component: WirelessConnectionComponent;
let fixture: ComponentFixture<WirelessConnectionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [WirelessConnectionComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WirelessConnectionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,39 @@
import { Component, OnInit } from '@angular/core';
import { AdbClientService, ConnectionStatus } from '../adb-client.service';
import { AppService } from '../app.service';
@Component({
selector: 'app-wireless-connection',
templateUrl: './wireless-connection.component.html',
styleUrls: ['./wireless-connection.component.scss'],
})
export class WirelessConnectionComponent implements OnInit {
constructor(public adbService: AdbClientService, appService: AppService) {
appService.webService.isWebviewOpen = false;
appService.resetTop();
}
ngOnInit() {}
connectWifi() {
this.adbService.deviceStatusMessage = 'Attempting wifi connection...';
((this.adbService.isReady ? this.adbService.runAdbCommand('adb tcpip 5555') : Promise.resolve()) as any).then(() => {
setTimeout(() => {
this.adbService.runAdbCommand('adb connect ' + this.adbService.deviceIp + ':5555');
}, 3000);
});
}
reset() {
this.adbService.runAdbCommand('adb disconnect');
}
isConnected() {
const isConnected = this.adbService.deviceStatus === ConnectionStatus.CONNECTED;
// if (isConnected && !this.isOpen) {
// this.isOpen = true;
// this.open('/sdcard/');
// }
return isConnected;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

+55 -7
View File
@@ -8,9 +8,21 @@ body {
background:#12152d; background:#12152d;
} }
body{ body{
overflow-x: hidden; overflow-x: hidden;
} }
.loader-tiny {
border: 2px solid #f3f3f3; /* Light grey */
border-top: 2px solid #E51253; /* Pink */
border-radius: 50%;
width: 14px;
height: 14px;
animation: spin 2s linear infinite;
display: inline-block;
}
@keyframes spin { @keyframes spin {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg);
@@ -213,14 +225,50 @@ code > pre, .code{
.modal-fixed-footer{ .modal-fixed-footer{
overflow: hidden!important; overflow: hidden!important;
} }
.screen-description{
font-size: 20px;
line-height: 23px;
color: white;
margin-top: 27px;
margin-bottom: 27px;
}
.divider-margin-top{
margin-top: 25px;
}
.pointer{
cursor: pointer;
}
.inner-app-container{
padding-left: 80px;
padding-right: 80px;
color: white;
}
.margin-top{
margin-top: 1.5em;
}
.modal{
background: #444444!important;
color: white;
}
.modal .modal-footer {
background: #444444!important;
color: white;
}
.no-tasks{
padding-left: 50px;
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 23px;
display: flex;
align-items: center;
margin-top: 27px;
color: #FFFFFF;
}
@@ -262,8 +310,8 @@ code > pre, .code{
border: none; border: none;
} }
.pure-material-button-contained.spaced{ .pure-material-button-contained.spaced{
margin-bottom: 5px; margin-bottom: 1em;
margin-right: 5px; margin-right: 30px;
} }
.pure-material-button-contained.slim{ .pure-material-button-contained.slim{
+2 -2
View File
@@ -54,8 +54,8 @@ export class AppWindow {
height: windowState.height, height: windowState.height,
x: windowState.x, x: windowState.x,
y: windowState.y, y: windowState.y,
minWidth: 800, minWidth: 1024,
minHeight: 480, minHeight: 640,
show: !showAfterSetup, show: !showAfterSetup,
webPreferences: { webPreferences: {
webviewTag: true, webviewTag: true,
+2 -1
View File
@@ -102,11 +102,11 @@
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"crypto": "^1.0.1", "crypto": "^1.0.1",
"electron-updater": "^4.3.7", "electron-updater": "^4.3.7",
"usb-detection2": "git+https://github.com/SideQuestVR/node-usb-detection.git",
"express": "^4.17.1", "express": "^4.17.1",
"extract-zip": "^1.6.7", "extract-zip": "^1.6.7",
"md5": "^2.2.1", "md5": "^2.2.1",
"mkdirp": "^1.0.3", "mkdirp": "^1.0.3",
"node-fetch": "2.6.1",
"node-stream-zip": "^1.9.1", "node-stream-zip": "^1.9.1",
"opn": "^6.0.0", "opn": "^6.0.0",
"ping": "^0.2.2", "ping": "^0.2.2",
@@ -114,6 +114,7 @@
"request-progress": "^3.0.0", "request-progress": "^3.0.0",
"semver": "^6.0.0", "semver": "^6.0.0",
"targz": "^1.0.1", "targz": "^1.0.1",
"usb-detection2": "git+https://github.com/SideQuestVR/node-usb-detection.git",
"wait-on": "^3.2.0", "wait-on": "^3.2.0",
"yauzl": "^2.10.0" "yauzl": "^2.10.0"
}, },
+5
View File
@@ -3100,6 +3100,11 @@ node-fetch-npm@^2.0.2:
json-parse-better-errors "^1.0.0" json-parse-better-errors "^1.0.0"
safe-buffer "^5.1.1" safe-buffer "^5.1.1"
node-fetch@2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
node-forge@^0.7.1: node-forge@^0.7.1:
version "0.7.6" version "0.7.6"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac"