refactor downstream for 036 changes (#2577)

refactor codebase for 036 changes
This commit is contained in:
Matt Hill
2024-03-24 12:12:55 -06:00
committed by GitHub
parent 22cd2e3337
commit 3b669193f6
152 changed files with 1360 additions and 1352 deletions

View File

@@ -164,7 +164,7 @@ export class CifsComponent {
const target: CifsBackupTarget = {
...this.form.getRawValue(),
mountable: true,
'embassy-os': diskInfo,
startOs: diskInfo,
}
this.dialogs

View File

@@ -111,7 +111,7 @@ export class PasswordComponent {
}
try {
const passwordHash = this.target!['embassy-os']?.['password-hash'] || ''
const passwordHash = this.target!.startOs?.passwordHash || ''
argon2.verify(passwordHash, this.password.value)
this.context.completeWith(this.password.value)

View File

@@ -1,5 +1,5 @@
import { Component, Input } from '@angular/core'
import { RouterLink } from '@angular/router'
import { RouterModule } from '@angular/router'
import {
TuiCellModule,
TuiIconModule,
@@ -37,7 +37,7 @@ import {
</span>
</a>
`,
imports: [RouterLink, TuiIconModule, TuiCellModule, TuiTitleModule],
imports: [RouterModule, TuiIconModule, TuiCellModule, TuiTitleModule],
})
export class RecoverComponent {
@Input() disabled = false

View File

@@ -1,6 +1,6 @@
import { CommonModule } from '@angular/common'
import { Component, inject, OnInit } from '@angular/core'
import { RouterLink } from '@angular/router'
import { RouterModule } from '@angular/router'
import { ErrorService } from '@start9labs/shared'
import {
TuiButtonModule,
@@ -110,7 +110,7 @@ import { StateService } from 'src/app/services/state.service'
`,
imports: [
CommonModule,
RouterLink,
RouterModule,
TuiCardModule,
TuiButtonModule,
TuiIconsModule,

View File

@@ -98,7 +98,7 @@ export default class RecoverPage {
}
empty(drive: DiskBackupTarget) {
return !drive['embassy-os']?.full
return !drive.startOs?.full
}
async getDrives() {

View File

@@ -162,9 +162,9 @@ export default class SuccessPage implements AfterViewInit {
try {
const ret = await this.api.complete()
if (!this.isKiosk) {
this.torAddress = ret['tor-address'].replace(/^https:/, 'http:')
this.lanAddress = ret['lan-address'].replace(/^https:/, 'http:')
this.cert = ret['root-ca']
this.torAddress = ret.torAddress.replace(/^https:/, 'http:')
this.lanAddress = ret.lanAddress.replace(/^https:/, 'http:')
this.cert = ret.rootCa
await this.api.exit()
}

View File

@@ -139,7 +139,7 @@ export class MockApiService extends ApiService {
async followServerLogs(params: FollowLogsReq): Promise<FollowLogsRes> {
await pauseFor(1000)
return {
'start-cursor': 'fakestartcursor',
startCursor: 'fakestartcursor',
guid: 'fake-guid',
}
}