get label

This commit is contained in:
Drew Ansbacher
2021-09-14 09:24:29 -06:00
committed by Aiden McClelland
parent 77495cb674
commit 1dbef9d689
4 changed files with 4 additions and 4 deletions

View File

@@ -44,7 +44,7 @@
<ion-icon slot="start" name="save-outline"></ion-icon>
<ion-label class="ion-text-wrap">
<h1>{{ drive.logicalname }}</h1>
<h2 style="min-height: 19px;">{{ getLabelLabel(drive) }}</h2>
<h2 style="min-height: 19px;">{{ getLabel(drive) }}</h2>
<p> Using {{ getUsage(drive) }} of {{drive.capacity.toFixed(2)}} GiB</p>
</ion-label>
</ion-item>

View File

@@ -64,7 +64,7 @@ export class EmbassyPage {
await modal.present();
}
getLabelLabel(drive: DiskInfo) {
getLabel(drive: DiskInfo) {
const labels = drive.partitions.map(p => p.label).filter(l => !!l)
return labels.length ? labels.join(' / ') : 'unnamed'
}

View File

@@ -11,7 +11,7 @@
<form (ngSubmit)="!!recoveryDrive ? verifyPw() : submitPw()">
<div style="padding: 8px 24px;">
<p *ngIf="!!embassyDrive">Choose a password for your embassy. You will need it every time you log in. If you lose it you will be permanently locked out of your embassy.</p>
<p *ngIf="embassyDrive && getUsage(embassyDrive) > 0" style="padding-bottom: 15px;color: var(--ion-color-warning);"><b>Warning:</b> After submit, any data currently stored on <b>{{ getLabelLabel(embassyDrive) }}</b> will be wiped.</p>
<p *ngIf="embassyDrive && getUsage(embassyDrive) > 0" style="padding-bottom: 15px;color: var(--ion-color-warning);"><b>Warning:</b> After submit, any data currently stored on <b>{{ getLabel(embassyDrive) }}</b> will be wiped.</p>
<h4 class="input-label">
Password:

View File

@@ -84,7 +84,7 @@ export class PasswordPage {
this.modalController.dismiss()
}
getLabelLabel(drive: DiskInfo) {
getLabel(drive: DiskInfo) {
const labels = drive.partitions.map(p => p.label).filter(l => !!l)
return labels.length ? labels.join(' / ') : 'unnamed'
}