mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
refresh button in embassy drive page in wizard
This commit is contained in:
committed by
Aiden McClelland
parent
13c6201893
commit
4c6abe7e60
@@ -8,10 +8,16 @@
|
||||
</div>
|
||||
|
||||
<ion-card color="dark">
|
||||
<ion-card-header class="ion-text-center" style="padding-bottom: 8px;">
|
||||
<ion-card-header class="ion-text-center" style="padding-bottom: 8px;" *ngIf="loading || storageDrives.length; else empty">
|
||||
<ion-card-title>Select Storage Drive</ion-card-title>
|
||||
<ion-card-subtitle>Select the drive where your Embassy data will be stored.</ion-card-subtitle>
|
||||
</ion-card-header>
|
||||
<ng-template #empty>
|
||||
<ion-card-header class="ion-text-center" style="padding-bottom: 8px;">
|
||||
<ion-card-title>No drives found</ion-card-title>
|
||||
<ion-card-subtitle>Please connect a storage drive to your Embassy and click "Refresh".</ion-card-subtitle>
|
||||
</ion-card-header>
|
||||
</ng-template>
|
||||
|
||||
<ion-card-content class="ion-margin">
|
||||
<!-- loading -->
|
||||
@@ -20,8 +26,9 @@
|
||||
<!-- not loading -->
|
||||
<ng-template #loaded>
|
||||
<ng-container *ngIf="!storageDrives.length">
|
||||
<h2>No drives found</h2>
|
||||
<p>Please connect a storage drive to your Embassy and click "Refresh".</p>
|
||||
<ion-button fill="clear" color="light" (click)="getDrives()">
|
||||
<ion-icon color="primary" size="large" name='refresh' icon-start></ion-icon>
|
||||
</ion-button>
|
||||
</ng-container>
|
||||
|
||||
<ion-item-group *ngIf="storageDrives.length">
|
||||
|
||||
@@ -38,6 +38,7 @@ export class EmbassyPage {
|
||||
}
|
||||
|
||||
async getDrives () {
|
||||
this.loading = true
|
||||
try {
|
||||
const { disks, reconnect } = await this.apiService.getDrives()
|
||||
this.storageDrives = disks.filter(d => !d.partitions.map(p => p.logicalname).includes((this.stateService.recoverySource as DiskRecoverySource)?.logicalname))
|
||||
|
||||
@@ -27,7 +27,7 @@ export class MockApiService extends ApiService {
|
||||
await pauseFor(1000)
|
||||
return {
|
||||
disks: [],
|
||||
reconnect: ['yolo'],
|
||||
reconnect: [],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user