added get help screen

This commit is contained in:
Shane Harris
2022-07-06 08:40:41 +02:00
parent de72146f34
commit e0450b3450
9 changed files with 52 additions and 8 deletions
+24 -2
View File
@@ -12,6 +12,7 @@ export enum ConnectionStatus {
CONNECTED,
OFFLINE,
UNAUTHORIZED,
DEV_MODE,
DISCONNECTED,
LINUX_PERMS,
}
@@ -82,6 +83,7 @@ export class AdbClientService {
'connection-status-unauthorized': this.deviceStatus === ConnectionStatus.UNAUTHORIZED,
'connection-status-disconnected': this.deviceStatus === ConnectionStatus.DISCONNECTED,
'connection-status-too-many': this.deviceStatus === ConnectionStatus.LINUX_PERMS,
'connection-status-dev-mode': this.deviceStatus === ConnectionStatus.DEV_MODE,
};
}
@@ -287,7 +289,16 @@ export class AdbClientService {
}
getConnectedStatus() {
if (!this.devices.length) {
return ConnectionStatus.DISCONNECTED;
if (
this.diagnostics &&
this.diagnostics.usb &&
!this.diagnostics.usb.is_dev_mode_enabled &&
this.diagnostics.usb.is_connected
) {
return ConnectionStatus.DEV_MODE;
} else {
return ConnectionStatus.DISCONNECTED;
}
} else {
if (!this.deviceSerial) {
let readyDevice = this.devices.filter(d => d.type === 'device');
@@ -313,6 +324,7 @@ export class AdbClientService {
}
async updateConnectedStatus() {
this.diagBegin();
this.deviceStatus = this.getConnectedStatus();
this.setConnectionCssClass();
for (let i = 0; i < this.devices.length; i++) {
@@ -320,7 +332,6 @@ export class AdbClientService {
}
this.displayDevices = this.devices;
document.getElementById('connection-status').className = 'connection-status-' + status;
this.diagBegin();
switch (this.deviceStatus) {
case ConnectionStatus.LINUX_PERMS:
this.deviceStatusMessage = 'Warning: no permissions. ADB udev rules missing.';
@@ -378,6 +389,17 @@ export class AdbClientService {
this.deviceIp
: '');
break;
case ConnectionStatus.DEV_MODE:
this.deviceStatusMessage =
'Dev Mode: Enable dev mode in the Oculus phone app. ' +
(this.deviceIp
? ' <i mz-tooltip class="material-icons white-text top-menu-bar-icon vertical-align"' +
' position="bottom" tooltip="Battery">' +
' wifi' +
' </i> ' +
this.deviceIp
: '');
break;
}
}
+4
View File
@@ -27,6 +27,8 @@ import { CurrentTasksComponent } from './current-tasks/current-tasks.component';
import { CurrentTaskItemComponent } from './current-task-item/current-task-item.component';
import { VirtualScrollerModule } from 'ngx-virtual-scroller';
import { HeadsetSettingsComponent } from './headset-settings/headset-settings.component';
import { SetupGuideComponent } from './setup-guide/setup-guide.component';
import { ConnectionStatusComponent } from './connection-status/connection-status.component';
@NgModule({
declarations: [
AppComponent,
@@ -46,6 +48,8 @@ import { HeadsetSettingsComponent } from './headset-settings/headset-settings.co
CurrentTasksComponent,
CurrentTaskItemComponent,
HeadsetSettingsComponent,
SetupGuideComponent,
ConnectionStatusComponent,
],
imports: [
BrowserModule,
+3 -1
View File
@@ -5,13 +5,15 @@ import { WebviewComponent } from './webview/webview.component';
import { FilesComponent } from './files/files.component';
import { CurrentTasksComponent } from './current-tasks/current-tasks.component';
import { HeadsetSettingsComponent } from './headset-settings/headset-settings.component';
import { SetupGuideComponent } from './setup-guide/setup-guide.component';
export const AppRoutes: Routes = [
{ path: 'setup', component: SetupComponent },
// { path: 'setup', component: SetupComponent },
{ path: 'tasks', component: CurrentTasksComponent },
{ path: 'packages', component: PackagesComponent },
{ path: 'packages/:packageName', component: PackagesComponent },
{ path: 'tools', component: HeadsetSettingsComponent },
{ path: 'setup', component: SetupGuideComponent },
{ path: 'webview', component: WebviewComponent },
{ path: 'device-files', component: FilesComponent },
{ path: '**', component: WebviewComponent },
+1
View File
@@ -26,6 +26,7 @@ export class AppService {
showTaskActions: boolean;
updateAvailable: boolean;
showRepo: boolean;
isSetupOpen: boolean;
isFilesOpen: boolean;
isPackagesOpen: boolean;
isSettingsOpen: boolean;
@@ -85,6 +85,7 @@
<!-- (click)="userMenu.style.display = 'none';userMenuBack.style.display = 'none';logcatModal.openModal()"><i-->
<!-- class="material-icons left">input</i>ADB Logcat</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>
@@ -173,8 +174,11 @@
position="bottom" tooltip="Select Device">
arrow_drop_down
</i>
<app-link class="waves-effect waves-light btn-flat update-available get-help link small-button warning left" *ngIf="!adbService.isReady"
text="Get Help" routerLink="/setup"></app-link>
<div id="connection-status" class="connection-status-unauthorized left" mz-tooltip
position="bottom" [ngClass]="adbService.connectionCss" [tooltip]="adbService.lastErrorMessage||'Device connection status.'">
<div id="connection-status-message" [innerHTML]="appService.versionName+'&nbsp;&nbsp;'+adbService.deviceStatusMessage"></div>
</div>
</div>
@@ -198,6 +202,8 @@
<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.isSetupOpen">Setup your headset with SideQuest.</div>
<div class="apk-install" *ngIf="appService.isTasksOpen">Manage tasks for installing, <br>downloading and uploading
from your headset.</div>
</div>
@@ -567,9 +573,9 @@
</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 margin-right" mz-modal-close (click)="runscrcpy()">Start Stream</button>
<button mz-button class="pink-button margin-right" mz-modal-close (click)="appService.opn('https://www.oculus.com/casting')">Oculus Casting</button>
<button mz-button [flat]="true" mz-modal-close>Close</button>
<button mz-button [flat]="true" class="footer-margin-right" mz-modal-close>Close</button>
<button mz-button class="pink-button footer-margin-right" mz-modal-close (click)="runscrcpy()">Start Stream</button>
<button mz-button class="pink-button" mz-modal-close (click)="appService.opn('https://www.oculus.com/casting')">Oculus Casting</button>
</mz-modal-footer>
</mz-modal>
@@ -201,7 +201,7 @@ virtual-scroller{
.connection-status-connected {
background-color: #4caf50;
}
.connection-status-unauthorized {
.connection-status-unauthorized, .connection-status-dev-mode {
background-color: #ff9800;
}
.connection-status-disconnected {
@@ -439,6 +439,9 @@ virtual-scroller{
text-decoration: none;
animation: glowing 1500ms infinite;
}
.get-help{
margin-top: -2px;
}
@-webkit-keyframes glowing {
0% {
@@ -454,3 +457,6 @@ virtual-scroller{
-webkit-box-shadow: 0 0 3px #b20000;
}
}
.footer-margin-right{
margin-right: 1em!important;
}
@@ -40,6 +40,7 @@ export class HeaderComponent implements OnInit {
@ViewChild('beatOnModal', { static: false }) beatOnModal;
@ViewChild('mainLogo', { static: false }) mainLogo;
@ViewChild('safeModal', { static: false }) safeModal;
ConnectionStatus = ConnectionStatus;
folder = FolderType;
isAlive = true;
replaceText: ReplaceText[] = [];
@@ -5,7 +5,7 @@
You are not currently connected.
</ng-container>
<br><br>
<button class="pure-material-button-contained" (click)="close.emit()">Back to Main Screen</button>
<button class="pure-material-button-contained" routerLink="/setup">Open Setup</button>
</div>
<ng-container *ngIf="adbService.isReady">
<h3 class="section-title">MTP ( Media Transfer Protocol )</h3>
+2
View File
@@ -164,6 +164,8 @@ body{
.link-white {
color: lightcyan;
cursor: pointer;
}
.link-white:hover{
text-decoration: underline;
}
.inline{