mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
fix bug with showing embassy drives and center error text (#2006)
* fix bug with showing embassy drives and center error text * cleaner * even more cleaner
This commit is contained in:
@@ -21,10 +21,12 @@
|
|||||||
style="padding-bottom: 8px"
|
style="padding-bottom: 8px"
|
||||||
>
|
>
|
||||||
<ion-card-title>No drives found</ion-card-title>
|
<ion-card-title>No drives found</ion-card-title>
|
||||||
<ion-card-subtitle
|
<div class="center-wrapper">
|
||||||
>Please connect an external storage drive to your Embassy, if
|
<ion-card-subtitle>
|
||||||
applicable. Next, click "Refresh".</ion-card-subtitle
|
Please connect an external storage drive to your Embassy, if
|
||||||
>
|
applicable. Next, click "Refresh".
|
||||||
|
</ion-card-subtitle>
|
||||||
|
</div>
|
||||||
</ion-card-header>
|
</ion-card-header>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
|||||||
@@ -53,24 +53,29 @@ export class EmbassyPage {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
try {
|
try {
|
||||||
const disks = await this.apiService.getDrives()
|
const disks = await this.apiService.getDrives()
|
||||||
this.storageDrives = disks.filter(d => {
|
if (this.stateService.setupType === 'fresh') {
|
||||||
if (this.stateService.setupType === 'restore') {
|
this.storageDrives = disks
|
||||||
return !d.partitions
|
} else if (this.stateService.setupType === 'restore') {
|
||||||
.map(p => p.logicalname)
|
this.storageDrives = disks.filter(
|
||||||
.includes(
|
d =>
|
||||||
(
|
!d.partitions
|
||||||
(this.stateService.recoverySource as BackupRecoverySource)
|
.map(p => p.logicalname)
|
||||||
?.target as DiskRecoverySource
|
.includes(
|
||||||
)?.logicalname,
|
(
|
||||||
)
|
(this.stateService.recoverySource as BackupRecoverySource)
|
||||||
} else if (this.stateService.setupType === 'transfer') {
|
?.target as DiskRecoverySource
|
||||||
const guid = (this.stateService.recoverySource as DiskMigrateSource)
|
)?.logicalname,
|
||||||
.guid
|
),
|
||||||
|
)
|
||||||
|
} else if (this.stateService.setupType === 'transfer') {
|
||||||
|
const guid = (this.stateService.recoverySource as DiskMigrateSource)
|
||||||
|
.guid
|
||||||
|
this.storageDrives = disks.filter(d => {
|
||||||
return (
|
return (
|
||||||
d.guid !== guid && !d.partitions.map(p => p.guid).includes(guid)
|
d.guid !== guid && !d.partitions.map(p => p.guid).includes(guid)
|
||||||
)
|
)
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this.errorToastService.present(e)
|
this.errorToastService.present(e)
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user