diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts
index 9b2c6bf2a..d4f8690a8 100644
--- a/ui/src/app/app.component.ts
+++ b/ui/src/app/app.component.ts
@@ -97,26 +97,29 @@ export class AppComponent {
if (auth === AuthState.VERIFIED) {
this.patch.start()
+ this.showMenu = true
+ // if on the login screen, route to dashboard
+ if (this.router.url.startsWith('/login')) {
+ this.router.navigate([''], { replaceUrl: true })
+ }
+
+ this.subscriptions = this.subscriptions.concat([
+ // start the connection monitor
+ ...this.connectionService.start(),
+ // watch connection to display connectivity issues
+ this.watchConnection(),
+ // // watch router to highlight selected menu item
+ this.watchRouter(),
+ // // watch status to display/hide maintenance page
+ ])
+
this.patch.watch$()
.pipe(
filter(data => !isEmptyObject(data as object)),
take(1),
)
.subscribe(_ => {
- this.showMenu = true
- // if on the login screen, route to dashboard
- if (this.router.url.startsWith('/login')) {
- this.router.navigate([''], { replaceUrl: true })
- }
-
- this.subscriptions = [
- // start the connection monitor
- ...this.connectionService.start(),
- // watch connection to display connectivity issues
- this.watchConnection(),
- // // watch router to highlight selected menu item
- this.watchRouter(),
- // // watch status to display/hide maintenance page
+ this.subscriptions = this.subscriptions.concat([
this.watchStatus(),
// // watch version to refresh browser window
this.watchVersion(),
@@ -124,7 +127,7 @@ export class AppComponent {
this.watchNotifications(),
// // run startup alerts
this.startupAlertsService.runChecks(),
- ]
+ ])
})
// UNVERIFIED
} else if (auth === AuthState.UNVERIFIED) {
@@ -230,6 +233,10 @@ export class AppComponent {
message = 'Embassy not found on Local Area Network.'
link = 'https://docs.start9.com/support/FAQ/setup-faq.html#lan-failure'
break
+ case ConnectionFailure.Unknown:
+ message = 'Unknown connection error. Please refresh the page.'
+ link = 'https://docs.start9.com/support/FAQ/setup-faq.html#unknown-failure'
+ break
}
await this.presentToastOffline(message, link)
}
diff --git a/ui/src/app/components/form-object/form-object.component.html b/ui/src/app/components/form-object/form-object.component.html
index de772b0e5..5b95bcd0c 100644
--- a/ui/src/app/components/form-object/form-object.component.html
+++ b/ui/src/app/components/form-object/form-object.component.html
@@ -25,14 +25,14 @@
-
+
-
+
{{ spec.units }}
@@ -43,7 +43,7 @@
{{ spec.name }}
-
+
{{ spec['value-names'][option] }}
@@ -68,7 +68,7 @@
spec.variants[entry.value.controls[spec.tag.id].value] :
spec.spec"
[formGroup]="entry.value"
- [current]="current ? current[key] : undefined"
+ [current]="current ? current[entry.key] : undefined"
[unionSpec]="spec.type === 'union' ? spec : undefined"
>
diff --git a/ui/src/app/components/install-wizard/complete/complete.component.ts b/ui/src/app/components/install-wizard/complete/complete.component.ts
index ea239117f..48e106304 100644
--- a/ui/src/app/components/install-wizard/complete/complete.component.ts
+++ b/ui/src/app/components/install-wizard/complete/complete.component.ts
@@ -20,10 +20,10 @@ export class CompleteComponent implements OnInit, Loadable {
}
@Input() transitions: {
- cancel: () => void
- next: () => void
- final: () => void
- error: (e: Error) => void
+ cancel: () => any
+ next: () => any
+ final: () => any
+ error: (e: Error) => any
}
loading$ = new BehaviorSubject(false)
diff --git a/ui/src/app/components/install-wizard/dependents/dependents.component.html b/ui/src/app/components/install-wizard/dependents/dependents.component.html
index 6ca972529..d0b4ee574 100644
--- a/ui/src/app/components/install-wizard/dependents/dependents.component.html
+++ b/ui/src/app/components/install-wizard/dependents/dependents.component.html
@@ -30,10 +30,10 @@
*ngFor="let dep of dependentBreakages | keyvalue"
>
-
+
- {{ dep.value.title }}
+ {{ patch.data['package-data'][dep.key].manifest.title }}
diff --git a/ui/src/app/components/install-wizard/dependents/dependents.component.ts b/ui/src/app/components/install-wizard/dependents/dependents.component.ts
index bfe30d990..29aaf5e41 100644
--- a/ui/src/app/components/install-wizard/dependents/dependents.component.ts
+++ b/ui/src/app/components/install-wizard/dependents/dependents.component.ts
@@ -2,6 +2,7 @@ import { Component, Input, OnInit } from '@angular/core'
import { BehaviorSubject, from, Subject } from 'rxjs'
import { takeUntil, tap } from 'rxjs/operators'
import { Breakages } from 'src/app/services/api/api.types'
+import { PatchDbService } from 'src/app/services/patch-db/patch-db.service'
import { capitalizeFirstLetter, isEmptyObject } from 'src/app/util/misc.util'
import { Loadable, markAsLoadingDuring$ } from '../loadable'
import { WizardAction } from '../wizard-types'
@@ -20,10 +21,10 @@ export class DependentsComponent implements OnInit, Loadable {
skipConfirmationDialogue?: boolean
}
@Input() transitions: {
- cancel: () => void
- next: () => void
- final: () => void
- error: (e: Error) => void
+ cancel: () => any
+ next: () => any
+ final: () => any
+ error: (e: Error) => any
}
dependentBreakages: Breakages
@@ -33,7 +34,9 @@ export class DependentsComponent implements OnInit, Loadable {
loading$ = new BehaviorSubject(false)
cancel$ = new Subject()
- constructor () { }
+ constructor (
+ public readonly patch: PatchDbService,
+ ) { }
ngOnInit () { }
load () {
diff --git a/ui/src/app/components/install-wizard/install-wizard.component.html b/ui/src/app/components/install-wizard/install-wizard.component.html
index e34ec4a2d..d7c27e34c 100644
--- a/ui/src/app/components/install-wizard/install-wizard.component.html
+++ b/ui/src/app/components/install-wizard/install-wizard.component.html
@@ -38,11 +38,11 @@
- 16">{{ cancel.text }}
+ 16">{{ cancel.text }}
- 16">{{ cancel.text }}
+ 16">{{ cancel.text }}
diff --git a/ui/src/app/components/logs/logs.page.html b/ui/src/app/components/logs/logs.page.html
index db594a434..2add93473 100644
--- a/ui/src/app/components/logs/logs.page.html
+++ b/ui/src/app/components/logs/logs.page.html
@@ -1,6 +1,6 @@
{{ disconnected ? 'Unknown' : rendering.display }}
-
+
diff --git a/ui/src/app/modals/app-config/app-config.page.html b/ui/src/app/modals/app-config/app-config.page.html
index 8dd8a7e0f..f59c2a427 100644
--- a/ui/src/app/modals/app-config/app-config.page.html
+++ b/ui/src/app/modals/app-config/app-config.page.html
@@ -64,17 +64,17 @@
No config options for {{ pkg.manifest.title }} {{ pkg.manifest.version }}.
-
-
-
+
+
+
diff --git a/ui/src/app/modals/app-restore/app-restore.component.ts b/ui/src/app/modals/app-restore/app-restore.component.ts
index 6a07a4ac1..d5fd86b25 100644
--- a/ui/src/app/modals/app-restore/app-restore.component.ts
+++ b/ui/src/app/modals/app-restore/app-restore.component.ts
@@ -15,6 +15,7 @@ export class AppRestoreComponent {
@Input() pkgId: string
disks: DiskInfo
loading = true
+ submitting = false
allPartitionsMounted: boolean
modal: HTMLIonModalElement
@@ -73,10 +74,17 @@ export class AppRestoreComponent {
}
private async restore (logicalname: string, password: string): Promise {
- await this.embassyApi.restorePackage({
- id: this.pkgId,
- logicalname,
- password,
- })
+ this.submitting = true
+ try {
+ await this.embassyApi.restorePackage({
+ id: this.pkgId,
+ logicalname,
+ password,
+ })
+ } catch (e) {
+ this.errToast.present(e)
+ } finally {
+ this.submitting = false
+ }
}
}
diff --git a/ui/src/app/modals/backup-confirmation/backup-confirmation.component.ts b/ui/src/app/modals/backup-confirmation/backup-confirmation.component.ts
index 7fc35e536..56edf0e6f 100644
--- a/ui/src/app/modals/backup-confirmation/backup-confirmation.component.ts
+++ b/ui/src/app/modals/backup-confirmation/backup-confirmation.component.ts
@@ -1,7 +1,6 @@
import { Component, Input } from '@angular/core'
import { IonicSafeString, LoadingController, ModalController } from '@ionic/angular'
-import { ApiService } from 'src/app/services/api/embassy-api.service'
-import { ErrorToastService, getErrorMessage } from 'src/app/services/error-toast.service'
+import { getErrorMessage } from 'src/app/services/error-toast.service'
@Component({
selector: 'backup-confirmation',
diff --git a/ui/src/app/modals/generic-form/generic-form.page.html b/ui/src/app/modals/generic-form/generic-form.page.html
index 6acf39778..a51380520 100644
--- a/ui/src/app/modals/generic-form/generic-form.page.html
+++ b/ui/src/app/modals/generic-form/generic-form.page.html
@@ -10,18 +10,19 @@
-
-
-
-
+