completed new status bar
This commit is contained in:
@@ -333,10 +333,12 @@ export class AdbClientService {
|
||||
this.diagBegin();
|
||||
this.deviceStatus = this.getConnectedStatus();
|
||||
this.setConnectionCssClass();
|
||||
for (let i = 0; i < this.devices.length; i++) {
|
||||
this.getDeviceName(this.devices[i]);
|
||||
}
|
||||
this.displayDevices = this.devices;
|
||||
(async () => {
|
||||
for (let i = 0; i < this.devices.length; i++) {
|
||||
await this.getDeviceName(this.devices[i]);
|
||||
}
|
||||
this.displayDevices = this.devices;
|
||||
})();
|
||||
document.getElementById('connection-status').className = 'connection-status-' + status;
|
||||
switch (this.deviceStatus) {
|
||||
case ConnectionStatus.LINUX_PERMS:
|
||||
|
||||
@@ -5,28 +5,7 @@
|
||||
</div>
|
||||
|
||||
<app-loading-spinner #spinner></app-loading-spinner>
|
||||
<app-status-bar #status (getHelp)="getHelpModal.openModal(); helpStatus = $event; setExterHelp()"></app-status-bar>
|
||||
<app-status-bar #status></app-status-bar>
|
||||
<webview id="mainWebView" #webview httpreferrer="https://sdiequestvr.com" [attr.src]="webUrl" allowpopups [ngStyle]="{'left':webService.isWebviewOpen?'0':'-100%'}" class="bsaber-webview"></webview>
|
||||
|
||||
<mz-modal #getHelpModal [fixedFooter]="true">
|
||||
<mz-modal-header>
|
||||
<h4>Get Help</h4>
|
||||
</mz-modal-header>
|
||||
<mz-modal-content>
|
||||
We have a great community and we have already faced most problems and found solutions. Please check out our Service Desk for info on the following error.<br><br>
|
||||
<div class="code">
|
||||
{{helpStatus}}
|
||||
</div>
|
||||
<br>
|
||||
<div class="green-text" *ngIf="extraHelpStatus" [innerHTML]="extraHelpStatus"></div>
|
||||
<br><br>
|
||||
<div class="center-align">
|
||||
<div class="btn pink-button waves-effect waves-light" (click)="statusService.copyStatus();statusService.showStatus('Copied to your clipboard!')">Copy To Clipboard</div><br><br>
|
||||
<div class="btn btn-flat waves-effect waves-dark" (click)="appService.opn((shortenerUrl||'https://sdq.st')+'/support')">Open Service Desk</div><br><br>
|
||||
</div>
|
||||
</mz-modal-content>
|
||||
<mz-modal-footer>
|
||||
<button mz-button [flat]="true" mz-modal-close>Close</button>
|
||||
</mz-modal-footer>
|
||||
</mz-modal>
|
||||
|
||||
|
||||
@@ -49,8 +49,6 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||
});
|
||||
}
|
||||
ngAfterViewInit() {
|
||||
this.spinnerService.setSpinner(this.spinner);
|
||||
this.statusService.setStatus(this.status);
|
||||
this.webService.setWebView(this.webview.nativeElement);
|
||||
}
|
||||
setExterHelp() {
|
||||
|
||||
@@ -9,7 +9,6 @@ import { HeaderComponent } from './header/header.component';
|
||||
import { StatusBarComponent } from './status-bar/status-bar.component';
|
||||
import { LoadingSpinnerComponent } from './loading-spinner/loading-spinner.component';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { SetupComponent } from './setup/setup.component';
|
||||
import { AppRoutes } from './app.routes';
|
||||
import { LoadingSpinnerSmallComponent } from './loading-spinner-small/loading-spinner-small.component';
|
||||
import { PackagesComponent } from './packages/packages.component';
|
||||
@@ -37,7 +36,6 @@ import { StreamOptionsComponent } from './stream-options/stream-options.componen
|
||||
HeaderComponent,
|
||||
StatusBarComponent,
|
||||
LoadingSpinnerComponent,
|
||||
SetupComponent,
|
||||
LoadingSpinnerSmallComponent,
|
||||
PackagesComponent,
|
||||
PackageItemComponent,
|
||||
|
||||
@@ -198,7 +198,6 @@ export class AppService {
|
||||
}
|
||||
}
|
||||
resetTop() {
|
||||
this.showSearch = false;
|
||||
this.showBrowserBar = false;
|
||||
this.showCustomActions = false;
|
||||
this.showTaskActions = false;
|
||||
|
||||
@@ -12,8 +12,6 @@ export class CurrentTasksComponent implements OnInit {
|
||||
constructor(public processService: ProcessBucketService, public appService: AppService) {
|
||||
this.appService.resetTop();
|
||||
appService.webService.isWebviewOpen = false;
|
||||
this.appService.showTaskActions = true;
|
||||
// appService.isTasksOpen = true;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -50,10 +50,11 @@
|
||||
routerLink="/webview"><img *ngIf="favourite.icon" class="left browser-menu-image" src="{{favourite.icon}}"/>{{favourite.name}}</div><br>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="pure-material-button-contained slim update-available" *ngIf="appService.updateAvailable" (click)="updateAvailable()">Update Available</div>
|
||||
|
||||
<app-link *ngIf="appService.updateAvailable"
|
||||
class="waves-effect waves-light btn-flat update-available link small-button warning" (click)="updateAvailable()"
|
||||
text="Update"></app-link>
|
||||
<!-- <app-link *ngIf="appService.updateAvailable"-->
|
||||
<!-- class="waves-effect waves-light btn-flat link small-button warning" (click)="updateAvailable()"-->
|
||||
<!-- text="Update"></app-link>-->
|
||||
<i mz-tooltip routerLink="/webview" (click)="doBack()"
|
||||
class="material-icons white-text no-outline" position="bottom" tooltip="Back">
|
||||
arrow_back
|
||||
@@ -159,26 +160,6 @@
|
||||
(click)="webService.loadUrl('https://synthriderz.com/beatmaps/recent')">
|
||||
<img src="assets/images/Synth.png" class="responsive-img" /></a>
|
||||
</div>
|
||||
<div id="searchFilterContainer" *ngIf="appService.showSearch">
|
||||
<div class="search" *ngIf="false">
|
||||
<div class="input-field inline search-box">
|
||||
<input id="searchBox" class="input-dark-theme" type="text" />
|
||||
<label for="searchBox" class="active label-dark-theme">
|
||||
Search
|
||||
</label>
|
||||
</div>
|
||||
<a class="waves-effect waves-dark btn search-button-margin white black-text">search</a>
|
||||
<a class="waves-effect waves-dark btn search-button-margin white black-text" (click)="selectAppToInstall()">Pick
|
||||
APK/OBB</a>
|
||||
</div>
|
||||
<div class="filters" style="display: none">
|
||||
<div class="input-field inline filter ">
|
||||
<select id="filterDropdown">
|
||||
<option>All</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -196,7 +177,7 @@
|
||||
Address
|
||||
</label>
|
||||
</div>
|
||||
<a class="waves-effect waves-dark btn search-button-margin white black-text" routerLink="/webview"
|
||||
<a class="pure-material-button-contained search-button-margin" routerLink="/webview"
|
||||
(click)="webService.loadUrl(webService.currentAddress);" mz-modal-close>Open</a>
|
||||
|
||||
<br><br>
|
||||
@@ -263,7 +244,9 @@
|
||||
<option value="silent">silent</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col s3"><button mz-button class="green" (click)="startLogcat(); isStarted = true;">{{isStarted?'Restart':'Start'}}</button></div>
|
||||
<div class="col s3">
|
||||
<button mz-button class="green" (click)="startLogcat(); isStarted = true;">{{isStarted?'Restart':'Start'}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</mz-modal-footer>
|
||||
</mz-modal>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<span class="spinner-loading-message truncate" [innerHTML]="loadingTask ? loadingTask.status : loadingMessage"></span>
|
||||
<div *ngIf="isConfirm">
|
||||
<br><br>
|
||||
<a class="btn waves-effect waves-light red" (click)="cancel()">Cancel</a>
|
||||
<a class="btn waves-effect waves-light pink-button" (click)="confirm()">Continue</a>
|
||||
<div class="pure-material-button-contained flat active" (click)="cancel()">Cancel</div>
|
||||
<div class="pure-material-button-contained" (click)="confirm()">Continue</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
|
||||
<h4>Game Data Backups</h4>
|
||||
Backup data files from your SD Card for this app/game. This will attempt to save game data and OBB files for the game from the SD Card and not the internal storage. Does not work for all games.<br><br>
|
||||
<a class="waves-effect waves-light btn backup-this-package"
|
||||
(click)="backupData(currentPackage.package.packageName)">Backup Game Data</a><br><br>
|
||||
<div class="pure-material-button-contained backup-this-package"
|
||||
(click)="backupData(currentPackage.package.packageName)">Backup Game Data</div><br><br>
|
||||
<div class="row" *ngFor="let backup of dataBackups">
|
||||
<div class="col s3">
|
||||
<div class="chip cursor restore-backup tooltipped" data-position="right" data-tooltip="Restore this backup"
|
||||
@@ -88,7 +88,7 @@
|
||||
<br><br>
|
||||
<h4>APK Backups</h4>
|
||||
Backup your APK file from your device.<br><br>
|
||||
<a class="waves-effect waves-light btn backup-this-package margin-right"
|
||||
<a class="pure-material-button-contained margin-right"
|
||||
(click)="backupApk(currentPackage.package.packageName)">Backup APK File</a><br><br>
|
||||
<div class="row" *ngFor="let backup of backups">
|
||||
<div class="col s3">
|
||||
@@ -108,11 +108,11 @@
|
||||
<div class="col s5">
|
||||
|
||||
<h4>Manage App</h4>
|
||||
<a class="waves-effect waves-light btn green" (click)="launchApp()">Launch App</a><br><br>
|
||||
<a class="waves-effect waves-light btn orange " (click)="forceClose()">Force Close App</a><br><br>
|
||||
<a class="waves-effect waves-light btn orange " (click)="clearData()">Clear App Data</a><br><br>
|
||||
<a class="waves-effect waves-light btn red " (click)="uninstallApk()">Uninstall App</a><br><br>
|
||||
<a class="waves-effect waves-light btn"
|
||||
<a class="pure-material-button-contained" (click)="launchApp()">Launch App</a><br><br>
|
||||
<a class="pure-material-button-contained flat active " (click)="forceClose()">Force Close App</a><br><br>
|
||||
<a class="pure-material-button-contained flat active " (click)="clearData()">Clear App Data</a><br><br>
|
||||
<a class="pure-material-button-contained flat active " (click)="uninstallApk()">Uninstall App</a><br><br>
|
||||
<a class="pure-material-button-contained flat active"
|
||||
(click)="appService.openFolder(folder.APP_BACKUP,currentPackage.package.packageName)">Open Backups</a>
|
||||
|
||||
<br><br><br><br>
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { StatusBarService } from './status-bar.service';
|
||||
export interface ProcessTask {
|
||||
export class ProcessTask {
|
||||
constructor(private statusService?: StatusBarService) {}
|
||||
key: string;
|
||||
name: string;
|
||||
app_name?: string;
|
||||
icon: string;
|
||||
status?: string;
|
||||
private _status?;
|
||||
get status(): string {
|
||||
return this._status;
|
||||
}
|
||||
set status(d) {
|
||||
this.statusService.showStatus(d, false, true);
|
||||
this._status = d;
|
||||
}
|
||||
running?: boolean;
|
||||
fail_once?: boolean;
|
||||
percent?: string;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { AdbClientService } from '../adb-client.service';
|
||||
import { AppService } from '../app.service';
|
||||
import { StatusBarService } from '../status-bar.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-setup-guide',
|
||||
@@ -15,7 +16,7 @@ export class SetupGuideComponent implements OnInit {
|
||||
isSupport: boolean;
|
||||
link;
|
||||
logFailed: boolean;
|
||||
constructor(public adb: AdbClientService, public appService: AppService) {
|
||||
constructor(public adb: AdbClientService, public appService: AppService, private statusService: StatusBarService) {
|
||||
appService.resetTop();
|
||||
appService.webService.isWebviewOpen = false;
|
||||
}
|
||||
@@ -35,7 +36,7 @@ export class SetupGuideComponent implements OnInit {
|
||||
|
||||
copyToClipboard() {
|
||||
this.adb.copyToClipboard(this.link);
|
||||
// this.toast.show('Copied to clipboard: ' + this.link);
|
||||
this.statusService.showStatus('Copied to clipboard: ' + this.link);
|
||||
}
|
||||
|
||||
async uploadLogs() {
|
||||
@@ -62,11 +63,11 @@ export class SetupGuideComponent implements OnInit {
|
||||
|
||||
link = (await resp.json()).result.url;
|
||||
this.link = link;
|
||||
// this.toast.show('Logs Uploaded! Copy the Url to your support ticket.');
|
||||
// this.scrollTo('thankYou');
|
||||
|
||||
this.statusService.showStatus('Logs Uploaded! Copy the Url to your support ticket.');
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
alert('Unable to upload logs, please try again later.');
|
||||
this.statusService.showStatus('Unable to upload logs, please try again later.', true);
|
||||
}
|
||||
// this.telemetry.telemetry({ event: 'log-upload', logData: this.adb.diagnostics.usb.log, logLink: link });
|
||||
}
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="col s12 m6">
|
||||
<div class="setup-content text-dark-theme">
|
||||
<div class="section-title">
|
||||
Step 1: Create Organisation
|
||||
</div>
|
||||
<div>
|
||||
Put the Oculus Headset in developer mode to be able to sideload to the Headset. To do this,
|
||||
you have to be a registered "developer". This process is free. Go to
|
||||
<app-link url="https://dashboard.oculus.com"
|
||||
text="dashboard.oculus.com"></app-link>
|
||||
on your PC and create an 'organization'. You'll be asked to accept the developer agreement.
|
||||
</div>
|
||||
<br><br>
|
||||
<img class="setup-image" src="assets/images/CreateOrganisation.png" />
|
||||
<img class="setup-image" src="assets/images/OculusDashboardDeveloperCreate.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 m6">
|
||||
<div class="setup-content text-dark-theme">
|
||||
<div class="section-title">
|
||||
Step 2: Install Drivers ( Windows Only - skip this on Mac / Linux )
|
||||
</div>
|
||||
<div>
|
||||
Install the driver software for your device. Go to
|
||||
<app-link url="https://developer.oculus.com/downloads/package/oculus-go-adb-drivers/"
|
||||
text="developer.oculus.com"></app-link>
|
||||
on your PC and download the drivers for your headset. The Oculus Go drivers work for the
|
||||
quest also. To install the drivers extract the zip folder, right click the
|
||||
<div class="chip">android_winusb.inf</div>
|
||||
file and click install.
|
||||
</div>
|
||||
<br><br>
|
||||
<img class="setup-image" src="assets/images/ADB Drivers.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear-fix"></div>
|
||||
<div class="row">
|
||||
<div class="col s12 m6">
|
||||
<div class="setup-content text-dark-theme">
|
||||
<div class="section-title">
|
||||
Step 3: Enable Developer Mode and Reboot
|
||||
</div>
|
||||
<p>
|
||||
Now that you’re a "developer", open the Oculus app on your smartphone or tablet. In the
|
||||
Settings tab, tap on the Go headset and tap 'More settings'. In the list, you should now see
|
||||
Developer Mode. Once you have enabled developer mode it is a good idea to reboot your headset
|
||||
to be able to see it on the device.
|
||||
</p>
|
||||
<br><br>
|
||||
<img class="setup-image" src="assets/images/OculusAppDevModeSteps.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 m6">
|
||||
<div class="setup-content text-dark-theme">
|
||||
<div class="section-title">
|
||||
Step 4: Connect USB Cable and Allow USB Debugging
|
||||
</div>
|
||||
<div>
|
||||
Now its time to connect the USB cable. Once you are connected you will have to allow USB
|
||||
debugging access on your headset. If you put your headset on at this point you will see
|
||||
something like the below. You should also select 'Always allow from this computer' to prevent
|
||||
this message from coming up every time you connect.
|
||||
</div>
|
||||
<br><br>
|
||||
<img class="setup-image" src="assets/images/allow-auth.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear-fix"></div>
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="setup-content text-dark-theme">
|
||||
<div class="section-title">
|
||||
Step 5: Install App Launcher
|
||||
</div>
|
||||
<div class="text-dark-theme">
|
||||
Install a launcher to make finding apps easier on your headset. This launcher will be found in
|
||||
the library under 'Unknown Sources' on the menu on the left. Open it to find all the apps that
|
||||
have been installed on your device.
|
||||
</div><br>
|
||||
<span class="chip" *ngIf="isLauncherInstalled()">SideQuest Launcher Installed!</span>
|
||||
<app-loading-spinner-small *ngIf="isInstallingLauncher"></app-loading-spinner-small>
|
||||
<div class="waves-effect waves-light btn pink-button button-dark-theme"
|
||||
*ngIf="!isInstalledLauncher&&!isInstallingLauncher"
|
||||
[ngClass]="{'waves-dark':true,'waves-light':false}"
|
||||
(click)="installLauncher()">
|
||||
Install App Launcher
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="text-dark-theme">
|
||||
You will then be able to install apps to your headset and open them from the launcher. You can
|
||||
find it in the side menu of the library under the Unknown Sources section called
|
||||
<span class="chip">SideQuest - TV</span> and <span class="chip">SideQuest - Home</span>. This will show you all the apps on the device even hidden
|
||||
ones you would otherwise not see.
|
||||
</div><br>
|
||||
<span class="chip" *ngIf="isExpanseInstalled()">The Expanse VR Installed!</span>
|
||||
<app-loading-spinner-small *ngIf="isInstallingExpanse"></app-loading-spinner-small>
|
||||
<div class="waves-effect waves-light btn pink-button button-dark-theme"
|
||||
*ngIf="!isInstalledExpanse&&!isInstallingExpanse"
|
||||
[ngClass]="{'waves-dark':true,'waves-light':false}"
|
||||
(click)="installExpanse()">
|
||||
Install Your First App - The Expanse
|
||||
</div><br><br>
|
||||
<div class="text-dark-theme">
|
||||
If you want to install your own APK files just drag and drop them over this window.
|
||||
</div>
|
||||
<div class="text-dark-theme">
|
||||
Check your antivirus hasn't blocked some parts of the ADB download - this has happened for some
|
||||
with Avast antivirus in particular. <br />If you have any problems or want to say hi drop us a
|
||||
line on discord - <app-link url="https://discord.gg/HNnDPSu" text="discord"></app-link>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear-fix"></div>
|
||||
<div class="row" style="display: none;">
|
||||
<div class="col s12">
|
||||
<div class="section-title text-dark-theme">
|
||||
App Developers Link to your apps!
|
||||
</div>
|
||||
<div style="text-align: center" class="text-dark-theme">
|
||||
Use our custom protocol to be able to install APK files, add repos and even load custom beat
|
||||
saber songs direct from your website.
|
||||
</div>
|
||||
<span
|
||||
class="chip"
|
||||
mz-tooltip
|
||||
position="right"
|
||||
tooltip="Example: sidequest://repo#https://example.com/fdroid/repo"
|
||||
>sidequest://repo#URL_OF_REPO</span
|
||||
><br />
|
||||
<span
|
||||
class="chip tooltipped"
|
||||
data-position="right"
|
||||
data-tooltip="Example: sidequest://sideload#https://example.com/file.apk"
|
||||
>sidequest://sideload#URL_OF_APK</span
|
||||
><br />
|
||||
<span
|
||||
class="chip tooltipped"
|
||||
data-position="right"
|
||||
data-tooltip="Example: sidequest://bsaber#12345-12345 or sidequest://bsaber#https://example.com/12345-12345.zip"
|
||||
>sidequest://bsaber#URL_OR_ID_OF_SONG</span
|
||||
><br />
|
||||
<br /><br />
|
||||
<div class="row">
|
||||
<div class="col s8">
|
||||
<div class="input-field inline browser-input">
|
||||
<input id="protocol_url" type="text" placeholder="Address" />
|
||||
<label class="active" for="protocol_url">Address</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-field col 4">
|
||||
<select id="protocol_type">
|
||||
<option selected>repo</option>
|
||||
<option>sideload</option>
|
||||
<option>bsaber</option>
|
||||
</select>
|
||||
<label>Link Type</label>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<a href="#" class="waves-effect waves-light btn">Copy Embed Code</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +0,0 @@
|
||||
.setup-content{
|
||||
padding: 2em;
|
||||
}
|
||||
.setup-image {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SetupComponent } from './setup.component';
|
||||
|
||||
describe('SetupComponent', () => {
|
||||
let component: SetupComponent;
|
||||
let fixture: ComponentFixture<SetupComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SetupComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SetupComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,51 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AppService } from '../app.service';
|
||||
import { AdbClientService } from '../adb-client.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-setup',
|
||||
templateUrl: './setup.component.html',
|
||||
styleUrls: ['./setup.component.scss'],
|
||||
})
|
||||
export class SetupComponent implements OnInit {
|
||||
isInstallingLauncher: boolean;
|
||||
isInstalledLauncher: boolean;
|
||||
isInstallingExpanse: boolean;
|
||||
isInstalledExpanse: boolean;
|
||||
constructor(public appService: AppService, private adbService: AdbClientService) {
|
||||
appService.webService.isWebviewOpen = false;
|
||||
this.appService.resetTop();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.appService.setTitle('Setup for Sideloading');
|
||||
}
|
||||
|
||||
isExpanseInstalled() {
|
||||
this.isInstalledExpanse = !!~this.adbService.devicePackages.indexOf('app.theexpanse.app');
|
||||
return this.isInstalledExpanse;
|
||||
}
|
||||
|
||||
isLauncherInstalled() {
|
||||
this.isInstalledLauncher =
|
||||
!!~this.adbService.devicePackages.indexOf('com.sidequest.wrapper2') &&
|
||||
!!~this.adbService.devicePackages.indexOf('com.sidequest.wrapper') &&
|
||||
!!~this.adbService.devicePackages.indexOf('com.sidequest.launcher');
|
||||
return this.isInstalledLauncher;
|
||||
}
|
||||
|
||||
installLauncher() {
|
||||
this.isInstallingLauncher = true;
|
||||
this.adbService.installAPK('https://cdn.theexpanse.app/SideQuestWrapper.apk');
|
||||
this.adbService.installAPK('https://cdn.theexpanse.app/SideQuestWrapper2.apk');
|
||||
this.adbService.installAPK('https://cdn.theexpanse.app/SideQuestLauncher.apk');
|
||||
this.isInstallingLauncher = false;
|
||||
this.isInstalledLauncher = true;
|
||||
}
|
||||
installExpanse() {
|
||||
this.isInstallingExpanse = true;
|
||||
this.adbService.installAPK('https://cdn.theexpanse.app/TheExpanse.apk');
|
||||
this.isInstallingExpanse = false;
|
||||
this.isInstalledExpanse = true;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,27 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { AppService } from './app.service';
|
||||
import { StatusBarComponent } from './status-bar/status-bar.component';
|
||||
import { Notification, StatusBarComponent, StatusType } from './status-bar/status-bar.component';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class StatusBarService {
|
||||
status: StatusBarComponent;
|
||||
hideTimeout: any;
|
||||
constructor(private appService: AppService) {}
|
||||
setStatus(status: StatusBarComponent) {
|
||||
constructor() {}
|
||||
setStatusComponent(status: StatusBarComponent) {
|
||||
this.status = status;
|
||||
}
|
||||
showStatus(message: string, isWarning?: boolean) {
|
||||
clearTimeout(this.hideTimeout);
|
||||
this.status.statusMessage = message;
|
||||
this.status.isWarning = isWarning;
|
||||
this.status.isActive = true;
|
||||
if (!isWarning) {
|
||||
this.hideTimeout = setTimeout(() => {
|
||||
this.status.isActive = false;
|
||||
}, 5000);
|
||||
}
|
||||
showStatus(message: string, isError?: boolean, isInfo?: boolean) {
|
||||
this.status.showStatus(message, isError, isInfo);
|
||||
}
|
||||
hideStatus() {
|
||||
this.status.isActive = this.status.showDiscord = false;
|
||||
this.status.isActive = false;
|
||||
}
|
||||
copyStatus() {
|
||||
this.appService.electron.clipboard.writeText(this.status.statusMessage);
|
||||
this.status.showDiscord = true;
|
||||
this.showStatus(
|
||||
'Copied to your clipboard! Please post this in our discord server in the #general channel: https://discord.gg/r38T5rR'
|
||||
);
|
||||
// this.appService.electron.clipboard.writeText(this.status.statusMessage);
|
||||
// // this.status.showDiscord = true;
|
||||
// this.showStatus(
|
||||
// 'Copied to your clipboard! Please post this in our discord server in the #general channel: https://discord.gg/r38T5rR'
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,33 @@
|
||||
<div class="status-bar" [ngClass]="{'status-bar-warning':isWarning}" *ngIf="isActive">
|
||||
<i class="material-icons right white-text cursor" (click)="statusService.hideStatus()" mz-tooltip position="top"
|
||||
tooltip="Close this status.">close</i>
|
||||
<div *ngIf="isWarning" class="right btn small-button green" (click)="getHelp.emit(statusMessage)">Get Help</div>
|
||||
<span class="status-message truncate" [innerHTML]="statusMessage | sanitizeHtml">
|
||||
|
||||
</span>
|
||||
<div class="status" [ngClass]="{'status-open': isActive}">
|
||||
<div class='sq-toast sq-toast--top-right' *ngIf="isActive && (notification.isError || notification.isSuccess)">
|
||||
<div @anim>
|
||||
<div class='sq-toast__message' [ngClass]="{
|
||||
'sq-toast__message--info': notification.isInfo,
|
||||
'sq-toast__message--success': notification.isSuccess,
|
||||
'sq-toast__message--error': notification.isError
|
||||
}">
|
||||
<div class='sq-toast__message__icon-box' [ngClass]="{
|
||||
'sq-toast__message__icon-box--info': notification.isInfo,
|
||||
'sq-toast__message__icon-box--success': notification.isSuccess,
|
||||
'sq-toast__message__icon-box--error': notification.isError
|
||||
}">
|
||||
<div class='sq-toast__message__icon-box__icon'>
|
||||
<svg *ngIf='notification.isError' width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M23.5405 16.069L14.9416 1.64366C13.6359 -0.547887 10.3666 -0.547887 9.06078 1.64366L0.459539 16.069C-0.846244 18.2606 0.785985 21 3.39997 21H20.6C23.214 21 24.8462 18.2606 23.5405 16.069ZM13.4618 17.7408C13.0797 18.0943 12.5961 18.2699 12.0085 18.2699C11.4112 18.2699 10.9203 18.0943 10.5382 17.7408C10.1562 17.3872 9.96274 16.9564 9.96274 16.446C9.96274 15.9239 10.1538 15.4954 10.5358 15.1606C10.9203 14.8257 11.4112 14.6572 12.0085 14.6572C12.6057 14.6572 13.0942 14.8257 13.4714 15.1606C13.8487 15.4954 14.0373 15.9239 14.0373 16.446C14.0373 16.9564 13.8462 17.3872 13.4618 17.7408ZM13.3554 13.6831H10.6471L9.98208 5.95183H14.0373L13.3554 13.6831Z" fill="white"/>
|
||||
</svg>
|
||||
<svg *ngIf='notification.isSuccess' width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 0C5.37378 0 0 5.37377 0 12C0 18.6262 5.37378 24 12 24C18.6289 24 24 18.6262 24 12C24 5.37377 18.6289 0 12 0ZM15.9607 12.7199L13.322 15.3586L10.6833 17.9973L8.0446 15.3586L5.40589 12.7199L8.0446 10.0812L10.6833 12.7199L13.322 10.0812L15.9607 7.44246L18.5995 10.0812L15.9607 12.7199Z" fill="white"/>
|
||||
</svg>
|
||||
<svg *ngIf='notification.isInfo' width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.9987 0C5.37317 0 0 5.37377 0 12C0 18.6262 5.37317 24 11.9987 24C18.6268 24 24 18.6262 24 12C24 5.37377 18.6268 0 11.9987 0ZM10.7838 5.47279C11.1049 5.157 11.5116 4.99911 12.0067 4.99911C12.5017 4.99911 12.9085 5.157 13.2296 5.47279C13.5533 5.78858 13.7112 6.19268 13.7112 6.68778C13.7112 7.18287 13.5507 7.58965 13.2296 7.91079C12.9085 8.23194 12.5017 8.39518 12.0067 8.39518C11.5009 8.39518 11.0915 8.23461 10.7758 7.91079C10.46 7.58965 10.3021 7.18287 10.3021 6.68778C10.2995 6.19268 10.46 5.78858 10.7838 5.47279ZM14.8886 19.0036H9.11138V16.9242H10.6607V11.5665H9.11138V9.48706H13.3527V11.5665V16.9242H14.8886V19.0036Z" fill="white"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class='sq-toast__message__text-box'>
|
||||
{{notification.isSuccess ? 'Success' : notification.isError ? 'Error' : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-bar-inner" [innerHTML]="notification.message | sanitizeHtml"></div>
|
||||
</div>
|
||||
|
||||
@@ -7,9 +7,132 @@
|
||||
left: 0;
|
||||
color: white;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.status-bar-inner{
|
||||
padding: 10px;
|
||||
padding-left: 15px;
|
||||
padding-right: 80px;
|
||||
}
|
||||
.status-bar-warning {
|
||||
background-color: #ff9800;
|
||||
}
|
||||
.status{
|
||||
background-color: #E51253;
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
bottom: -45px;
|
||||
left: 0;
|
||||
color: white;
|
||||
width: 100%;
|
||||
transition: bottom 350ms;
|
||||
}
|
||||
.status-open{
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$info-icon-background-color: rgba(114, 137, 218, 1);
|
||||
$success-icon-background-color: rgba(97, 185, 72, 1);
|
||||
$warning-icon-background-color: rgba(251, 176, 59, 1);
|
||||
$error-icon-background-color: rgba(229, 18, 83, 1);
|
||||
|
||||
$toast-text-color: rgba(255, 255, 255, 1);
|
||||
|
||||
$info-background-color: rgba(71, 98, 195, 1);
|
||||
$success-background-color: rgba(58, 137, 36, 1);
|
||||
$warning-background-color: rgba(211, 135, 15, 1);
|
||||
$error-background-color: rgba(155, 10, 54, 1);
|
||||
|
||||
$info-shadow-color: rgba(114, 137, 218, 0.4);
|
||||
$success-shadow-color: rgba(97, 185, 72, 0.4);
|
||||
$warning-shadow-color: rgba(251, 176, 59, 0.4);
|
||||
$error-shadow-color: rgba(229, 18, 83, 0.4);
|
||||
|
||||
|
||||
.sq-toast {
|
||||
position: fixed;
|
||||
min-width: 6rem;
|
||||
opacity: 0.9;
|
||||
font-family: Roboto, sans-serif;
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 14px;
|
||||
letter-spacing: 0;
|
||||
z-index: 9999;
|
||||
text-align: right;
|
||||
}
|
||||
@media (max-width: 1024px)
|
||||
{
|
||||
.sq-toast{
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
.sq-toast--top-right {
|
||||
bottom: -4px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
.sq-toast__message {
|
||||
display: inline-block;
|
||||
color: $toast-text-color;
|
||||
min-height: 42px;
|
||||
margin-left: 1em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.sq-toast__message--info {
|
||||
background-color: $info-background-color;
|
||||
box-shadow: 0 4px 10px $info-shadow-color;
|
||||
}
|
||||
.sq-toast__message--success {
|
||||
background-color: $success-background-color;
|
||||
box-shadow: 0 4px 10px $success-shadow-color;
|
||||
}
|
||||
.sq-toast__message--warning {
|
||||
background-color: $warning-background-color;
|
||||
box-shadow: 0 4px 10px $warning-shadow-color;
|
||||
}
|
||||
.sq-toast__message--error {
|
||||
background-color: $error-background-color;
|
||||
box-shadow: 0 4px 10px $error-shadow-color;
|
||||
}
|
||||
|
||||
.sq-toast__message__icon-box {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sq-toast__message__text-box {
|
||||
padding: 1.2em;
|
||||
margin-left: 3em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sq-toast__message__icon-box--info {
|
||||
background-color: $info-icon-background-color;
|
||||
}
|
||||
.sq-toast__message__icon-box--success {
|
||||
background-color: $success-icon-background-color;
|
||||
}
|
||||
.sq-toast__message__icon-box--warning {
|
||||
background-color: $warning-icon-background-color;
|
||||
}
|
||||
.sq-toast__message__icon-box--error {
|
||||
background-color: $error-icon-background-color;
|
||||
}
|
||||
|
||||
.sq-toast__message__icon-box__icon {
|
||||
font-size: 2rem;
|
||||
margin: .5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,86 @@
|
||||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { StatusBarService } from '../status-bar.service';
|
||||
import { animate, sequence, style, transition, trigger } from '@angular/animations';
|
||||
|
||||
export enum StatusType {
|
||||
INFO,
|
||||
ERROR,
|
||||
SUCCESS,
|
||||
}
|
||||
export class Notification {
|
||||
type: StatusType;
|
||||
message: string;
|
||||
get isError() {
|
||||
return this.type === StatusType.ERROR;
|
||||
}
|
||||
get isSuccess() {
|
||||
return this.type === StatusType.SUCCESS;
|
||||
}
|
||||
get isInfo() {
|
||||
return this.type === StatusType.INFO;
|
||||
}
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-status-bar',
|
||||
templateUrl: './status-bar.component.html',
|
||||
styleUrls: ['./status-bar.component.scss'],
|
||||
animations: [
|
||||
trigger('anim', [
|
||||
transition(':leave', [
|
||||
style({
|
||||
height: '*',
|
||||
opacity: '1',
|
||||
transform: 'translateX(0)',
|
||||
}),
|
||||
sequence([
|
||||
animate(
|
||||
'.1s ease',
|
||||
style({
|
||||
height: '*',
|
||||
opacity: '.2',
|
||||
transform: 'translateX(20px)',
|
||||
})
|
||||
),
|
||||
animate('.1s ease', style({ height: '0', opacity: 0, transform: 'translateX(20px)' })),
|
||||
]),
|
||||
]),
|
||||
transition(':enter', [
|
||||
style({ height: '0', opacity: '0', transform: 'translateX(20px)' }),
|
||||
sequence([
|
||||
animate(
|
||||
'.35s ease',
|
||||
style({
|
||||
height: '*',
|
||||
opacity: 1,
|
||||
transform: 'translateX(0)',
|
||||
})
|
||||
),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
],
|
||||
})
|
||||
export class StatusBarComponent implements OnInit {
|
||||
isWarning: boolean;
|
||||
isActive: boolean;
|
||||
showDiscord: boolean;
|
||||
statusMessage: string;
|
||||
@Output() getHelp = new EventEmitter();
|
||||
constructor(public statusService: StatusBarService) {}
|
||||
isActive = false;
|
||||
private timeout;
|
||||
notification: Notification = new Notification();
|
||||
constructor(public statusService: StatusBarService) {
|
||||
statusService.setStatusComponent(this);
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
showStatus(message: string, isError?: boolean, isInfo?: boolean) {
|
||||
clearTimeout(this.timeout);
|
||||
this.notification.message = message;
|
||||
this.notification.type = isError ? StatusType.ERROR : isInfo ? StatusType.INFO : StatusType.SUCCESS;
|
||||
this.isActive = true;
|
||||
this.timeout = setTimeout(
|
||||
() => {
|
||||
this.isActive = false;
|
||||
},
|
||||
this.notification.isError ? 7500 : 3500
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AppService } from '../app.service';
|
||||
import { AdbClientService } from '../adb-client.service';
|
||||
import { StatusBarService } from '../status-bar.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-stream-options',
|
||||
@@ -19,7 +20,7 @@ export class StreamOptionsComponent implements OnInit {
|
||||
device: '',
|
||||
};
|
||||
osPlatform: string;
|
||||
constructor(public appService: AppService, private adbService: AdbClientService) {
|
||||
constructor(public appService: AppService, private adbService: AdbClientService, private statusService: StatusBarService) {
|
||||
appService.webService.isWebviewOpen = false;
|
||||
appService.resetTop();
|
||||
this.osPlatform = this.appService.os.platform();
|
||||
@@ -29,8 +30,9 @@ export class StreamOptionsComponent implements OnInit {
|
||||
|
||||
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));
|
||||
this.appService
|
||||
.runScrCpy(this.scrcpy_options)
|
||||
.then(() => this.statusService.showStatus('Stream closed.'))
|
||||
.catch(e => this.statusService.showStatus('ScrCpy Error: ' + JSON.stringify(e), true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AdbClientService, ConnectionStatus } from '../adb-client.service';
|
||||
import { AppService } from '../app.service';
|
||||
import { StatusBarService } from '../status-bar.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-wireless-connection',
|
||||
@@ -8,7 +9,7 @@ import { AppService } from '../app.service';
|
||||
styleUrls: ['./wireless-connection.component.scss'],
|
||||
})
|
||||
export class WirelessConnectionComponent implements OnInit {
|
||||
constructor(public adbService: AdbClientService, appService: AppService) {
|
||||
constructor(public adbService: AdbClientService, appService: AppService, private statusService: StatusBarService) {
|
||||
appService.webService.isWebviewOpen = false;
|
||||
appService.resetTop();
|
||||
}
|
||||
@@ -16,7 +17,9 @@ export class WirelessConnectionComponent implements OnInit {
|
||||
ngOnInit() {}
|
||||
|
||||
connectWifi() {
|
||||
this.adbService.deviceStatusMessage = 'Attempting wifi connection...';
|
||||
let status = 'Attempting wifi connection...';
|
||||
this.statusService.showStatus(status, false, true);
|
||||
this.adbService.deviceStatusMessage = status;
|
||||
((this.adbService.isReady ? this.adbService.runAdbCommand('adb tcpip 5555') : Promise.resolve()) as any).then(() => {
|
||||
setTimeout(() => {
|
||||
this.adbService.runAdbCommand('adb connect ' + this.adbService.deviceIp + ':5555');
|
||||
@@ -26,6 +29,7 @@ export class WirelessConnectionComponent implements OnInit {
|
||||
|
||||
reset() {
|
||||
this.adbService.runAdbCommand('adb disconnect');
|
||||
this.statusService.showStatus('Resetting ADB connection...', false, true);
|
||||
}
|
||||
|
||||
isConnected() {
|
||||
|
||||
@@ -818,3 +818,24 @@ input[type=checkbox]:not(:disabled).tabbed:focus ~ .lever::before {
|
||||
background-color: #afafaf;
|
||||
border-color: #8f8f8f;
|
||||
}
|
||||
|
||||
$switch-bg-color: #E51253 !default;
|
||||
$switch-checked-lever-bg: desaturate(lighten($switch-bg-color, 25%), 25%) !default;
|
||||
|
||||
.switch label input[type=checkbox] {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
|
||||
&:checked + .lever {
|
||||
background-color: $switch-checked-lever-bg!important;
|
||||
|
||||
&:before, &:after {
|
||||
left: 18px;
|
||||
}
|
||||
|
||||
&:after {
|
||||
background-color: $switch-bg-color!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user