New recovery flow

This commit is contained in:
Matt Hill
2021-10-23 20:11:10 -06:00
committed by Aiden McClelland
parent 221d99bfee
commit 17d0f9e533
38 changed files with 358 additions and 283 deletions

View File

@@ -1,9 +1,7 @@
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-button (click)="close()">
<ion-icon [name]="type === 'backup' ? 'arrow-back' : 'close'"></ion-icon>
</ion-button>
<pwa-back-button></pwa-back-button>
</ion-buttons>
<ion-title>{{ title }}</ion-title>
<ion-buttons slot="end">

View File

@@ -20,7 +20,7 @@ export class BackupDrivesComponent {
if (this.type === 'backup') {
this.message = 'Select the drive where you want to create a backup of your Embassy.'
} else {
this.message = 'Select the drive containing the backup you would like to restore.'
this.message = 'Select the drive containing backups you would like to restore.'
}
this.backupService.getExternalDrives()
}
@@ -37,26 +37,13 @@ export class BackupDrivesComponent {
styleUrls: ['./backup-drives.component.scss'],
})
export class BackupDrivesHeaderComponent {
@Input() type: 'backup' | 'restore'
@Input() title: string
@Output() onClose: EventEmitter<void> = new EventEmitter()
title: string
constructor (
public readonly backupService: BackupService,
) { }
ngOnInit () {
if (this.type === 'backup') {
this.title = 'Create Backup'
} else {
this.title = 'Restore From Backup'
}
}
close (): void {
this.onClose.emit()
}
refresh () {
this.backupService.getExternalDrives()
}

View File

@@ -23,7 +23,9 @@ export class BackupService {
try {
const drives = await this.embassyApi.getDrives({ })
this.drives = drives.map(d => {
this.drives = drives
.filter(d => !d.internal)
.map(d => {
const partionInfo: MappedPartitionInfo[] = d.partitions.map(p => {
return {
...p,

View File

@@ -5,6 +5,6 @@
[style.font-weight]="weight"
>
{{ disconnected ? 'Unknown' : rendering.display }}
<ion-spinner *ngIf="rendering.showDots" class="dots dots-small" name="dots"></ion-spinner>
<ion-spinner *ngIf="rendering.showDots" class="dots" name="dots"></ion-spinner>
<span *ngIf="installProgress">{{ installProgress }}%</span>
</p>

View File

@@ -1,3 +0,0 @@
p {
margin: 0;
}