diff --git a/desktop-app/src/app/app.component.ts b/desktop-app/src/app/app.component.ts
index 9a0741b..87ab539 100644
--- a/desktop-app/src/app/app.component.ts
+++ b/desktop-app/src/app/app.component.ts
@@ -1,4 +1,4 @@
-import { Component, isDevMode, ViewChild } from '@angular/core';
+import { AfterViewInit, Component, isDevMode, OnInit, ViewChild } from '@angular/core';
import { AppService } from './app.service';
import { LoadingSpinnerService } from './loading-spinner.service';
import { StatusBarService } from './status-bar.service';
@@ -11,11 +11,12 @@ import { AdbClientService } from './adb-client.service';
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
-export class AppComponent {
+export class AppComponent implements OnInit, AfterViewInit {
@ViewChild('spinner', { static: false }) spinner;
@ViewChild('status', { static: false }) status;
@ViewChild('webview', { static: false }) webview;
helpStatus: string;
+ extraHelpStatus: string;
devMode: boolean;
constructor(
private spinnerService: LoadingSpinnerService,
@@ -31,7 +32,7 @@ export class AppComponent {
ngOnInit() {
this.adbService
.setupAdb()
- .then(() => this.appService.downloadScrCpyBinary())
+ .then(() => this.appService.downloadScrCpyBinary(this.adbService))
.then(() => this.adbService.connectedStatus())
.then(() => {
if (!localStorage.getItem('first_run')) {
@@ -40,7 +41,6 @@ export class AppComponent {
'Thanks for downloading SideQuest! Please click "Setup" on the top menu to begin and then "Sign Up" to get app updates, remote installing and more!'
);
}
-
this.dragService.setupDragAndDrop(this.webview.nativeElement);
});
}
@@ -49,4 +49,27 @@ export class AppComponent {
this.statusService.setStatus(this.status);
this.webService.setWebView(this.webview.nativeElement);
}
+ setExterHelp() {
+ let uninstall_instructions = `
+
+
+
+

+
+
+
+ SOLUTION: You may be able to resolve this issue by uninstalling the app first.
Click the apps icon at the top, then click the settings icon beside this app and finally click "Uninstall". You can then try to install this app again.
+
+
+
+
`;
+ switch (true) {
+ case this.helpStatus.indexOf('INSTALL_FAILED_UPDATE_INCOMPATIBLE') > -1:
+ this.extraHelpStatus = uninstall_instructions;
+ break;
+ default:
+ this.extraHelpStatus = null;
+ break;
+ }
+ }
}
diff --git a/desktop-app/src/app/app.service.ts b/desktop-app/src/app/app.service.ts
index 7180c4d..9cb6877 100644
--- a/desktop-app/src/app/app.service.ts
+++ b/desktop-app/src/app/app.service.ts
@@ -363,7 +363,7 @@ export class AppService {
}
}
- downloadScrCpyBinary() {
+ downloadScrCpyBinary(adbClientService) {
if (this.os.platform() === 'win32') {
this.spinnerService.showLoader();
let task = { status: 'Downloading/Extracting ScrCpy...' };
@@ -399,7 +399,7 @@ export class AppService {
});
});
} else {
- this.scrcpyBinaryPath = 'scrcpy';
+ this.scrcpyBinaryPath = ' ADB=' + adbClientService.adbPath + ' scrcpy';
}
}
deleteFolderRecursive(path) {
diff --git a/desktop-app/src/app/files/files.component.ts b/desktop-app/src/app/files/files.component.ts
index 86e38cd..238420c 100644
--- a/desktop-app/src/app/files/files.component.ts
+++ b/desktop-app/src/app/files/files.component.ts
@@ -152,19 +152,22 @@ export class FilesComponent implements OnInit {
Math.round((stats.bytesTransferred / 1024 / 1024) * 100) / 100 +
'MB';
})
- .then(() => setTimeout(() => this.uploadFile(files, task), 500));
+ .then(() => {
+ return new Promise(resolve => {
+ setTimeout(() => this.uploadFile(files, task).then(() => resolve()), 500);
+ });
+ });
}
uploadFilesFromList(files: string[]) {
if (files !== undefined && files.length) {
return this.processService.addItem('restore_files', async task => {
task.status = 'Starting Upload to ' + this.currentPath;
- this.uploadFile(files, task)
+ return this.uploadFile(files, task)
.then(() => {
setTimeout(() => {
this.open(this.currentPath);
- task.status = 'Upload complete! ' + this.currentPath;
- this.statusService.showStatus('Files/Folders uploaded successfully!');
}, 1500);
+ task.status = 'Upload complete!';
})
.catch(e => this.statusService.showStatus(e.toString(), true));
});
diff --git a/desktop-app/src/app/tools/tools.component.html b/desktop-app/src/app/tools/tools.component.html
index fbae355..d0508d2 100644
--- a/desktop-app/src/app/tools/tools.component.html
+++ b/desktop-app/src/app/tools/tools.component.html
@@ -68,7 +68,18 @@
(click)="setGuardian(GU.OFF)">OFF
-
+