mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
drive return type update
This commit is contained in:
committed by
Aiden McClelland
parent
6b3570e150
commit
c21ebd2c5e
@@ -44,17 +44,17 @@
|
||||
<ion-icon slot="start" name="save-outline"></ion-icon>
|
||||
<ion-label class="ion-text-wrap">
|
||||
<h1>{{ drive.logicalname }}</h1>
|
||||
<h2>{{ drive.name }}</h2>
|
||||
<p> Embassy version: {{drive.version}}</p>
|
||||
<h2>{{ drive['embassy-os'].name }}</h2>
|
||||
<p> Embassy version: {{drive['embassy-os'].version}}</p>
|
||||
</ion-label>
|
||||
<ion-icon *ngIf="drive.version.startsWith('0.2') || passwords[drive.logicalname]" color="success" slot="end" name="lock-open-outline"></ion-icon>
|
||||
<ion-icon *ngIf="!drive.version.startsWith('0.2') && !passwords[drive.logicalname]" color="danger" slot="end" name="lock-closed-outline"></ion-icon>
|
||||
<ion-icon *ngIf="drive['embassy-os'].version.startsWith('0.2') || passwords[drive.logicalname]" color="success" slot="end" name="lock-open-outline"></ion-icon>
|
||||
<ion-icon *ngIf="!drive['embassy-os'].version.startsWith('0.2') && !passwords[drive.logicalname]" color="danger" slot="end" name="lock-closed-outline"></ion-icon>
|
||||
|
||||
</ion-item>
|
||||
</ng-container>
|
||||
<ion-button
|
||||
(click)="selectRecoveryDrive()"
|
||||
[disabled]="!selectedDrive || (!passwords[selectedDrive.logicalname] && !selectedDrive.version.startsWith('0.2'))"
|
||||
[disabled]="!selectedDrive || (!passwords[selectedDrive.logicalname] && !selectedDrive['embassy-os'].version.startsWith('0.2'))"
|
||||
class="claim-button"
|
||||
>
|
||||
Next
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { iosTransitionAnimation, ModalController, NavController } from '@ionic/angular'
|
||||
import { ApiService, RecoveryDrive } from 'src/app/services/api/api.service'
|
||||
import { ApiService, Drive } from 'src/app/services/api/api.service'
|
||||
import { StateService } from 'src/app/services/state.service'
|
||||
import { PasswordPage } from '../password/password.page'
|
||||
|
||||
@@ -12,7 +12,7 @@ import { PasswordPage } from '../password/password.page'
|
||||
export class RecoverPage {
|
||||
passwords = {}
|
||||
recoveryDrives = []
|
||||
selectedDrive: RecoveryDrive = null
|
||||
selectedDrive: Drive = null
|
||||
loading = true
|
||||
window = window
|
||||
|
||||
@@ -24,11 +24,11 @@ export class RecoverPage {
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
this.recoveryDrives = await this.apiService.getRecoveryDrives()
|
||||
this.recoveryDrives = (await this.apiService.getDrives()).filter(d => !!d['embassy-os'])
|
||||
this.loading = false
|
||||
}
|
||||
|
||||
async chooseDrive(drive: RecoveryDrive) {
|
||||
async chooseDrive(drive: Drive) {
|
||||
|
||||
if (this.selectedDrive?.logicalname === drive.logicalname) {
|
||||
this.selectedDrive = null
|
||||
@@ -37,7 +37,7 @@ export class RecoverPage {
|
||||
this.selectedDrive = drive
|
||||
}
|
||||
|
||||
if (drive.version.startsWith('0.2') || this.passwords[drive.logicalname]) return
|
||||
if (drive['embassy-os'].version.startsWith('0.2') || this.passwords[drive.logicalname]) return
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: PasswordPage,
|
||||
|
||||
Reference in New Issue
Block a user