From 5610ab135bcb3d1d9acdb145cabbd097f9b3e7ce Mon Sep 17 00:00:00 2001 From: Drew Ansbacher Date: Tue, 14 Sep 2021 23:07:08 -0600 Subject: [PATCH] more fixes --- setup-wizard/src/app/pages/embassy/embassy.page.html | 2 +- setup-wizard/src/app/pages/embassy/embassy.page.ts | 11 +++++++++++ setup-wizard/src/app/pages/success/success.page.ts | 5 +---- setup-wizard/src/app/services/api/http.service.ts | 1 + setup-wizard/src/app/services/state.service.ts | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/setup-wizard/src/app/pages/embassy/embassy.page.html b/setup-wizard/src/app/pages/embassy/embassy.page.html index 4b8dfc74f..5cdabbf17 100644 --- a/setup-wizard/src/app/pages/embassy/embassy.page.html +++ b/setup-wizard/src/app/pages/embassy/embassy.page.html @@ -17,7 +17,7 @@

No drives found

Please connect an storage drive to your Embassy and refresh the page.

- + Refresh
diff --git a/setup-wizard/src/app/pages/embassy/embassy.page.ts b/setup-wizard/src/app/pages/embassy/embassy.page.ts index ac5c6f07a..6caef2132 100644 --- a/setup-wizard/src/app/pages/embassy/embassy.page.ts +++ b/setup-wizard/src/app/pages/embassy/embassy.page.ts @@ -27,6 +27,17 @@ export class EmbassyPage { ) { } async ngOnInit () { + await this.getDrives() + } + + async refresh () { + this.storageDrives = [] + this.selectedDrive = null + this.loading = true + await this.getDrives() + } + + async getDrives () { try { this.storageDrives = await this.apiService.getDrives() } catch (e) { diff --git a/setup-wizard/src/app/pages/success/success.page.ts b/setup-wizard/src/app/pages/success/success.page.ts index 837c35cbd..1cd94638d 100644 --- a/setup-wizard/src/app/pages/success/success.page.ts +++ b/setup-wizard/src/app/pages/success/success.page.ts @@ -10,11 +10,8 @@ import { StateService } from 'src/app/services/state.service' export class SuccessPage { constructor( public stateService: StateService, - private readonly navCtrl: NavController, private toastCtrl: ToastController - ) { - this.stateService.torAddress = 'asdfasdfasdf.onion' - } + ) { } window = window diff --git a/setup-wizard/src/app/services/api/http.service.ts b/setup-wizard/src/app/services/api/http.service.ts index 7866832e6..2979d2606 100644 --- a/setup-wizard/src/app/services/api/http.service.ts +++ b/setup-wizard/src/app/services/api/http.service.ts @@ -74,6 +74,7 @@ export class HttpService { } function RpcError (e: RPCError['error']): void { + console.log("error", e) const { code, message, data } = e this.code = code diff --git a/setup-wizard/src/app/services/state.service.ts b/setup-wizard/src/app/services/state.service.ts index 522b57def..cedcfe0e3 100644 --- a/setup-wizard/src/app/services/state.service.ts +++ b/setup-wizard/src/app/services/state.service.ts @@ -50,7 +50,7 @@ export class StateService { 'recovery-logicalname': this.recoveryDrive?.logicalname, 'recovery-password': this.recoveryPassword }) - + console.log("return", ret) return { torAddress: ret['tor-address'] } } }