mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
ui: remove eject from backups
This commit is contained in:
committed by
Aiden McClelland
parent
47e5951fc3
commit
df05fade25
@@ -12,10 +12,6 @@
|
||||
<ion-item *ngIf="$error$ | async as e" lines="none" style="--background: var(--ion-background-color);">
|
||||
<ion-label style="font-size: small" color="danger" class="ion-text-wrap">{{e}}</ion-label>
|
||||
</ion-item>
|
||||
<ion-item lines="none" style="--background: var(--ion-background-color)">
|
||||
<ion-label class="ion-text-wrap" color="medium" style="font-size: small">Eject drive when backup complete?</ion-label>
|
||||
<ion-checkbox color="primary" checked slot="end" [(ngModel)]="eject"></ion-checkbox>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
||||
<ion-button fill="clear" color="medium" (click)="cancel()">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core'
|
||||
import { IonicSafeString, ModalController } from '@ionic/angular'
|
||||
import { ModalController } from '@ionic/angular'
|
||||
import { BehaviorSubject } from 'rxjs'
|
||||
import { AppInstalledFull } from 'src/app/models/app-types'
|
||||
import { DiskPartition } from 'src/app/models/server-model'
|
||||
@@ -13,6 +13,8 @@ export class AppBackupConfirmationComponent implements OnInit {
|
||||
unmasked = false
|
||||
password: string
|
||||
$error$: BehaviorSubject<string> = new BehaviorSubject('')
|
||||
|
||||
// pass this through the modalCtrl once ejecting disks is an option in the UI.
|
||||
eject = true
|
||||
message: string
|
||||
|
||||
@@ -28,7 +30,7 @@ export class AppBackupConfirmationComponent implements OnInit {
|
||||
this.unmasked = !this.unmasked
|
||||
}
|
||||
|
||||
cancel() {
|
||||
cancel () {
|
||||
this.modalCtrl.dismiss({ cancel: true })
|
||||
}
|
||||
|
||||
@@ -37,7 +39,7 @@ export class AppBackupConfirmationComponent implements OnInit {
|
||||
this.$error$.next('Password must be at least 12 characters in length.')
|
||||
return
|
||||
}
|
||||
const { password, eject } = this
|
||||
this.modalCtrl.dismiss({ password, eject })
|
||||
const { password } = this
|
||||
this.modalCtrl.dismiss({ password })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<ion-spinner *ngIf="loading" class="center" name="lines" color="warning"></ion-spinner>
|
||||
|
||||
<ng-container *ngIf="!loading">
|
||||
<ion-item *ngIf="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 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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { ModalController, AlertController, LoadingController, IonicSafeString, ToastController } from '@ionic/angular'
|
||||
import { ModalController, AlertController, LoadingController, ToastController } from '@ionic/angular'
|
||||
import { AppModel, AppStatus } from 'src/app/models/app-model'
|
||||
import { AppInstalledFull } from 'src/app/models/app-types'
|
||||
import { ApiService } from 'src/app/services/api/api.service'
|
||||
@@ -98,7 +98,8 @@ export class AppBackupPage {
|
||||
m.onWillDismiss().then(res => {
|
||||
const data = res.data
|
||||
if (data.cancel) return
|
||||
return this.create(disk, partition, data.password, data.eject)
|
||||
// we hard code the 'eject' last argument to be false, until ejection is an option in the UI.
|
||||
return this.create(disk, partition, data.password, false)
|
||||
})
|
||||
|
||||
return await m.present()
|
||||
|
||||
Reference in New Issue
Block a user