Rebase to master when repo went private

This commit is contained in:
Your Name
2020-08-17 13:31:05 +01:00
commit fe20b27432
345 changed files with 28876 additions and 0 deletions
@@ -0,0 +1,440 @@
#connection-refresh,
#connection-refresh-loading {
display: none;
}
.title-menu-container{
position: absolute;
top: 5px;
right: 0px;
-webkit-app-region: no-drag;
vertical-align: middle;
z-index: 999;
}
.title-menu-container i{
margin-right: 10px;
cursor: pointer;
}
#device-settings {
font-size: 1.2rem;
vertical-align:top;
margin-top: 4px;
}
.browser-input {
width: calc(100% - 200px);
display: inline-block;
margin-right: 13px;
margin-left: 13px
}
.margin-left{
margin-left: 1em;
}
.pointer{
cursor: pointer;
}
.process-badge{
border-radius: 4px;
padding: 0 3px;
color: white;
display: inline-block;
margin-right: 10px;
margin-left: -36px;
vertical-align: super;
width: 29px;
text-align: center;
cursor: pointer;
}
#browser-bar {
position: absolute;
top: 65px;
left: 400px;
width: calc(100% - 487px);
-webkit-app-region: no-drag;
}
.synthrideerz{
width: 40px;
height: 40px;
border-radius: 50%;
}
.topper{
background: #202225;
height: 35px;
width: 100%;
-webkit-app-region: drag;
}
.logo img{
height: 90px;
position:absolute;
top: 55px;
left: 20px;
transition: 0.35s;
}
#nav-mobile{
margin-left: 60px;
}
.top-banner{
background: #100e11 url(../../assets/images/TopBack.png) bottom right no-repeat;
background-size: cover;
height: 170px;
width: 100%;
border-bottom: 1px solid #8f8f8f;
transition: 0.35s;
}
.spider-image{
margin-top: 50px;
margin-left: -17px;
position: relative;
z-index: 99999;
}
.over-menu{
position:absolute;
top: 20px;
left: 20px;
}
.top-buttons{
position: absolute;
top: 120px;
left: 120px;
}
.header {
height: 205px;
/*background: #312249 url(../../assets/images/bg-header.png) left bottom no-repeat;*/
position: relative;
-webkit-user-select: none;
border-top-right-radius: 12px;
border-top-left-radius: 12px;
/*overflow:hidden;*/
}
.header-title{
position:absolute;
top: 40px;
left: 115px;
font-size: 2.5rem;
margin-top: 0.4em;
margin-left: 1em;
color: #ffffff;
font-family: 'PT Sans', sans-serif;
}
.apk-install {
font-size: 0.9rem;
position: absolute;
top: 150px;
left: 140px;
color: #ffffff;
font-family: 'PT Sans', sans-serif;
-webkit-app-region: no-drag;
}
.filter {
width: 200px;
}
.filters {
position: absolute;
top: 60px;
left: 60px;
-webkit-app-region: no-drag;
}
.search {
position: absolute;
top: 60px;
right: -10px;
-webkit-app-region: no-drag;
}
.search-box {
width: 400px;
}
.search-button-margin {
margin-right: 2em;
margin-left: 1em;
}
.content-section {
border: 1px solid #dde1e2;
background: white;
}
.content-section-header {
border-bottom: 1px solid #dde1e2;
padding: 1em 2em;
font-size: 1.2em;
font-weight: bold;
text-transform: capitalize;
height: 60px;
}
.content-section-inner {
padding: 1em;
}
.content-padding {
padding: 2em;
}
#connection-status-message {
text-align: left;
white-space: nowrap;
float: left;
margin-left: 30px;
margin-top: -2px;
color: white;
}
#connection-status-container{
position: absolute;
left: 10px;
top: 8px;
-webkit-app-region: no-drag;
}
.connection-device-select{
vertical-align: top;
}
#connection-status {
width: 20px;
height: 20px;
border-radius: 10px;
display: inline-block;
}
.connection-status-connected {
background-color: #4caf50;
}
.connection-status-unauthorized {
background-color: #ff9800;
}
.connection-status-disconnected {
background-color: #f44336;
}
.connection-status-too-many {
background-color: #9c27b0;
}
.beast-saber-buttons{
width: calc(100% - 500px);
}
.add-repo,
.sync-songs,
.sync-songs-now,
.beast-saber-buttons,
.back-webserver{
position: absolute;
top: 115px;
right: 120px;
text-decoration:none;
-webkit-app-region: no-drag;
}
.update-available {
margin-top: -16px;
margin-right: 10px;
}
.sync-songs{
right: 15px;
}
.fixed-height{
height: 120px;
}
.sync-songs-now,.beast-saber-buttons {
top: 83px;
right: 73px;
text-align: right;
}
.beaton-icon{
height: 22px;
margin-right: 8px;
cursor: pointer;
vertical-align: initial;
}
.update-repo,
.delete-repo,
.restore-backup {
padding-top: 4px;
}
.edit-repo {
font-size: 14px;
}
.browser-loading {
transform: scale(0.3);
}
.bookmark{
margin-right: 15px;
margin-bottom: 15px;
}
.logo {
background: transparent url('../../assets/images/score-logo.png') center center no-repeat;
background-size: 110px 110px;
width: 135px;
height: 150px;
-webkit-user-select: none;
cursor: pointer;
border-top-left-radius: 5px;
-webkit-app-region: no-drag;
}
.top-dnd-backing{
position:absolute;
width: 100%;
height: 200px;
}
.padding-top{
padding-top: 2em;
}
.drop-message{
position:absolute;
top: 16px;
left: 16px;
width: 300px;
height: 120px;
z-index: 9999;
}
.top-menu-bar-icon-down{
display: none;
}
.user-menu-back{
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
z-index: 998;
display:none;
}
.user-menu{
position: absolute;
top: 25px;
right: 240px;
width: 220px;
z-index: 999;
overflow: hidden;
transition: height 250ms;
background: #4e555b;
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 3px;
display: none;
}
.browser-menu{
right: 400px;
}
.device-menu{
right: initial;
left: 16px;
width: 300px;
}
.code{
}
.command-menu{
width: 240px;
}
.smaller-menu{
top: 44px;
}
.top-badge{
position: absolute;
top: 40px;
right: 42px;
}
.smaller-badge{
top: 20px;
right: 38px;
}
.smaller-buttons-avatar{
margin-top: 2px;
}
.avatar-menu{
width: 50px;
height: 50px;
display: inline-block;
border-radius: 20px;
vertical-align: middle;
border: 3px solid #312249;
}
.smaller-buttons-avatar .avatar-menu{
width: 40px;
height: 40px;
}
.avatar-menu-margin{
margin-right: 16px;
}
.top-buttons-avatar{
margin-top: 20px;
position: relative;
z-index: 2;
}
.fav-manage-icon{
font-size: 2.5rem;
}
.drag-indicator, .delete-button{
position: absolute;
left: -20px;
top: 5px;
font-size: 2rem;
cursor: pointer;
}
.delete-button{
left: initial;
right: -20px;
}
.fav-padding{
margin-left: 20px;
margin-right: 20px;
margin-bottom: 0;
}
.logcat-block{
height: 520px;
overflow: auto;
}
.logcat-small{
font-size: 0.9rem;
}
.logcat-smaller{
font-size: 0.7rem;
}
.browser-menu-image{
width: 22px;
height: 22px;
vertical-align: text-top;
margin-right: 15px;
margin-top: 8px;
}
@media only screen and (max-width: 1023px){
.top-menu-bar-icon {
display: none;
}
.browser-menu {
right: 25px;
}
.top-menu-bar-icon-down{
display: inline-block;
font-size: 1.8rem;
}
}
.warning {
height: 35px;
background-color: #004a7f;
-webkit-border-radius: 4px;
border-radius: 4px;
border: none;
color: #ffffff;
cursor: pointer;
display: inline-block;
font-family: Arial;
font-size: 14px;
padding: 5px 10px;
text-align: center;
text-decoration: none;
animation: glowing 1500ms infinite;
}
@-webkit-keyframes glowing {
0% {
background-color: #b20000;
-webkit-box-shadow: 0 0 3px #b20000;
}
50% {
background-color: #ff0000;
-webkit-box-shadow: 0 0 40px #ff0000;
}
100% {
background-color: #b20000;
-webkit-box-shadow: 0 0 3px #b20000;
}
}
@@ -0,0 +1,624 @@
<div class="header">
<div class="top-dnd-backing">
<div class="topper"></div>
<div class="top-banner">
<div>
<!--<div class="header-title">SideQuest</div>-->
<!--<div class="apk-install">Make it your own</div>-->
<a href="#/" class="logo">
<!--<img src="assets/images/logo-large icony.png"/>-->
<img src="assets/images/new-logo.png" />
<!--<img class="spider-image" src="https://i.giphy.com/media/V3sjIPOXgP5Zu/giphy.webp"/>-->
</a>
</div>
<div class="top-buttons hide-on-med-and-down">
</div>
<div class="well well-lg drop-message center-align" *ngIf="dragAndDropService.isDragging">
<h5>Drop file(s) here!</h5>
<br />
<span class="spinner-loading-message" [innerHTML]="dragAndDropService.message"></span>
</div>
<!--<div class="logo no-outline" (click)="webService.webView.loadURL('http://localhost:4201');" routerLink="webview"></div>-->
<!--<div class="header-title" #header><img src="assets/images/logo-textual.png" class="responsive-img"/></div>-->
<!--<div class="apk-install">Drag and drop your APK/OBB files <br>over this message to install!</div>-->
<div class="apk-install" *ngIf="appService.isFilesOpen">Manage the files on your headset.<br>Drag and drop to move
files onto your headset.</div>
<div class="apk-install" *ngIf="appService.isPackagesOpen">Manage the apps on your headset.<br>Click Show All to
see all apps including system apps.</div>
<div class="apk-install" *ngIf="appService.isSettingsOpen">Manage settings on your headset.</div>
<div class="apk-install" *ngIf="appService.isTasksOpen">Manage tasks for installing, <br>downloading and uploading
from your headset.</div>
<!--<div class="apk-install" *ngIf="appService.showCustomActions">Special thanks to-->
<!--<app-link url="https://github.com/trishume/QuestSaberPatch" text="@trishume"></app-link>,-->
<!--<app-link url="https://github.com/ATechAdventurer" text="@ATechAdventurer"></app-link>,<br>-->
<!--<app-link url="https://www.reddit.com/u/drewbaumann/" text="@drewbaumann"></app-link>,-->
<!--<app-link url="https://www.reddit.com/u/motokochan/" text="@motokochan"></app-link>-->
<!--and of course-->
<!--<app-link url="https://bsaber.com/members/elliotttate/" text="@elliotttate"></app-link>-->
<!--for beat saber efforts.-->
<!--</div>-->
</div>
<div class="user-menu-back" (click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none'"
#userMenuBack></div>
<div class="user-menu-back" (click)="browserMenu.style.display = 'none';browserMenuBack.style.display = 'none'"
#browserMenuBack></div>
<div class="user-menu-back" (click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none'"
#commandMenuBack></div>
<div class="user-menu-back" (click)="deviceMenu.style.display = 'none';deviceMenuBack.style.display = 'none'"
#deviceMenuBack></div>
<div class="user-menu device-menu" #deviceMenu>
<ng-container *ngFor="let device of adbService.displayDevices">
<div class="btn-flat waves-light waves-light full-width center-align white-text truncate"
(click)="deviceMenu.style.display = 'none';deviceMenuBack.style.display = 'none';adbService.deviceSerial = device.id;adbService.updateConnectedStatus()"
>[{{device.id}}] {{device.deviceName}}</div><br>
</ng-container>
</div>
<div class="title-menu-container">
<!--<img mz-tooltip-->
<!--(click)="openBeatOn()"-->
<!--class="material-icons no-outline beaton-icon"-->
<!--src="{{beatonService.beatOnEnabled?'assets/images/beaton.png':'assets/images/beatoff.png'}}"-->
<!--position="bottom" tooltip="BeatOn mods & custom songs on Beat Saber"/>-->
<div class="user-menu command-menu" #commandMenu>
<div class="btn-flat waves-light waves-light full-width center-align white-text truncate"
(click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none';adbModal.openModal()"
><i class="material-icons left">input</i>Custom Command</div><br>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none';favoriteType = 'commandFavourites';favouriteMax = 20;favoritePathType = 'Command';manageFavs.openModal()"
><i class="material-icons left">edit</i>Manage</div><br>
<div class="btn-flat waves-light waves-light full-width center-align white-text truncate"
(click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none';logcatModal.openModal()"
><i class="material-icons left">toc</i>Logcat</div><br>
<ng-container *ngFor="let favourite of favourites.commandFavourites">
<div class="btn-flat waves-light waves-light full-width center-align white-text truncate"
(click)="commandMenu.style.display = 'none';commandMenuBack.style.display = 'none';adbService.runAdbCommand(favourite.uri); adbModal.openModal()"
><img *ngIf="favourite.icon" class="left browser-menu-image" src="{{favourite.icon}}"/>{{favourite.name}}</div><br>
</ng-container>
</div>
<div class="user-menu browser-menu" #browserMenu>
<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('https://sidequestvr.com')"
routerLink="/webview"><i class="material-icons left">home</i>Home</div><br>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="browserMenu.style.display = 'none';browserMenuBack.style.display = 'none';bookmarksModal.openModal()"
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"
(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>
<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">
<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)"
routerLink="/webview"><img *ngIf="favourite.icon" class="left browser-menu-image" src="{{favourite.icon}}"/>{{favourite.name}}</div><br>
</ng-container>
</div>
<div class="user-menu" #userMenu>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';webService.loadUrl('https://sidequestvr.com')"
routerLink="/webview"><i class="material-icons left">home</i>Home</div><br>
<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';selectAppToInstall()"><i
class="material-icons left">archive</i>Select APK</div>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';" routerLink="/device-files"><i
class="material-icons left">folder</i>File Explorer</div>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';" routerLink="packages"><i
class="material-icons left">apps</i>My Apps</div>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';" routerLink="tools"><i
class="material-icons left">build</i>Tools</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 class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';logcatModal.openModal()"><i
class="material-icons left">input</i>ADB Logcat</div>
<div class="btn-flat waves-light waves-light full-width center-align white-text"
(click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';openDebugger()"><i
class="material-icons left">bug_report</i>Debugger</div>
<div class="btn-flat waves-light waves-light full-width center-align white-text" routerLink="webview"
(click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';webService.loadUrl('http://tee.pub/lic/L295azlpJYk')">
<i class="material-icons left">storefront</i>GiftShop</div>
</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>
<i mz-tooltip class="material-icons white-text no-outline top-menu-bar-icon-down" position="bottom" tooltip="Menu"
(click)="userMenu.style.display = 'block';userMenuBack.style.display = 'block'">
arrow_drop_down
</i>
<i mz-tooltip routerLink="/webview" (click)="webService.back()"
class="material-icons white-text no-outline" position="bottom" tooltip="Back">
arrow_back
</i>
<i mz-tooltip *ngIf="!webService.isWebviewLoading" (click)="browserMenu.style.display = 'block';browserMenuBack.style.display = 'block'"
class="material-icons white-text no-outline" position="bottom" tooltip="Web Browser">
public
</i>
<div mz-tooltip *ngIf="webService.isWebviewLoading" class="loader-tiny" position="bottom"
tooltip="Web Browser Loading..."></div>
<i mz-tooltip routerLink="/webview" (click)="webService.forward()"
class="material-icons white-text no-outline" position="bottom" tooltip="Forward">
arrow_forward
</i>
<i mz-tooltip *ngIf="isConnected()&&osPlatform === 'win32'" (click)="scrcpyModal.openModal();"
class="material-icons white-text no-outline top-menu-bar-icon" position="bottom"
tooltip="Stream from your headset to your PC with ScrCpy.">
live_tv
</i>
<i mz-tooltip *ngIf="adbService.deviceIp" (click)="wifiModal.openModal()"
class="material-icons no-outline top-menu-bar-icon"
[ngClass]="{'green-text':adbService.wifiEnabled,'white-text':!adbService.wifiEnabled}" position="bottom"
tooltip="Enable wireless mode. (Experimental)">
wifi
</i>
<i mz-tooltip #mainLogo (click)="selectAppToInstall()"
class="material-icons white-text no-outline top-menu-bar-icon" position="bottom"
tooltip="Install APK file from folder on computer.">
archive
</i>
<i mz-tooltip class="material-icons white-text no-outline top-menu-bar-icon" routerLink="/device-files"
position="bottom" tooltip="Manage files on the headset.">
folder
</i>
<i routerLink="packages" mz-tooltip class="material-icons white-text no-outline top-menu-bar-icon"
position="bottom" tooltip="Currently installed apps">
apps
</i>
<i routerLink="tasks" mz-tooltip class="material-icons white-text no-outline" position="bottom"
tooltip="Running {{processService.left_length}} tasks.">
playlist_add_check
</i><span routerLink="tasks" mz-tooltip *ngIf="processService.left_length" position="bottom"
tooltip="Running {{processService.left_length}} tasks."
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"
position="bottom" tooltip="{{processService.failed_length}} failed tasks."
class="process-badge pink-button red">{{processService.failed_length>100?'99+':processService.failed_length}}</span>
<i id="device-settings" routerLink="tools" mz-tooltip
class="material-icons white-text no-outline top-menu-bar-icon" position="bottom"
tooltip="Device settings & tools">
build
</i>
<i mz-tooltip (click)="commandMenu.style.display = 'block';commandMenuBack.style.display = 'block'" class="material-icons white-text no-outline top-menu-bar-icon"
position="bottom" tooltip="Run ADB commands">
input
</i>
<i (click)="openDebugger()" id="open-debugger" mz-tooltip class="material-icons white-text top-menu-bar-icon"
position="bottom" tooltip="Open debugger">
bug_report
</i>
<i (click)="minimizeApp()" mz-tooltip class="material-icons white-text no-outline" position="bottom"
tooltip="Minimize SideQuest.">
minimize
</i>
<i (click)="maximizeApp()" mz-tooltip class="material-icons white-text no-outline" position="bottom"
tooltip="Toggle Maximize.">
aspect_ratio
</i>
<i (click)="closeAppModal.openModal()" mz-tooltip class="material-icons white-text no-outline" position="bottom"
tooltip="Close SideQuest.">
close
</i>
</div>
<div id="connection-status-container">
<i mz-tooltip class="material-icons white-text no-outline connection-device-select pointer"
*ngIf="adbService.devices && adbService.devices.length > 1"
(click)="deviceMenu.style.display = 'block';deviceMenuBack.style.display = 'block'"
position="bottom" tooltip="Select Device">
arrow_drop_down
</i>
<div id="connection-status" class="connection-status-unauthorized" mz-tooltip
position="bottom" [ngClass]="adbService.connectionCss" [tooltip]="'Device connection status.'">
<div id="connection-status-message" [innerHTML]="appService.versionName+'&nbsp;&nbsp;'+adbService.deviceStatusMessage"></div>
</div>
</div>
<div *ngIf="appService.showBrowserBar" class="beast-saber-buttons">
<a class="waves-effect waves-light synthrideerz"
(click)="webService.loadUrl('https://synthriderz.com/beatmaps/recent')">
<img src="assets/images/Synth.png" class="responsive-img" /></a>&nbsp;&nbsp;&nbsp;
</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>
<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>
<mz-modal #bookmarksModal [fixedFooter]="true">
<mz-modal-header>
<h4>Web Browser</h4>
</mz-modal-header>
<mz-modal-content>
<div class="center-align">
<h5>Custom Url</h5>
<div class="input-field inline browser-input">
<input id="web_address" type="text" [(ngModel)]="webService.currentAddress" (keyup)="gogo($event)"
placeholder="Address" />
<label class="active label-dark-theme" for="web_address">
Address
</label>
</div>
<a class="waves-effect waves-dark btn search-button-margin white black-text" routerLink="/webview"
(click)="webService.loadUrl(webService.currentAddress);" mz-modal-close>Open</a>
<br><br>
</div>
</mz-modal-content>
<mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close routerLink="/webview" (click)="webService.loadUrl('https://sidequestvr.com');" >SideQuest Home</button>
<button mz-button [flat]="true" mz-modal-close>Close</button>
</mz-modal-footer>
</mz-modal>
<mz-modal #wifiModal [fixedFooter]="true">
<mz-modal-header>
<h4>Wireless</h4>
</mz-modal-header>
<mz-modal-content>
<div class="center-align">
Enable wifi mode to install apps wirelessly.<br>
<div class="chip">Experimental</div>
<br><br><br>
<i mz-tooltip class="material-icons large cursor" [ngClass]="{'green-text':adbService.wifiEnabled}"
(click)="adbService.wifiEnabled=!adbService.wifiEnabled;adbService.toggleWifiMode()" position="bottom"
tooltip="Enable wireless mode. (Experimental)">
wifi
</i>
<br>
<br>
<div>
<h5>Device IP:</h5>
{{adbService.deviceIp}}<br>
<a class="waves-effect waves-dark btn search-button-margin white black-text" mz-modal-close
(click)="connectWifi()">Connect</a>
<br><br>
<a class="waves-effect waves-dark btn search-button-margin white black-text" mz-modal-close
(click)="adbCommandToRun = 'adb disconnect';runAdbCommand()">Reset</a>
</div>
</div>
</mz-modal-content>
<mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close>Close</button>
</mz-modal-footer>
</mz-modal>
<mz-modal #logcatModal [fixedFooter]="true" [options]="{dismissible: false}">
<mz-modal-header>
<button mz-button class="right" [flat]="true" mz-modal-close (click)="stopLogcat(); currentLogCat.length = 0; isStarted = false;">Stop & Close</button>
<h4>ADB Logcat</h4>
</mz-modal-header>
<mz-modal-content>
Select your options and click start to begin receiving logcat messages.
<br><br>
<div class="button-section">
<div class="code logcat-block">
<div *ngIf="!currentLogCat.length">
{{isStarted ? 'Waiting for messages...' : 'Click start to begin streaming logcat messages.'}}
</div>
<div *ngFor="let logcat of currentLogCat">
<div class="row no-margin">
<div class="col s2 logcat-smaller green-text no-padding">{{logcat.date}}: {{priorities[logcat.priority]}}</div>
<div class="col s2 logcat-smaller purple-text no-padding">{{logcat.tid}}/{{logcat.pid}} {{logcat.tag}} </div>
<div class="col s8 logcat-small no-padding"
[ngClass]="{'red-text': logcat.priority === 6, 'orange-text': logcat.priority === 5}" [innerHTML]="logcat.message">
</div>
</div>
</div>
</div>
</div>
</mz-modal-content>
<mz-modal-footer>
<div class="row">
<div class="col s6">
<input id="logcatSearch" type="text" [(ngModel)]="logcatSearch" placeholder="Search/Tag Filter" />
</div>
<div class="col s3">
<select class="browser-default" [(ngModel)]="logcatPriority">
<option disabled>Priority</option>
<option value="unknown">unknown</option>
<option value="default">default</option>
<option value="verbose">verbose</option>
<option value="debug">debug</option>
<option value="info">info</option>
<option value="warn">warn</option>
<option value="error">error</option>
<option value="fatal">fatal</option>
<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>
</mz-modal-footer>
</mz-modal>
<mz-modal #safeModal [fixedFooter]="true">
<mz-modal-header>
<h4>Harmful Content Detected!!</h4>
</mz-modal-header>
<mz-modal-content>
<img class="right margin-left" src="assets/images/bigman.gif" style="width: 430px"/>
WARNING: We have stopped this install because it may may harm your device.
<br><br>
If you continue with the install you risk the following:<br><br>
- Causing physical damage to your headset.<br>
- Having your personal information stolen ( including tracking your movments in VR )<br>
- Being banned from the Oculus platform.<br>
- Loosing access to developer/experimental mode on your headset.<br>
- Loosing access to your content library including paid games and apps.<br>
- Being banned from creating Oculus Accounts in the future.<br>
- Being reported to the police for illegal activites.<br>
- Starving poor developers to death.<br><br>
You can click "Back to Safety" and the harmful content will not make it onto your device.
<br><br>
Thank you and have a great day!
</mz-modal-content>
<mz-modal-footer>
<button mz-button mz-modal-close [flat]="true" (click)="safeResolve('DoInstall')">Continue ( Not Recommended )</button>
<button mz-button class="pink-button" mz-modal-close (click)="safeResolve('DontInstall')">Back to Safety</button>
</mz-modal-footer>
</mz-modal>
<mz-modal #adbModal [fixedFooter]="true">
<mz-modal-header>
<h4>Run ADB Command</h4>
</mz-modal-header>
<mz-modal-content>
Run an ADB command from here to be able to see the output. Use this to troubleshoot issues or perform advanced
operations.
<br><br>
<div class="button-section">
<div class="input-field">
<input id="adbCommand" type="text" [(ngModel)]="adbCommandToRun" placeholder="Command To Run..." />
</div>
<code>
<pre *ngIf="adbService.adbResponse">{{adbService.adbResponse}}</pre>
</code>
</div>
<br>
<ng-container *ngFor="let favourite of favourites.commandFavourites">
<span class="chip margin-right pointer" (click)="adbService.runAdbCommand(favourite.uri)"><img *ngIf="favourite.icon" src="{{favourite.icon}}"/>{{favourite.name}}</span>
</ng-container>
<br><br>
</mz-modal-content>
<mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close>Close</button>
<button mz-button class="pink-button" (click)="runAdbCommand()">Run Command</button>
</mz-modal-footer>
</mz-modal>
<mz-modal #closeAppModal [fixedFooter]="true">
<mz-modal-header>
<h4>Close SideQuest</h4>
</mz-modal-header>
<mz-modal-content>
Are you sure you want to close SideQuest? This will cancel any running tasks.
</mz-modal-content>
<mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close>Cancel</button>
<button mz-button class="pink-button" mz-modal-close (click)="closeApp()">Exit SideQuest Now</button>
</mz-modal-footer>
</mz-modal>
<mz-modal #scrcpyModal [fixedFooter]="true">
<mz-modal-header>
<h4>Stream Options</h4>
</mz-modal-header>
<mz-modal-content>
<div class="row">
<div class="col s6 fixed-height">
Always On Top
<div class="grey-text small">
Make scrcpy window always on top (above other windows).
</div>
</div>
<div class="col s6 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 s6 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 s6 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 s6 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 s6 input-field fixed-height">
<input id="crop_" [(ngModel)]="scrcpy_options.crop" type="text" />
<label for="crop_" class="active">Crop</label>
</div>
<div class="col s6 fixed-height">
Fullscreen
<div class="grey-text small">
Start in fullscreen.
</div>
</div>
<div class="col s6 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 s6 fixed-height">
No Input
<div class="grey-text small">
Disable device control (mirror the device in read-only).
</div>
</div>
<div class="col s6 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 s6 fixed-height">
Max FPS
<div class="grey-text small">
Limit the frame rate of screen capture. 0 is unlimited.
</div>
</div>
<div class="col s6 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 s6 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 s6 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>
</mz-modal-content>
<mz-modal-footer>
<div class="left margin-left"><br>Put your headset on before clicking Start Stream</div>
<button mz-button class="pink-button" mz-modal-close (click)="runscrcpy()">Start Stream</button>
<button mz-button [flat]="true" mz-modal-close>Close</button>
</mz-modal-footer>
</mz-modal>
<mz-modal #manageFavs [fixedFooter]="true">
<mz-modal-header>
<button mz-button class="right pink-button" (click)="showAddFavourite = !showAddFavourite">{{showAddFavourite? 'Hide' : 'Add New'}}</button>
<h4>Manage Favourites</h4>
</mz-modal-header>
<mz-modal-content>
Manage your favourites here. If you need to undo click RESET at the bottom. When you are done click SAVE.<br><br>
<ng-container *ngIf="!favouriteImportExport">
<ng-container *ngIf="showAddFavourite"> <h5>Add New</h5>
<hr>
<div class="no-margin" *ngIf="this.favourites[favoriteType].length >= favouriteMax">
You cannot add any more. Please remove some first.
</div>
<div class="row no-margin" *ngIf="this.favourites[favoriteType].length < favouriteMax">
<div class="col s3"><input type="text" placeholder="Name" [(ngModel)]="favoriteName"/></div>
<div class="col s4"><input type="text" placeholder="{{favoritePathType}}" [(ngModel)]="favoriteUri"/></div>
<div class="col s4"><input type="text" placeholder="Icon Url" [(ngModel)]="favoriteIcon"/></div>
<div class="col s1"><i class="material-icons green-text fav-manage-icon pointer"
(click)="addToFavorites(favoriteType, favoriteName, favoriteUri, favoriteIcon)">add</i></div>
</div>
</ng-container>
<div class="row fav-padding">
<div class="col s4">Name</div>
<div class="col s4">{{favoritePathType}}</div>
<div class="col s4">Icon Url</div>
</div>
<hr>
<div class="no-margin" *ngIf="!this.favourites[favoriteType].length">
Nothing added here yet, add something below.
<br><br>
</div>
<div dragula="SONGS" [(dragulaModel)]="this.favourites[favoriteType]" >
<div class="row fav-padding relative" *ngFor="let fav of this.favourites[favoriteType]; let i = index">
<i class="material-icons drag-indicator grey-text">drag_indicator</i>
<div class="col s4"><input type="text" [(ngModel)]="fav.name"/></div>
<div class="col s4"><input type="text" [(ngModel)]="fav.uri"/></div>
<div class="col s4"><input type="text" [(ngModel)]="fav.icon"/></div>
<i class="material-icons delete-button orange-text" (click)="removeFromFavourites(favoriteType, i)">close</i>
</div>
</div>
</ng-container>
</mz-modal-content>
<mz-modal-footer>
<button mz-button [flat]="true" mz-modal-close (click)="resetFavourites(favoriteType); showAddFavourite = false;">Cancel</button>
<button mz-button class="pink-button" mz-modal-close (click)="saveFavourites(favoriteType); showAddFavourite = false;">Save</button>
</mz-modal-footer>
</mz-modal>
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HeaderComponent } from './header.component';
describe('HeaderComponent', () => {
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HeaderComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HeaderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,310 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { AdbClientService, ConnectionStatus } from '../adb-client.service';
import { AppService, FolderType } from '../app.service';
import { WebviewService } from '../webview.service';
import { LoadingSpinnerService } from '../loading-spinner.service';
import { StatusBarService } from '../status-bar.service';
import { RepoService } from '../repo.service';
import { BeatOnService } from '../beat-on.service';
import { DragAndDropService } from '../drag-and-drop.service';
import { Router } from '@angular/router';
import { ProcessBucketService } from '../process-bucket.service';
import { Subscription } from 'rxjs/Subscription';
interface ReplaceText {
key: string;
value: string;
}
declare const process;
interface FavouriteItem {
name: string;
uri: string;
icon?: string;
}
interface LogCatEntry {
date: string;
message: string;
pid: number;
tid: number;
tag: string;
priority: number;
}
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.css'],
})
export class HeaderComponent implements OnInit {
@ViewChild('header', { static: false }) header;
@ViewChild('bookmarksModal', { static: false }) bookmarksModal;
@ViewChild('beatOnModal', { static: false }) beatOnModal;
@ViewChild('mainLogo', { static: false }) mainLogo;
@ViewChild('safeModal', { static: false }) safeModal;
safeResolve: any = val => val;
folder = FolderType;
addrepoUrl: string = '';
colorA: string;
colorB: string;
beatOnLoading: boolean;
isAlive: boolean = true;
isAliveChecking: boolean = false;
replaceText: ReplaceText[] = [];
addkey: string;
addvalue: string;
adbCommandToRun: string;
osPlatform: string;
favourites: {
browserFavourites: FavouriteItem[];
fileFavourites: FavouriteItem[];
commandFavourites: FavouriteItem[];
} = {
browserFavourites: [],
fileFavourites: [],
commandFavourites: [],
};
favoriteName: string;
favoriteUri: string;
favoriteIcon: string;
favoriteType = 'fileFavourites';
favoritePathType = 'Path';
favouriteImportExport: boolean;
favouriteMax: number;
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',
};
// BAG = 'FAVS';
subs = new Subscription();
logcatTag: string = '';
logcatSearch: string = '';
logcatPriority: string = 'debug';
priorities = {
0: 'unknown',
1: 'default',
2: 'verbose',
3: 'debug',
4: 'info',
5: 'warn',
6: 'error',
7: 'fatal',
8: 'silent',
};
currentLogCat: LogCatEntry[] = [];
isStarted: boolean;
showAddFavourite: boolean;
constructor(
public adbService: AdbClientService,
public appService: AppService,
public webService: WebviewService,
public spinnerService: LoadingSpinnerService,
public statusService: StatusBarService,
public repoService: RepoService,
public beatonService: BeatOnService,
public dragAndDropService: DragAndDropService,
// private dragulaService: DragulaService,
public router: Router,
public processService: ProcessBucketService
) {
this.osPlatform = this.appService.os.platform();
this.resetFavourites('browserFavourites');
this.resetFavourites('fileFavourites');
this.resetFavourites('commandFavourites');
this.appService.headerComponent = this;
}
resetFavourites(type: string) {
let defaultFavs;
switch (type) {
case 'commandFavourites':
defaultFavs = `[
{"name":"List Devices", "uri": "adb devices", "icon": ""},
{"name":"Enable USB ADB", "uri": "adb usb", "icon": ""},
{"name":"Disconnect Everything", "uri": "adb disconnect", "icon": ""},
{"name":"Reset ADB", "uri": "adb kill-server", "icon": ""},
{"name":"Reboot Headset", "uri": "adb reboot", "icon": ""}
]`;
break;
case 'browserFavourites':
defaultFavs = '[]';
break;
case 'fileFavourites':
defaultFavs = `[
{"name":"SynthRiders", "uri": "/sdcard/Android/data/com.kluge.SynthRiders/files/CustomSongs/", "icon": "https://i.imgur.com/LjK7Z3o.png"},
{"name":"Song Beater", "uri": "/sdcard/Android/data/com.playito.songbeater/CustomSongs/", "icon": "https://i.imgur.com/dOx0OEl.png"},
{"name":"VRtuos", "uri": "/sdcard/Android/data/com.PavelMarceluch.VRtuos/files/Midis/", "icon": "https://i.imgur.com/7G0OpJi.png"},
{"name":"Audica", "uri": "/sdcard/Audica/", "icon": "https://i.imgur.com/40sUjye.png"},
{"name":"OhShape", "uri": "/sdcard/OhShape/Songs/", "icon": "https://i.imgur.com/yIu0sSQ.png"},
{"name":"Oculus", "uri": "/sdcard/Oculus/", "icon": "https://i.imgur.com/LORDvYK.png"}
]`;
}
this.favourites[type] = localStorage.getItem(type) || defaultFavs;
this.favourites[type] = JSON.parse(this.favourites[type]);
}
removeFromFavourites(type: string, index: number) {
this.favourites[type] = this.favourites[type].filter((f, i) => i !== index);
}
addToFavorites(type: string, name: string, uri: string, icon: string) {
const favourite = { name, uri, icon };
const favouriteList = this.favourites[type];
if (favouriteList) {
favouriteList.push(favourite);
}
}
saveFavourites(type: string) {
localStorage.setItem(type, JSON.stringify(this.favourites[type]));
}
ngOnInit() {}
runAdbCommand() {
return this.adbService.runAdbCommand(this.adbCommandToRun);
}
connectWifi() {
this.adbCommandToRun = 'adb tcpip 5555';
this.adbService.deviceStatusMessage = 'Attempting wifi connection...';
(this.isConnected() ? this.runAdbCommand() : Promise.resolve()).then(() => {
setTimeout(() => {
this.adbCommandToRun = 'adb connect ' + this.adbService.deviceIp + ':5555';
this.runAdbCommand();
}, 5000);
});
}
isConnected() {
return this.adbService.deviceStatus === ConnectionStatus.CONNECTED;
}
updateAvailable() {
if (process.platform == 'win32') {
this.spinnerService.setMessage('Downloading update...');
this.spinnerService.showLoader();
this.appService.electron.ipcRenderer.send('automatic-update', {});
} else {
this.appService.opn('https://sidequestvr.com/#/download');
}
}
startLogcat() {
this.currentLogCat.length = 0;
this.adbService.adbCommand(
'logcat',
{ serial: this.adbService.deviceSerial, tag: '*', priority: this.logcatPriority },
stats => {
stats.message = stats.message
.split('\n')
.join('<br>')
.split('\t')
.join('&nbsp;&nbsp;');
if (this.logcatSearch) {
if (!!~stats.message.indexOf(this.logcatSearch) || !!~stats.tag.indexOf(this.logcatSearch)) {
this.currentLogCat.unshift(stats);
}
} else {
this.currentLogCat.unshift(stats);
}
if (this.currentLogCat.length > 200) {
this.currentLogCat.length = 200;
}
}
);
}
stopLogcat() {
this.adbService.adbCommand('endLogcat');
}
runscrcpy() {
this.appService
.runScrCpy(this.scrcpy_options)
.then(() => this.statusService.showStatus('Stream closed.'))
.catch(e => this.statusService.showStatus('ScrCpy Error: ' + JSON.stringify(e), true));
}
gogo(e) {
if (e.keyCode === 13) {
this.webService.loadUrl(this.webService.currentAddress);
this.bookmarksModal.closeModal();
}
}
addCurrentFavourite() {
this.appService.request(
'https://i.olsh.me/allicons.json?url=' + this.webService.currentAddress,
(error, response, body) => {
let json: any = {};
try {
json = JSON.parse(response.body);
} catch (e) {}
this.favourites.browserFavourites.unshift({
name: this.webService.getTitle(),
uri: this.webService.currentAddress,
icon: json && json.icons && json.icons.length ? json.icons[0].url : '',
});
this.saveFavourites('browserFavourites');
}
);
}
ngAfterViewInit() {
//this.appService.setTitleEle(this.header.nativeElement);
//this.dragAndDropService.setupDragAndDrop(this.mainLogo.nativeElement);
}
closeApp() {
this.appService.remote.getCurrentWindow().close();
}
pingHeadset() {
this.isAlive = true;
}
minimizeApp() {
this.appService.remote.getCurrentWindow().minimize();
}
maximizeApp() {
const win = this.appService.remote.getCurrentWindow();
if (win.isMaximized()) {
win.unmaximize();
} else {
win.maximize();
}
}
openDebugger() {
this.appService.remote.getCurrentWindow().toggleDevTools();
}
selectAppToInstall() {
this.appService.electron.remote.dialog.showOpenDialog(
{
properties: ['openFile', 'multiSelections'],
defaultPath: this.adbService.savePath,
},
files => {
files.forEach(filepath => {
this.adbService.savePath = this.appService.path.dirname(filepath);
let install = this.adbService.installMultiFile(filepath);
if (install) {
install.catch(e => {
this.statusService.showStatus(e.toString(), true);
});
}
});
}
);
}
confirmRestore() {
this.spinnerService.showLoader();
this.spinnerService.setMessage('Restoring BMBF<br>Please Wait...');
this.beatonService.confirmRestore(this.adbService).then(r => {
this.spinnerService.hideLoader();
this.statusService.showStatus('BMBF Restored Successfully!!');
this.beatOnModal.openModal();
this.beatonService.checkHasRestore(this.adbService);
});
}
installAPK(name: string) {
return this.adbService.installAPK(this.appService.path.join(this.appService.appData, name), true, true);
}
removeText(text) {
this.replaceText = this.replaceText.filter(d => d !== text);
}
}