mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +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-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-label style="font-size: small" color="danger" class="ion-text-wrap">{{e}}</ion-label>
|
||||||
</ion-item>
|
</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>
|
||||||
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
<div style="display: flex; justify-content: flex-end; align-items: center;">
|
||||||
<ion-button fill="clear" color="medium" (click)="cancel()">
|
<ion-button fill="clear" color="medium" (click)="cancel()">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core'
|
import { Component, Input, OnInit } from '@angular/core'
|
||||||
import { IonicSafeString, ModalController } from '@ionic/angular'
|
import { ModalController } from '@ionic/angular'
|
||||||
import { BehaviorSubject } from 'rxjs'
|
import { BehaviorSubject } from 'rxjs'
|
||||||
import { AppInstalledFull } from 'src/app/models/app-types'
|
import { AppInstalledFull } from 'src/app/models/app-types'
|
||||||
import { DiskPartition } from 'src/app/models/server-model'
|
import { DiskPartition } from 'src/app/models/server-model'
|
||||||
@@ -13,6 +13,8 @@ export class AppBackupConfirmationComponent implements OnInit {
|
|||||||
unmasked = false
|
unmasked = false
|
||||||
password: string
|
password: string
|
||||||
$error$: BehaviorSubject<string> = new BehaviorSubject('')
|
$error$: BehaviorSubject<string> = new BehaviorSubject('')
|
||||||
|
|
||||||
|
// pass this through the modalCtrl once ejecting disks is an option in the UI.
|
||||||
eject = true
|
eject = true
|
||||||
message: string
|
message: string
|
||||||
|
|
||||||
@@ -28,7 +30,7 @@ export class AppBackupConfirmationComponent implements OnInit {
|
|||||||
this.unmasked = !this.unmasked
|
this.unmasked = !this.unmasked
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel () {
|
||||||
this.modalCtrl.dismiss({ cancel: true })
|
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.')
|
this.$error$.next('Password must be at least 12 characters in length.')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { password, eject } = this
|
const { password } = this
|
||||||
this.modalCtrl.dismiss({ password, eject })
|
this.modalCtrl.dismiss({ password })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<ion-spinner *ngIf="loading" class="center" name="lines" color="warning"></ion-spinner>
|
<ion-spinner *ngIf="loading" class="center" name="lines" color="warning"></ion-spinner>
|
||||||
|
|
||||||
<ng-container *ngIf="!loading">
|
<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">
|
<ion-label class="ion-text-wrap">
|
||||||
<h2 style="display: flex; align-items: center; margin-bottom: 3px;">
|
<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>
|
<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 { 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 { AppModel, AppStatus } from 'src/app/models/app-model'
|
||||||
import { AppInstalledFull } from 'src/app/models/app-types'
|
import { AppInstalledFull } from 'src/app/models/app-types'
|
||||||
import { ApiService } from 'src/app/services/api/api.service'
|
import { ApiService } from 'src/app/services/api/api.service'
|
||||||
@@ -98,7 +98,8 @@ export class AppBackupPage {
|
|||||||
m.onWillDismiss().then(res => {
|
m.onWillDismiss().then(res => {
|
||||||
const data = res.data
|
const data = res.data
|
||||||
if (data.cancel) return
|
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()
|
return await m.present()
|
||||||
|
|||||||
Reference in New Issue
Block a user