mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
0.3.2 final cleanup (#1782)
* bump version with stubbed release notes * increase BE timeout * 032 release notes * hide developer menu for now * remove unused sub/import * remoce reconnect from disks res in setup wiz * remove quirks * flatten drives response Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ export class EmbassyPage {
|
||||
async getDrives() {
|
||||
this.loading = true
|
||||
try {
|
||||
const { disks, reconnect } = await this.apiService.getDrives()
|
||||
const disks = await this.apiService.getDrives()
|
||||
this.storageDrives = disks.filter(
|
||||
d =>
|
||||
!d.partitions
|
||||
@@ -59,15 +59,6 @@ export class EmbassyPage {
|
||||
?.logicalname,
|
||||
),
|
||||
)
|
||||
if (!this.storageDrives.length && reconnect.length) {
|
||||
const list = `<ul>${reconnect.map(recon => `<li>${recon}</li>`)}</ul>`
|
||||
const alert = await this.alertCtrl.create({
|
||||
header: 'Warning',
|
||||
message: `One or more devices you connected had to be reconfigured to support the current hardware platform. Please unplug and replug the following device(s), then refresh the page:<br> ${list}`,
|
||||
buttons: ['OK'],
|
||||
})
|
||||
await alert.present()
|
||||
}
|
||||
} catch (e: any) {
|
||||
this.errorToastService.present(e)
|
||||
} finally {
|
||||
|
||||
@@ -39,7 +39,7 @@ export class HomePage {
|
||||
async ngOnInit() {
|
||||
try {
|
||||
this.encrypted.secret = await this.unencrypted.getSecret()
|
||||
const { disks } = await this.unencrypted.getDrives()
|
||||
const disks = await this.unencrypted.getDrives()
|
||||
this.guid = disks.find(d => !!d.guid)?.guid
|
||||
} catch (e: any) {
|
||||
this.error = true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { AlertController, ModalController, NavController } from '@ionic/angular'
|
||||
import { ModalController, NavController } from '@ionic/angular'
|
||||
import { CifsModal } from 'src/app/modals/cifs-modal/cifs-modal.page'
|
||||
import { ApiService, DiskBackupTarget } from 'src/app/services/api/api.service'
|
||||
import { ErrorToastService } from '@start9labs/shared'
|
||||
@@ -20,7 +20,6 @@ export class RecoverPage {
|
||||
private readonly navCtrl: NavController,
|
||||
private readonly modalCtrl: ModalController,
|
||||
private readonly modalController: ModalController,
|
||||
private readonly alertCtrl: AlertController,
|
||||
private readonly errToastService: ErrorToastService,
|
||||
private readonly stateService: StateService,
|
||||
) {}
|
||||
@@ -41,7 +40,7 @@ export class RecoverPage {
|
||||
async getDrives() {
|
||||
this.mappedDrives = []
|
||||
try {
|
||||
const { disks, reconnect } = await this.apiService.getDrives()
|
||||
const disks = await this.apiService.getDrives()
|
||||
disks
|
||||
.filter(d => d.partitions.length)
|
||||
.forEach(d => {
|
||||
@@ -62,21 +61,6 @@ export class RecoverPage {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
if (!this.mappedDrives.length && reconnect.length) {
|
||||
const list = `<ul>${reconnect.map(recon => `<li>${recon}</li>`)}</ul>`
|
||||
const alert = await this.alertCtrl.create({
|
||||
header: 'Warning',
|
||||
message: `One or more devices you connected had to be reconfigured to support the current hardware platform. Please unplug and replug the following device(s), then refresh the page:<br> ${list}`,
|
||||
buttons: [
|
||||
{
|
||||
role: 'cancel',
|
||||
text: 'OK',
|
||||
},
|
||||
],
|
||||
})
|
||||
await alert.present()
|
||||
}
|
||||
} catch (e: any) {
|
||||
this.errToastService.present(e)
|
||||
} finally {
|
||||
|
||||
@@ -42,10 +42,7 @@ export type EmbassyOSRecoveryInfo = {
|
||||
'wrapped-key': string | null
|
||||
}
|
||||
|
||||
export type DiskListResponse = {
|
||||
disks: DiskInfo[]
|
||||
reconnect: string[]
|
||||
}
|
||||
export type DiskListResponse = DiskInfo[]
|
||||
|
||||
export type DiskBackupTarget = {
|
||||
vendor: string | null
|
||||
|
||||
@@ -41,7 +41,7 @@ export class LiveApiService implements ApiService {
|
||||
/**
|
||||
* We want to update the secret, which means that we will call in clearnet the
|
||||
* getSecret, and all the information is never in the clear, and only public
|
||||
* information is sent across the network. We don't want to expose that we do
|
||||
* information is sent across the network. We don't want to expose that we do
|
||||
* this wil all public/private key, which means that there is no information loss
|
||||
* through the network.
|
||||
*/
|
||||
|
||||
@@ -37,32 +37,29 @@ export class MockApiService implements ApiService {
|
||||
|
||||
async getDrives() {
|
||||
await pauseFor(1000)
|
||||
return {
|
||||
disks: [
|
||||
{
|
||||
logicalname: 'abcd',
|
||||
vendor: 'Samsung',
|
||||
model: 'T5',
|
||||
partitions: [
|
||||
{
|
||||
logicalname: 'pabcd',
|
||||
label: null,
|
||||
capacity: 73264762332,
|
||||
used: null,
|
||||
'embassy-os': {
|
||||
version: '0.2.17',
|
||||
full: true,
|
||||
'password-hash': null,
|
||||
'wrapped-key': null,
|
||||
},
|
||||
return [
|
||||
{
|
||||
logicalname: 'abcd',
|
||||
vendor: 'Samsung',
|
||||
model: 'T5',
|
||||
partitions: [
|
||||
{
|
||||
logicalname: 'pabcd',
|
||||
label: null,
|
||||
capacity: 73264762332,
|
||||
used: null,
|
||||
'embassy-os': {
|
||||
version: '0.2.17',
|
||||
full: true,
|
||||
'password-hash': null,
|
||||
'wrapped-key': null,
|
||||
},
|
||||
],
|
||||
capacity: 123456789123,
|
||||
guid: 'uuid-uuid-uuid-uuid',
|
||||
},
|
||||
],
|
||||
reconnect: [],
|
||||
}
|
||||
},
|
||||
],
|
||||
capacity: 123456789123,
|
||||
guid: 'uuid-uuid-uuid-uuid',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
async set02XDrive() {
|
||||
|
||||
Reference in New Issue
Block a user