diff --git a/frontend/projects/setup-wizard/src/app/pages/embassy/embassy.page.ts b/frontend/projects/setup-wizard/src/app/pages/embassy/embassy.page.ts index 6cb8a5d85..cbfc0dad5 100644 --- a/frontend/projects/setup-wizard/src/app/pages/embassy/embassy.page.ts +++ b/frontend/projects/setup-wizard/src/app/pages/embassy/embassy.page.ts @@ -9,6 +9,7 @@ import { ApiService, BackupRecoverySource, DiskRecoverySource, + DiskMigrateSource, } from 'src/app/services/api/api.service' import { DiskInfo, ErrorToastService, GuidPipe } from '@start9labs/shared' import { StateService } from 'src/app/services/state.service' @@ -52,17 +53,24 @@ export class EmbassyPage { this.loading = true try { const disks = await this.apiService.getDrives() - this.storageDrives = disks.filter( - d => - !d.partitions + this.storageDrives = disks.filter(d => { + if (this.stateService.setupType === 'restore') { + return !d.partitions .map(p => p.logicalname) .includes( ( (this.stateService.recoverySource as BackupRecoverySource) ?.target as DiskRecoverySource )?.logicalname, - ), - ) + ) + } else if (this.stateService.setupType === 'transfer') { + const guid = (this.stateService.recoverySource as DiskMigrateSource) + .guid + return ( + d.guid !== guid && !d.partitions.map(p => p.guid).includes(guid) + ) + } + }) } catch (e: any) { this.errorToastService.present(e) } finally { diff --git a/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.html b/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.html index 5eec5270e..d4c34dc05 100644 --- a/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.html +++ b/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.html @@ -24,7 +24,7 @@ padding-bottom: 20px; margin-bottom: 40px; " - [type]="progress.decimal ? 'determinate' : 'indeterminate'" + [type]="progress.decimal && progress.decimal < 1 ? 'determinate' : 'indeterminate'" [value]="progress.decimal || 0" >
{{ progress.decimal | toMessage }}
diff --git a/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.ts b/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.ts index 6e089c4e8..18464510d 100644 --- a/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.ts +++ b/frontend/projects/setup-wizard/src/app/pages/loading/loading.page.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core' import { NavController } from '@ionic/angular' import { StateService } from 'src/app/services/state.service' +import { Pipe, PipeTransform } from '@angular/core' @Component({ selector: 'app-loading', @@ -28,8 +29,6 @@ export class LoadingPage { } } -import { Pipe, PipeTransform } from '@angular/core' - @Pipe({ name: 'toMessage', }) @@ -42,12 +41,20 @@ export class ToMessagePipe implements PipeTransform { case 'attach': return 'Setting up your Embassy' case 'restore': - return 'Restoring data. This can take a while.' + if (!progress) { + return 'Initializing' + } else if (progress < 1) { + return 'Restoring data. This can take a while' + } else { + return 'Finalizing data restore' + } case 'transfer': if (!progress) { return 'Preparing data. Depending on how much data you have, this could take up to 1 hour' - } else { + } else if (progress < 1) { return 'Transferring data' + } else { + return 'Finalizing data transfer' } default: return '' diff --git a/frontend/projects/setup-wizard/src/app/pages/success/success.page.html b/frontend/projects/setup-wizard/src/app/pages/success/success.page.html index 83a3351fc..975c48373 100644 --- a/frontend/projects/setup-wizard/src/app/pages/success/success.page.html +++ b/frontend/projects/setup-wizard/src/app/pages/success/success.page.html @@ -8,16 +8,23 @@Continue to login
+