SD-1177 - Redirect in VR app if they try to use the USB installer path.

This commit is contained in:
Nathanael Anderson
2024-04-11 16:15:12 -06:00
parent 2fdb8fdb95
commit f35f630b55
2 changed files with 34 additions and 5 deletions
+4 -5
View File
@@ -9,6 +9,7 @@ import { BeatOnService } from './beat-on.service';
import { SynthriderService } from './synthrider.service';
import { SongBeaterService } from './song-beater.service';
import { AudicaService } from './audica.service';
import { environment } from '../environments/environment';
@Injectable({
providedIn: 'root',
@@ -64,9 +65,7 @@ export class ElectronService {
}
async installFromToken(token) {
console.log("Install from token", token)
let res = await this.adbService.adbCommand('installFromToken', { token });
console.log("IT: res", res)
res.forEach((l, i) => {
switch (l.type) {
case 'Mod':
@@ -84,7 +83,6 @@ export class ElectronService {
setupIPC() {
this.appService.electron.ipcRenderer.on('pre-open-url', (event, data) => {
console.log('here', data);
this.spinnerService.showLoader();
this.spinnerService.setMessage('Do you want to install this file?<br><br>' + data.name);
this.spinnerService.setupConfirm().then(() => {
@@ -123,10 +121,12 @@ export class ElectronService {
}
});
this.appService.electron.ipcRenderer.on('open-url', async (event, data) => {
console.log("Open URL", data);
if (data) {
let url = data.split('#');
switch (url[0]) {
case 'sidequest://app/':
this.webviewService.loadUrl(environment.configuration.web_url + '/app/' + url[1]);
break;
case 'sidequest://w/':
this.adbService
.runAdbCommand(
@@ -146,7 +146,6 @@ export class ElectronService {
this.adbService.uninstallAPK(url[1]);
break;
case 'sidequest://sideload-multi/':
console.log("SQM", data)
try {
let urls = JSON.parse(
data