display bottom item in backup list and refactor for cleanliness (#1609)

* display bottom item in backup list and refactor for cleanliness

* fix spelling mistake

* display initial toggle to deselect all, as all are selected by default

* add select/deselect all to backup restore and handle backup case when no services intalled

Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
This commit is contained in:
Matt Hill
2022-07-04 14:16:18 -06:00
committed by GitHub
parent 6d805ae941
commit 9319314672
11 changed files with 214 additions and 181 deletions

View File

@@ -17,13 +17,15 @@ import { ApiService } from 'src/app/services/api/embassy-api.service'
import { ErrorToastService } from '@start9labs/shared'
import { MappedBackupTarget } from 'src/app/types/mapped-backup-target'
type BackupType = 'create' | 'restore'
@Component({
selector: 'backup-drives',
templateUrl: './backup-drives.component.html',
styleUrls: ['./backup-drives.component.scss'],
})
export class BackupDrivesComponent {
@Input() type: 'create' | 'restore'
@Input() type: BackupType
@Output() onSelect: EventEmitter<
MappedBackupTarget<CifsBackupTarget | DiskBackupTarget>
> = new EventEmitter()
@@ -232,7 +234,7 @@ export class BackupDrivesComponent {
styleUrls: ['./backup-drives.component.scss'],
})
export class BackupDrivesHeaderComponent {
@Input() title: string
@Input() type: BackupType
@Output() onClose: EventEmitter<void> = new EventEmitter()
constructor(public readonly backupService: BackupService) {}