ui: default restore warnings

This commit is contained in:
Aaron Greenspan
2021-01-22 14:50:20 -07:00
committed by Aiden McClelland
parent 53db8fc4ec
commit 8c79984e80
2 changed files with 3 additions and 1 deletions

View File

@@ -27,7 +27,7 @@
<ion-spinner *ngIf="loading" class="center" name="lines" color="warning"></ion-spinner>
<ng-container *ngIf="!loading">
<ion-item *ngIf="type === 'restore' && app.restoreAlert as restore" class="notifier-item" style="box-shadow: 0 0 5px 1px var(--ion-color-danger); margin-bottom: 40px">
<ion-item *ngIf="type === 'restore' && (app.restoreAlert || defaultRestoreAlert) as restore" class="notifier-item" style="box-shadow: 0 0 5px 1px var(--ion-color-danger); margin-bottom: 40px">
<ion-label class="ion-text-wrap">
<h2 style="display: flex; align-items: center; margin-bottom: 3px;">
<ion-icon style="margin-right: 5px;" slot="start" color="danger" slot="start" name="warning-outline"></ion-icon>

View File

@@ -20,6 +20,7 @@ export class AppBackupPage {
loading = true
error: string
allPartitionsMounted: boolean
defaultRestoreAlert: string
constructor (
private readonly modalCtrl: ModalController,
@@ -31,6 +32,7 @@ export class AppBackupPage {
) { }
ngOnInit () {
this.defaultRestoreAlert = `Restoring ${this.app.title} will overwrite its current data.`
return this.getExternalDisks().then(() => this.loading = false)
}