diff --git a/diagnostic-ui/README.md b/diagnostic-ui/README.md index d69bd8497..4a3deb802 100644 --- a/diagnostic-ui/README.md +++ b/diagnostic-ui/README.md @@ -22,7 +22,7 @@ v8.0.0 `cd diagnostic-ui/` -`npm --prefix . install @ionic/cli` +`npm install -g @ionic/cli` `npm --prefix . install` diff --git a/setup-wizard/README.md b/setup-wizard/README.md index 2857363c7..eea140e46 100644 --- a/setup-wizard/README.md +++ b/setup-wizard/README.md @@ -20,7 +20,7 @@ v8.0.0 `cd setup-wizard/` -`npm --prefix . install @ionic/cli` +`npm install -g @ionic/cli` `npm --prefix . install` diff --git a/setup-wizard/src/app/modals/prod-key-modal/prod-key-modal.page.html b/setup-wizard/src/app/modals/prod-key-modal/prod-key-modal.page.html index 62d14e137..23f39404b 100644 --- a/setup-wizard/src/app/modals/prod-key-modal/prod-key-modal.page.html +++ b/setup-wizard/src/app/modals/prod-key-modal/prod-key-modal.page.html @@ -1,7 +1,7 @@ - Verify Recovery Product Key + Enter Product Key @@ -10,7 +10,7 @@
-

Verify the product key for the chosen recovery drive.

+

Enter your 0.2.x Product Key to establish an encrypted connection with your new Embassy.

- Verify + Submit diff --git a/setup-wizard/src/app/pages/embassy/embassy.page.html b/setup-wizard/src/app/pages/embassy/embassy.page.html index 2088406d8..72c0125fc 100644 --- a/setup-wizard/src/app/pages/embassy/embassy.page.html +++ b/setup-wizard/src/app/pages/embassy/embassy.page.html @@ -26,8 +26,9 @@ - - + + + Refresh diff --git a/setup-wizard/src/app/pages/embassy/embassy.page.ts b/setup-wizard/src/app/pages/embassy/embassy.page.ts index 9ac45a65b..b906f05ca 100644 --- a/setup-wizard/src/app/pages/embassy/embassy.page.ts +++ b/setup-wizard/src/app/pages/embassy/embassy.page.ts @@ -46,7 +46,7 @@ export class EmbassyPage { const list = `
    ${reconnect.map(recon => `
  • ${recon}
  • `)}
` const alert = await this.alertCtrl.create({ header: 'Warning', - message: `One or more devices you connected had to be reconfigured to support the current hardware platform. Please unplug and replug in the following device(s):
${list}`, + message: `One or more devices you connected had to be reconfigured to support the current hardware platform. Please unplug and replug the following device(s), then refresh the page:
${list}`, buttons: [ { role: 'cancel', diff --git a/setup-wizard/src/app/pages/home/home.page.html b/setup-wizard/src/app/pages/home/home.page.html index 0ff1bb5c4..df3aada62 100644 --- a/setup-wizard/src/app/pages/home/home.page.html +++ b/setup-wizard/src/app/pages/home/home.page.html @@ -29,7 +29,7 @@ > Recover - Recover data from an old embassy + Restore from backup or recover an old Embassy diff --git a/setup-wizard/src/app/pages/loading/loading.page.html b/setup-wizard/src/app/pages/loading/loading.page.html index 288f0ce6a..6403854df 100644 --- a/setup-wizard/src/app/pages/loading/loading.page.html +++ b/setup-wizard/src/app/pages/loading/loading.page.html @@ -9,7 +9,7 @@ - Recovering From Backup + Recovering Progress: {{ (stateService.dataProgress * 100).toFixed(0) }}% diff --git a/setup-wizard/src/app/pages/product-key/product-key.page.html b/setup-wizard/src/app/pages/product-key/product-key.page.html index 10b2ad82f..94a2559bb 100644 --- a/setup-wizard/src/app/pages/product-key/product-key.page.html +++ b/setup-wizard/src/app/pages/product-key/product-key.page.html @@ -9,13 +9,14 @@ - Enter Product Key + Product Key + Enter your product key to establish an encrypted connection with your Embassy -

Product Key

+

- {{ is02x ? 'Embassy 0.2.x backup detected' : 'Embassy backup detected' }} + {{ is02x ? 'Embassy 0.2.x detected' : 'Embassy backup detected' }}

diff --git a/setup-wizard/src/app/pages/recover/recover.page.html b/setup-wizard/src/app/pages/recover/recover.page.html index d7b5680fd..caf762e5c 100644 --- a/setup-wizard/src/app/pages/recover/recover.page.html +++ b/setup-wizard/src/app/pages/recover/recover.page.html @@ -9,8 +9,8 @@ - Restore from Backup - Select the shared folder or physical drive containing your Embassy backup + Recover + Select the shared folder or drive containing your Embassy backup @@ -24,7 +24,7 @@

Using a shared folder is the recommended way to recover from backup, since it works with all Embassy hardware configurations. - To restore from a shared folder, please follow the instructions. + To recover from a shared folder, please follow the instructions.

@@ -42,7 +42,7 @@

Warning! Plugging in more than one physical drive to Embassy can lead to power failure and data corruption. - To restore from a physical drive, please follow the instructions. + To recover from a physical drive, please follow the instructions.

diff --git a/setup-wizard/src/app/pages/recover/recover.page.ts b/setup-wizard/src/app/pages/recover/recover.page.ts index c24ac4151..73f8a390a 100644 --- a/setup-wizard/src/app/pages/recover/recover.page.ts +++ b/setup-wizard/src/app/pages/recover/recover.page.ts @@ -1,5 +1,5 @@ import { Component, Input } from '@angular/core' -import { AlertController, LoadingController, ModalController, NavController } from '@ionic/angular' +import { AlertController, IonicSafeString, LoadingController, ModalController, NavController } from '@ionic/angular' import { CifsModal } from 'src/app/modals/cifs-modal/cifs-modal.page' import { ApiService, DiskBackupTarget } from 'src/app/services/api/api.service' import { ErrorToastService } from 'src/app/services/error-toast.service' @@ -50,6 +50,7 @@ export class RecoverPage { const drive: DiskBackupTarget = { vendor: d.vendor, model: d.model, + guid: d.guid, logicalname: p.logicalname, label: p.label, capacity: p.capacity, @@ -70,7 +71,7 @@ export class RecoverPage { const list = `
    ${reconnect.map(recon => `
  • ${recon}
  • `)}
` const alert = await this.alertCtrl.create({ header: 'Warning', - message: `One or more devices you connected had to be reconfigured to support the current hardware platform. Please unplug and replug in the following device(s), then refresh the page:
${list}`, + message: `One or more devices you connected had to be reconfigured to support the current hardware platform. Please unplug and replug the following device(s), then refresh the page:
${list}`, buttons: [ { role: 'cancel', @@ -81,11 +82,12 @@ export class RecoverPage { await alert.present() } - const importableDrive = disks.find(d => !!d.guid) + const importableDrive = this.mappedDrives.find(d => !!d.drive.guid) if (!!importableDrive && !this.hasShownGuidAlert) { + const nested = importableDrive.drive const alert = await this.alertCtrl.create({ - header: 'Embassy Drive Detected', - message: 'A valid EmbassyOS data drive has been detected. To use this drive as-is, simply click "Use Drive" below.', + header: 'Embassy Data Drive Detected', + message: new IonicSafeString(`${nested.label || nested.logicalname} (${nested.vendor || 'Unknown Vendor'} - ${nested.model || 'Unknown Model' }) contains Embassy data. To use this drive and its data as-is, click "Use Drive". This will complete the setup process.

Important. If you are trying to restore from backup or update from 0.2.x, DO NOT click "Use Drive". Instead, click "Cancel" and follow instructions.`), buttons: [ { role: 'cancel', @@ -94,7 +96,7 @@ export class RecoverPage { { text: 'Use Drive', handler: async () => { - await this.importDrive(importableDrive.guid) + await this.importDrive(nested.guid) }, }, ], diff --git a/setup-wizard/src/app/services/api/api.service.ts b/setup-wizard/src/app/services/api/api.service.ts index bd1e3f8ff..1b07e76d9 100644 --- a/setup-wizard/src/app/services/api/api.service.ts +++ b/setup-wizard/src/app/services/api/api.service.ts @@ -46,6 +46,7 @@ export interface DiskListResponse { export interface DiskBackupTarget { vendor: string | null model: string | null + guid: string | null logicalname: string | null label: string | null capacity: number diff --git a/setup-wizard/src/app/services/api/mock-api.service.ts b/setup-wizard/src/app/services/api/mock-api.service.ts index 392b01e49..a73b2edff 100644 --- a/setup-wizard/src/app/services/api/mock-api.service.ts +++ b/setup-wizard/src/app/services/api/mock-api.service.ts @@ -26,7 +26,29 @@ export class MockApiService extends ApiService { async getDrives () { await pauseFor(1000) return { - disks: [], + disks: [ + { + logicalname: 'abcd', + vendor: 'Samsung', + model: 'T5', + partitions: [ + { + logicalname: 'pabcd', + label: null, + capacity: 73264762332, + used: null, + 'embassy-os': { + version: '0.2.17', + full: true, + 'password-hash': null, + 'wrapped-key': null, + }, + } + ], + capacity: 123456789123, + guid: 'uuid-uuid-uuid-uuid', + } + ], reconnect: [], } } diff --git a/ui/README.md b/ui/README.md index 1923c389b..2ea6e62a8 100644 --- a/ui/README.md +++ b/ui/README.md @@ -22,7 +22,7 @@ v8.0.0 `cd ui/` -`npm --prefix . install @ionic/cli` +`npm install -g @ionic/cli` `npm --prefix . install` diff --git a/ui/src/app/modals/app-recover-select/app-recover-select.page.html b/ui/src/app/modals/app-recover-select/app-recover-select.page.html index 17c6aa0f6..8fdb13794 100644 --- a/ui/src/app/modals/app-recover-select/app-recover-select.page.html +++ b/ui/src/app/modals/app-recover-select/app-recover-select.page.html @@ -1,6 +1,6 @@ - Select Services to Recover + Select Services to Restore @@ -17,7 +17,7 @@

Version {{ option.version }}

Backup made: {{ option.timestamp | date : 'short' }}

- Ready to recover + Ready to restore

Unavailable. {{ option.title }} is already installed. @@ -34,8 +34,8 @@ - - Recover Selected + + Restore Selected diff --git a/ui/src/app/modals/app-recover-select/app-recover-select.page.ts b/ui/src/app/modals/app-recover-select/app-recover-select.page.ts index 9c1778825..32cb9b719 100644 --- a/ui/src/app/modals/app-recover-select/app-recover-select.page.ts +++ b/ui/src/app/modals/app-recover-select/app-recover-select.page.ts @@ -55,14 +55,14 @@ export class AppRecoverSelectPage { this.hasSelection = this.options.some(o => o.checked) } - async recover (): Promise { + async restore (): Promise { const ids = this.options .filter(option => !!option.checked) .map(option => option.id) const loader = await this.loadingCtrl.create({ spinner: 'lines', - message: 'Beginning service recovery...', + message: 'Beginning restoration...', cssClass: 'loader', }) await loader.present()