Fully working version

This commit is contained in:
Nathanael Anderson
2024-03-18 10:58:29 -06:00
parent d4dcf5e6ec
commit e5cc6a2bfa
19 changed files with 340 additions and 97 deletions
+4 -1
View File
@@ -35,7 +35,10 @@
"buildOptimizer": false, "buildOptimizer": false,
"sourceMap": true, "sourceMap": true,
"optimization": false, "optimization": false,
"namedChunks": true "namedChunks": true,
"allowedCommonJsDependencies": [
"dragula"
]
}, },
"configurations": { "configurations": {
"production": { "production": {
+5 -3
View File
@@ -26,16 +26,17 @@
"@angular/platform-browser-dynamic": "^17.2.2", "@angular/platform-browser-dynamic": "^17.2.2",
"@angular/platform-server": "^17.2.2", "@angular/platform-server": "^17.2.2",
"@angular/router": "^17.2.2", "@angular/router": "^17.2.2",
"@iharbeck/ngx-virtual-scroller": "17.0.2",
"@simonwep/pickr": "^1.0.0-beta", "@simonwep/pickr": "^1.0.0-beta",
"@steinv/ngx-materialize": "^17.0.0",
"@tweenjs/tween.js": "^23.1.1",
"@types/hammerjs": "^2.0.45", "@types/hammerjs": "^2.0.45",
"dom-autoscroller": "^2.3.4", "dom-autoscroller": "^2.3.4",
"dragula": "^3.7.3",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"materialize-css": "1.0.0", "materialize-css": "1.0.0",
"dragula": "^3.7.3",
"ng2-dragula": "^5.0.1", "ng2-dragula": "^5.0.1",
"ngx-color-picker": "^16.0.0", "ngx-color-picker": "^16.0.0",
"@steinv/ngx-materialize": "^17.0.0",
"@iharbeck/ngx-virtual-scroller": "17.0.2",
"randomcolor": "^0.6.2", "randomcolor": "^0.6.2",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"rxjs-compat": "^6.6.7", "rxjs-compat": "^6.6.7",
@@ -50,6 +51,7 @@
"@angular/cli": "^17.2.0", "@angular/cli": "^17.2.0",
"@angular/compiler-cli": "^17.2.2", "@angular/compiler-cli": "^17.2.2",
"@angular/language-service": "^17.2.2", "@angular/language-service": "^17.2.2",
"@angular/localize": "17.2.2",
"@types/jasmine": "~5.1.4", "@types/jasmine": "~5.1.4",
"@types/jasminewd2": "~2.0.13", "@types/jasminewd2": "~2.0.13",
"@types/node": "^20.11.20", "@types/node": "^20.11.20",
+8 -3
View File
@@ -396,7 +396,11 @@ export class AdbClientService {
return requestAnimationFrame(this.connectedStatus.bind(this)); return requestAnimationFrame(this.connectedStatus.bind(this));
this.lastConnectionCheck = now; this.lastConnectionCheck = now;
return this.adbCommand('listDevices') return this.adbCommand('listDevices')
.then((devices: any) => devices.filter(device => device.type !== 'offline')) .then((devices: any) => {
console.log("d1", devices);
let f = devices.filter(device => device.type !== 'offline')
return f;
})
.then(async devices => { .then(async devices => {
if (devices.length > 1 && this.justChangedMPT) { if (devices.length > 1 && this.justChangedMPT) {
this.justChangedMPT = false; this.justChangedMPT = false;
@@ -415,7 +419,7 @@ export class AdbClientService {
requestAnimationFrame(this.connectedStatus.bind(this)); requestAnimationFrame(this.connectedStatus.bind(this));
}) })
.catch(err => { .catch(err => {
console.warn(err); console.warn(err, err.stack);
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.
@@ -455,6 +459,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
await this.appService.seedPlatformTools(); await this.appService.seedPlatformTools();
} }
this.appService.electron.ipcRenderer.on('adb-command', (event, arg: any) => { this.appService.electron.ipcRenderer.on('adb-command', (event, arg: any) => {
console.log("result", arg.uuid, arg.status, arg.error, arg.resp)
if (this.adbResolves[arg.uuid]) { if (this.adbResolves[arg.uuid]) {
if (arg.status && this.adbResolves[arg.uuid].callback) { if (arg.status && this.adbResolves[arg.uuid].callback) {
this.adbResolves[arg.uuid].callback(arg.status); this.adbResolves[arg.uuid].callback(arg.status);
@@ -470,7 +475,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
}); });
this.lastErrorMessage = null; this.lastErrorMessage = null;
} catch (e) { } catch (e) {
console.error(e); console.error(e, e.stack);
this.deviceStatus = ConnectionStatus.DISCONNECTED; this.deviceStatus = ConnectionStatus.DISCONNECTED;
this.deviceStatusMessage = 'ADB Setup Error'; this.deviceStatusMessage = 'ADB Setup Error';
this.lastErrorMessage = e.toString(); this.lastErrorMessage = e.toString();
+2 -1
View File
@@ -4,6 +4,7 @@ import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
// import { MzButtonModule, MzCheckboxModule, MzModalModule, MzTooltipModule } from '@steinv/ngx-materialize'; // import { MzButtonModule, MzCheckboxModule, MzModalModule, MzTooltipModule } from '@steinv/ngx-materialize';
import { MzModalModule} from './mz-components/modal';
import { NgxMaterialize } from '@steinv/ngx-materialize'; import { NgxMaterialize } from '@steinv/ngx-materialize';
import { DragulaModule } from 'ng2-dragula'; import { DragulaModule } from 'ng2-dragula';
import { HeaderComponent } from './header/header.component'; import { HeaderComponent } from './header/header.component';
@@ -60,7 +61,7 @@ import { StreamOptionsComponent } from './stream-options/stream-options.componen
FormsModule, FormsModule,
RouterModule.forRoot(AppRoutes, { useHash: true }), RouterModule.forRoot(AppRoutes, { useHash: true }),
// MzTooltipModule, // MzTooltipModule,
// MzModalModule, MzModalModule,
// MzButtonModule, // MzButtonModule,
HttpClientModule, HttpClientModule,
// MzCheckboxModule, // MzCheckboxModule,
@@ -2,16 +2,16 @@
<div class="right-side-diagnostics" *ngIf="adb.diagnostics"> <div class="right-side-diagnostics" *ngIf="adb.diagnostics">
<h4 i18n>Connection Status</h4> <h4 i18n>Connection Status</h4>
<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>
<span class="status-text">{{adb.diagnostics.usb && adb.diagnostics.usb.is_connected?'Quest Detected':'Quest Not Detected'}}</span> <span class="status-text">{{adb.diagnostics?.usb && adb.diagnostics.usb.is_connected?'Quest Detected':'Quest Not Detected'}}</span>
</div> </div>
<div i18n> <div i18n>
<div class="status-circle" [ngClass]="{'green': adb.diagnostics.usb && adb.diagnostics.usb.is_dev_mode_enabled}"></div> <div class="status-circle" [ngClass]="{'green': adb.diagnostics?.usb && adb.diagnostics.usb.is_dev_mode_enabled}"></div>
<span class="status-text">{{adb.diagnostics.usb && adb.diagnostics.usb.is_dev_mode_enabled?'Dev Mode Enabled':'Dev Mode Not Enabled'}}</span> <span class="status-text">{{adb.diagnostics?.usb && adb.diagnostics.usb.is_dev_mode_enabled?'Dev Mode Enabled':'Dev Mode Not Enabled'}}</span>
</div> </div>
<div i18n> <div i18n>
<div class="status-circle" [ngClass]="{'green': adb.diagnostics.usb && adb.diagnostics.usb.is_adb_enabled}"></div> <div class="status-circle" [ngClass]="{'green': adb.diagnostics?.usb && adb.diagnostics.usb.is_adb_enabled}"></div>
<span class="status-text">{{adb.diagnostics.usb && adb.diagnostics.usb.is_adb_enabled?'ADB Detected':'No ADB Detected'}}</span> <span class="status-text">{{adb.diagnostics?.usb && adb.diagnostics.usb.is_adb_enabled?'ADB Detected':'No ADB Detected'}}</span>
</div> </div>
<div i18n> <div i18n>
<div class="status-circle" [ngClass]="{'green': adb.devices.length && adb.deviceStatus !== ConnectionStatus.UNAUTHORIZED}"></div> <div class="status-circle" [ngClass]="{'green': adb.devices.length && adb.deviceStatus !== ConnectionStatus.UNAUTHORIZED}"></div>
@@ -25,13 +25,13 @@
<div class="help-section" *ngIf="helpOpen"> <div class="help-section" *ngIf="helpOpen">
<div class="diag-recommend"> <div class="diag-recommend">
<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> <br>
<div class="pure-material-button-contained button-margin-bottom" (click)="helpOpen = false">Close</div> <div class="pure-material-button-contained button-margin-bottom" (click)="helpOpen = false">Close</div>
@@ -1,8 +1,8 @@
<div class="col s10 package-height chip-padding package-item relative"> <div class="col s10 package-height chip-padding package-item relative">
<div class="chip pointer margin-right menu-chip truncate" <div #tooltip class="chip pointer margin-right menu-chip truncate"
[ngClass]="{'pink-button' : task.running, 'white-text' : task.running || task.failed || task.succeeded, 'orange' : task.failed, 'green' : task.succeeded}" [ngClass]="{'pink-button' : task.running, 'white-text' : task.running || task.failed || task.succeeded, 'orange' : task.failed, 'green' : task.succeeded}"
mz-tooltip [tooltip]="task.running ? 'This task is running' : task.failed ? 'This task has failed' : task.succeeded ? 'This task succeeded' : 'This task is waiting'" mTooltip [attr.data-tooltip]="task.running ? 'This task is running' : task.failed ? 'This task has failed' : task.succeeded ? 'This task succeeded' : 'This task is waiting'"
position="bottom" [innerHTML]="'<i class=material-icons>' + task.icon + '</i>' + task.status"> data-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 right-align"> <div class="col s2 package-height centered package-item right-align">
@@ -1,4 +1,4 @@
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, AfterViewInit, OnDestroy, ViewChild } from '@angular/core';
import { ProcessBucketService } from '../process-bucket.service'; import { ProcessBucketService } from '../process-bucket.service';
@Component({ @Component({
@@ -6,11 +6,40 @@ import { ProcessBucketService } from '../process-bucket.service';
templateUrl: './current-task-item.component.html', templateUrl: './current-task-item.component.html',
styleUrls: ['./current-task-item.component.scss'], styleUrls: ['./current-task-item.component.scss'],
}) })
export class CurrentTaskItemComponent implements OnInit { export class CurrentTaskItemComponent implements AfterViewInit, OnDestroy {
@Input() task; @Input() task;
@ViewChild('tooltip') tooltip;
toolTipInterval: number
toolTipStatus: number = 0
constructor(public processService: ProcessBucketService) {} constructor(public processService: ProcessBucketService) {}
ngOnInit() {} ngAfterViewInit() {
return;
this.toolTipInterval = setInterval(() => {
if (this.task) {
if (this.task.running && this.toolTipStatus !== 2) {
this.toolTipStatus = 2;
this.tooltip.nativeElement.dataset.tooltip = 'This task is running';
} else if (this.task.failed && this.toolTipStatus !== 3) {
this.toolTipStatus = 3;
this.tooltip.nativeElement.dataset.tooltip = 'This task has failed';
} else if (this.task.succeeded && this.toolTipStatus !== 4) {
this.toolTipStatus = 4;
this.tooltip.nativeElement.dataset.tooltip = 'This task succeeded';
} else if (this.toolTipStatus !== 1) {
this.toolTipStatus = 1;
this.tooltip.nativeElement.dataset.tooltip = 'This task is waiting';
}
} else {
this.toolTipStatus = 1;
this.tooltip.nativeElement.dataset.tooltip = 'This task is waiting';
}
}, 500);
}
ngOnDestroy() {
// clearInterval(this.toolTipInterval);
}
deleteItem() { deleteItem() {
this.processService.tasks = this.processService.tasks.filter(t => t !== this.task); this.processService.tasks = this.processService.tasks.filter(t => t !== this.task);
@@ -1,20 +1,20 @@
<div class="inner-app-container"> <div class="inner-app-container">
<div class="screen-description">Manage tasks for downloading, transferring and installing to your headset.</div> <div class="screen-description">Manage tasks for downloading, transferring and installing to your headset.</div>
<div class="sync-songs"> <div class="sync-songs">
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom" <div class="pure-material-button-contained spaced flat active" data-position="bottom"
tooltip="Clear out the finished tasks." (click)="processService.clearDone()"> mTooltip data-tooltip="Clear out the finished tasks." (click)="processService.clearDone()">
Clear Done Clear Done
</div> </div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom" <div class="pure-material-button-contained spaced flat active" data-position="bottom"
tooltip="Restart the failed tasks." (click)="processService.retryFailed()"> mTooltip data-tooltip="Restart the failed tasks." (click)="processService.retryFailed()">
Retry Failed Retry Failed
</div> </div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom" <div class="pure-material-button-contained spaced flat active" data-position="bottom"
tooltip="Clear out the failed tasks." (click)="processService.clearFailed()"> mTooltip data-tooltip="Clear out the failed tasks." (click)="processService.clearFailed()">
Clear Failed Clear Failed
</div> </div>
<div class="pure-material-button-contained spaced active red" mz-tooltip position="bottom" <div class="pure-material-button-contained spaced active red" data-position="bottom"
tooltip="Clear out the finished tasks." (click)="processService.clearAll()"> mTooltip data-tooltip="Clear out the finished tasks." (click)="processService.clearAll()">
Clear All Clear All
</div> </div>
</div> </div>
@@ -26,7 +26,7 @@
<ng-container *ngFor="let favourite of appService.headerComponent.favourites.fileFavourites"> <ng-container *ngFor="let favourite of appService.headerComponent.favourites.fileFavourites">
<a href="javascript:void(0)" class="waves-effect waves-light synthrideerz margin-right" <a href="javascript:void(0)" class="waves-effect waves-light synthrideerz margin-right"
(click)="appService.filesComponent.open(favourite.uri)" (click)="appService.filesComponent.open(favourite.uri)"
mz-tooltip tooltip="{{favourite.name}}"> mTooltip="{{favourite.name}}">
<img *ngIf="favourite.icon" src="{{favourite.icon}}" class="responsive-img" /></a> <img *ngIf="favourite.icon" src="{{favourite.icon}}" class="responsive-img" /></a>
</ng-container> </ng-container>
<div class="divider divider-margin-top margin-bottom"></div> <div class="divider divider-margin-top margin-bottom"></div>
@@ -56,27 +56,27 @@
<br><br> <br><br>
</div> </div>
<div class="fixed-action-btn" #fixedAction *ngIf="isConnected()"> <div class="fixed-action-btn" #fixedAction *ngIf="isConnected()">
<a class="btn-floating btn-large pink lightn-2" mz-tooltip position="left" tooltip="Add a file."> <a class="btn-floating btn-large pink lightn-2" data-position="left" mTooltip data-tooltip="Add a file.">
<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" <li data-position="left" mTooltip data-tooltip="Manage favourite folders"
(click)="appService.headerComponent.favoriteType = 'fileFavourites';appService.headerComponent.manageFavs.openModal(); appService.headerComponent.favouriteMax = 10; appService.headerComponent.favoritePathType = 'Path';" (click)="appService.headerComponent.favoriteType = 'fileFavourites';appService.headerComponent.manageFavs.openModal(); appService.headerComponent.favouriteMax = 10; appService.headerComponent.favoritePathType = 'Path';"
><a class="btn-floating red"><i class="material-icons">favorite</i></a></li> ><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 data-position="left" mTooltip data-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 data-position="left" mTooltip data-tooltip="Make new folder in this folder" (click)="mkDirModal.openModal()"><a
class="btn-floating blue"><i class="material-icons">create_new_folder</i></a></li> class="btn-floating blue"><i class="material-icons">create_new_folder</i></a></li>
<li mz-tooltip position="left" tooltip="Open current save location" (click)="openSaveLocation()"><a <li data-position="left" mTooltip data-tooltip="Open current save location" (click)="openSaveLocation()"><a
class="btn-floating yellow darken-2"><i class="material-icons">open_in_new</i></a></li> class="btn-floating yellow darken-2"><i class="material-icons">open_in_new</i></a></li>
<li *ngIf="quickSaveSupported()" mz-tooltip position="left" tooltip="Save screenshots and recordings" <li *ngIf="quickSaveSupported()" data-position="left" mTooltip data-tooltip="Save screenshots and recordings"
(click)="downloadMediaModal.openModal()"><a class="btn-floating green"><i class="material-icons">get_app</i></a> (click)="downloadMediaModal.openModal()"><a class="btn-floating green"><i class="material-icons">get_app</i></a>
</li> </li>
<li *ngIf="selectedFiles.length > 0" class="divider"></li> <li *ngIf="selectedFiles.length > 0" class="divider"></li>
<li *ngIf="selectedFiles.length > 0" mz-tooltip position="left" tooltip="Delete selected items" <li *ngIf="selectedFiles.length > 0" data-position="left" mTooltip data-tooltip="Delete selected items"
(click)="filesToBeDeleted = selectedFiles; confirmModal.openModal()"><a class="btn-floating red darken-2"><i (click)="filesToBeDeleted = selectedFiles; confirmModal.openModal()"><a class="btn-floating red darken-2"><i
class="material-icons">delete</i></a></li> class="material-icons">delete</i></a></li>
<li *ngIf="selectedFiles.length > 0" mz-tooltip position="left" tooltip="Save selected items to computer" <li *ngIf="selectedFiles.length > 0" data-position="left" mTooltip data-tooltip="Save selected items to computer"
(click)="filesToBeSaved = selectedFiles; filesModal.openModal()"> (click)="filesToBeSaved = selectedFiles; filesModal.openModal()">
<a class="btn-floating orange"><i class="material-icons">get_app</i></a> <a class="btn-floating orange"><i class="material-icons">get_app</i></a>
</li> </li>
@@ -4,8 +4,8 @@
<div class="right"> <div class="right">
<div class="in-vr-title">SideQuest inside your VR headset</div> <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="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"--> <!-- <div class="pure-material-button-contained" position="bottom"-->
<!-- tooltip="Clear out the finished tasks.">--> <!-- mTooltip data-tooltip="Clear out the finished tasks.">-->
<!-- Install SideQuest in your headset--> <!-- Install SideQuest in your headset-->
<!-- </div>--> <!-- </div>-->
<ng-container *ngIf="!adb.isReady"> <ng-container *ngIf="!adb.isReady">
@@ -55,81 +55,81 @@
<!-- <app-link *ngIf="appService.updateAvailable"--> <!-- <app-link *ngIf="appService.updateAvailable"-->
<!-- class="waves-effect waves-light btn-flat link small-button warning" (click)="updateAvailable()"--> <!-- class="waves-effect waves-light btn-flat link small-button warning" (click)="updateAvailable()"-->
<!-- text="Update"></app-link>--> <!-- text="Update"></app-link>-->
<i mz-tooltip routerLink="/webview" (click)="doBack()" <i routerLink="/webview" (click)="doBack()"
class="material-icons white-text no-outline" position="bottom" tooltip="Back"> class="material-icons white-text no-outline" data-position="bottom" mTooltip data-tooltip="Back">
arrow_back arrow_back
</i> </i>
<i mz-tooltip *ngIf="!webService.isWebviewLoading" (click)="browserMenu.style.display = 'block';browserMenuBack.style.display = 'block'" <i *ngIf="!webService.isWebviewLoading" (click)="browserMenu.style.display = 'block';browserMenuBack.style.display = 'block'"
class="material-icons white-text no-outline" position="bottom" tooltip="Web Browser"> class="material-icons white-text no-outline" data-position="bottom" mTooltip data-tooltip="Web Browser">
public public
</i> </i>
<div mz-tooltip *ngIf="webService.isWebviewLoading" (click)="browserMenu.style.display = 'block';browserMenuBack.style.display = 'block'" <div *ngIf="webService.isWebviewLoading" (click)="browserMenu.style.display = 'block';browserMenuBack.style.display = 'block'"
class="loader-tiny pointer" position="bottom" class="loader-tiny pointer" data-position="bottom"
tooltip="Web Browser Loading..."></div> mTooltip data-tooltip="Web Browser Loading..."></div>
<i mz-tooltip routerLink="/webview" (click)="webService.forward()" <i routerLink="/webview" (click)="webService.forward()"
class="material-icons white-text no-outline" position="bottom" tooltip="Forward"> class="material-icons white-text no-outline" data-position="bottom" mTooltip data-tooltip="Forward">
arrow_forward arrow_forward
</i> </i>
<i mz-tooltip routerLink="/streaming" *ngIf="isConnected()&&osPlatform === 'win32'" <i routerLink="/streaming" *ngIf="isConnected()&&osPlatform === 'win32'"
class="material-icons white-text no-outline" position="bottom" class="material-icons white-text no-outline" data-position="bottom"
tooltip="Stream from your headset to your PC with ScrCpy."> mTooltip data-tooltip="Stream from your headset to your PC with ScrCpy.">
live_tv live_tv
</i> </i>
<i mz-tooltip *ngIf="adbService.deviceIp" routerLink="/wireless" <i *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}" data-position="bottom"
tooltip="Enable wireless mode. (Experimental)"> mTooltip data-tooltip="Enable wireless mode. (Experimental)">
wifi wifi
</i> </i>
<i mz-tooltip #mainLogo (click)="selectAppToInstall()" <i #mainLogo (click)="selectAppToInstall()"
class="material-icons white-text no-outline" position="bottom" class="material-icons white-text no-outline" data-position="bottom"
tooltip="Install APK file from folder on computer."> mTooltip data-tooltip="Install APK file from folder on computer.">
archive archive
</i> </i>
<i mz-tooltip class="material-icons white-text no-outline " routerLink="/device-files" <i class="material-icons white-text no-outline " routerLink="/device-files"
position="bottom" tooltip="Manage files on the headset."> data-position="bottom" mTooltip data-tooltip="Manage files on the headset.">
folder folder
</i> </i>
<i routerLink="packages" mz-tooltip class="material-icons white-text no-outline" <i routerLink="packages" class="material-icons white-text no-outline"
position="bottom" tooltip="Currently installed apps"> data-position="bottom" mTooltip data-tooltip="Currently installed apps">
apps apps
</i> </i>
<i routerLink="tasks" mz-tooltip class="material-icons white-text no-outline" position="bottom" <i routerLink="tasks" class="material-icons white-text no-outline" data-position="bottom"
tooltip="Running {{processService.left_length}} tasks."> mTooltip [attr.data-tooltip]="'Running' + processService.left_length + 'tasks.'">
playlist_add_check playlist_add_check
</i><span routerLink="tasks" mz-tooltip *ngIf="processService.left_length" position="bottom" </i><span routerLink="tasks" *ngIf="processService.left_length" data-position="bottom"
tooltip="Running {{processService.left_length}} tasks." mTooltip data-tooltip="Running {{processService.left_length}} tasks."
class="process-badge pink-button">{{processService.left_length>100?'99+':processService.left_length}}</span> class="process-badge pink-button">{{processService.left_length>100?'99+':processService.left_length}}</span>
<span routerLink="tasks" mz-tooltip *ngIf="!processService.left_length&&processService.failed_length" <span routerLink="tasks" *ngIf="!processService.left_length&&processService.failed_length"
position="bottom" tooltip="{{processService.failed_length}} failed tasks." data-position="bottom" mTooltip data-tooltip="{{processService.failed_length}} failed tasks."
class="process-badge pink-button red">{{processService.failed_length>100?'99+':processService.failed_length}}</span> class="process-badge pink-button red">{{processService.failed_length>100?'99+':processService.failed_length}}</span>
<i id="device-settings" routerLink="tools" mz-tooltip <i id="device-settings" routerLink="tools"
class="material-icons white-text no-outline" position="bottom" class="material-icons white-text no-outline" data-position="bottom"
tooltip="Device settings & tools"> mTooltip data-tooltip="Device settings & tools">
build build
</i> </i>
<i id="support-screen" routerLink="/setup" mz-tooltip <i id="support-screen" routerLink="/setup"
class="material-icons white-text no-outline" position="bottom" class="material-icons white-text no-outline" data-position="bottom"
tooltip="Help and support with SideQuest"> mTooltip data-tooltip="Help and support with SideQuest">
contact_support contact_support
</i> </i>
<i mz-tooltip (click)="commandMenu.style.display = 'block';commandMenuBack.style.display = 'block'" <i (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"> data-position="bottom" mTooltip data-tooltip="Run ADB commands">
input input
</i> </i>
</div> </div>
<div id="connection-status-container"> <div id="connection-status-container">
<i mz-tooltip class="material-icons white-text no-outline connection-device-select pointer left" <i class="material-icons white-text no-outline connection-device-select pointer left"
*ngIf="adbService.devices && adbService.devices.length > 1" *ngIf="adbService.devices && adbService.devices.length > 1"
(click)="deviceMenu.style.display = 'block';deviceMenuBack.style.display = 'block'" (click)="deviceMenu.style.display = 'block';deviceMenuBack.style.display = 'block'"
position="bottom" tooltip="Select Device"> data-position="bottom" mTooltip data-tooltip="Select Device">
arrow_drop_down arrow_drop_down
</i> </i>
<div class="connection-status-outer left"> <div class="connection-status-outer left">
<div id="connection-status" class="connection-status-unauthorized " mz-tooltip <div id="connection-status" class="connection-status-unauthorized"
position="bottom" [ngClass]="adbService.connectionCss" [tooltip]="adbService.lastErrorMessage||'Device connection status.'"> data-position="bottom" [ngClass]="adbService.connectionCss" mTooltip [attr.data-tooltip]="adbService.lastErrorMessage||'Device connection status.'">
</div> </div>
@@ -1,19 +1,19 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ToolsComponent } from './tools.component'; import { HeadsetSettingsComponent } from './headset-settings.component';
describe('ToolsComponent', () => { describe('HeadsetSettingsComponent', () => {
let component: ToolsComponent; let component: HeadsetSettingsComponent;
let fixture: ComponentFixture<ToolsComponent>; let fixture: ComponentFixture<HeadsetSettingsComponent>;
beforeEach(waitForAsync(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ToolsComponent], declarations: [HeadsetSettingsComponent],
}).compileComponents(); }).compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(ToolsComponent); fixture = TestBed.createComponent(HeadsetSettingsComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
+190
View File
@@ -0,0 +1,190 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2017 SherWeb
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,8 @@
This code in this directory is a modified version of this code as
that version of the code was not working properly in later versions
of Angular. Rather than rewrite all the mzmodel's we use in the app, it was
easier to just fix this component to use the newer Material api.
https://github.com/sherweb/ngx-materialize/tree/master/lib/src/modal
The library is licensed under the Apache 2.0 library.
@@ -13,16 +13,16 @@
</div> </div>
</div> </div>
<div class="screen-description">Manage settings on your headset.</div> <div class="screen-description">Manage settings on your headset.</div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom" <div class="pure-material-button-contained spaced flat active" data-position="bottom"
tooltip="Trigger cloud backup for your apps." (click)="cloudBackup.openModal()"> mTooltip data-tooltip="Trigger cloud backup for your apps." (click)="cloudBackup.openModal()">
Cloud Backup Cloud Backup
</div> </div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom" <div class="pure-material-button-contained spaced flat active" data-position="bottom"
tooltip="Bulk backup or restore your apps." (click)="backupEverything.openModal()"> mTooltip data-tooltip="Bulk backup or restore your apps." (click)="backupEverything.openModal()">
Backup/Restore All Backup/Restore All
</div> </div>
<div class="pure-material-button-contained spaced flat active" mz-tooltip position="bottom" <div class="pure-material-button-contained spaced flat active" data-position="bottom"
[tooltip]="'Current backup location: ' + appService.backupPath" (click)="pickLocation.openModal()"> mTooltip [attr.data-tooltip]="'Current backup location: ' + appService.backupPath" (click)="pickLocation.openModal()">
Change Backup Location Change Backup Location
</div> </div>
<div class="divider divider-margin-top"></div> <div class="divider divider-margin-top"></div>
@@ -16,8 +16,8 @@
<p>If you are still having trouble then please visit our support community on SideQuest.</p> <p>If you are still having trouble then please visit our support community on SideQuest.</p>
<div class="pure-material-button-contained extra-margin-bottom" (click)="appService.opn('https://sdq.st/support')">Open Support Community</div> <div class="pure-material-button-contained extra-margin-bottom" (click)="appService.opn('https://sdq.st/support')">Open Support Community</div>
<br> <br>
<p *ngIf="adb.diagnostics.usb && adb.diagnostics.usb.log">If instructed to upload logs by a SideQuest support person, please click this button.</p> <p *ngIf="adb.diagnostics?.usb && adb.diagnostics.usb.log">If instructed to upload logs by a SideQuest support person, please click this button.</p>
<div *ngIf="adb.diagnostics.usb && adb.diagnostics.usb.log" class="pure-material-button-contained extra-margin-bottom" (click)="uploadLogs();">{{'Upload Logs'}}</div> <div *ngIf="adb.diagnostics?.usb && adb.diagnostics.usb.log" class="pure-material-button-contained extra-margin-bottom" (click)="uploadLogs();">{{'Upload Logs'}}</div>
<div *ngIf="link"> <div *ngIf="link">
Copy and paste this link into your support request: Copy and paste this link into your support request:
<h3>{{link}}</h3> <h3>{{link}}</h3>
+2
View File
@@ -1,3 +1,5 @@
/// <reference types="@angular/localize" />
import { enableProdMode } from '@angular/core'; import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+3 -1
View File
@@ -2,7 +2,9 @@
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app", "outDir": "../out-tsc/app",
"types": [ ] "types": [
"@angular/localize"
]
}, },
"files": [ "files": [
"main.ts", "main.ts",
+2 -1
View File
@@ -4,7 +4,8 @@
"outDir": "../out-tsc/spec", "outDir": "../out-tsc/spec",
"types": [ "types": [
"jasmine", "jasmine",
"node" "node",
"@angular/localize"
] ]
}, },
"files": [ "files": [