From ca778b327b38f7612b2f004e2c3f1b6243da1cfc Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Fri, 3 Jun 2022 12:35:56 -0600 Subject: [PATCH] Clean up config (#1484) * better formatting for union list * cleaner config Co-authored-by: Matt Hill --- .../form-object/form-label.component.html | 30 ++++- .../form-object/form-object.component.html | 103 ++++++++++-------- .../form-object/form-object.component.scss | 7 +- .../form-object/form-object.component.ts | 22 ++++ 4 files changed, 112 insertions(+), 50 deletions(-) diff --git a/frontend/projects/ui/src/app/components/form-object/form-label.component.html b/frontend/projects/ui/src/app/components/form-object/form-label.component.html index ce7418f5f..c6fd18428 100644 --- a/frontend/projects/ui/src/app/components/form-object/form-label.component.html +++ b/frontend/projects/ui/src/app/components/form-object/form-label.component.html @@ -1,9 +1,21 @@ - - + + - + @@ -12,6 +24,14 @@  (New)  (Edited) - * + * - * \ No newline at end of file + * diff --git a/frontend/projects/ui/src/app/components/form-object/form-object.component.html b/frontend/projects/ui/src/app/components/form-object/form-object.component.html index d408299f9..8af1e4025 100644 --- a/frontend/projects/ui/src/app/components/form-object/form-object.component.html +++ b/frontend/projects/ui/src/app/components/form-object/form-object.component.html @@ -2,7 +2,6 @@
-

{{ unionSpec.tag.name }}

- {{ unionSpec.tag.name }} + + + {{ unionSpec.tag.name }} + + - - +
+ +

- - + {{ spec.units }} - - - {{ spec.name }} - - - - - {{ spec.name }} - - - - {{ spec['value-names'][option] }} - - -
+ + + + + + {{ spec.name }} + + + + + + + {{ spec['value-names'][option] }} + + + @@ -248,6 +262,7 @@
- +
diff --git a/frontend/projects/ui/src/app/components/form-object/form-object.component.scss b/frontend/projects/ui/src/app/components/form-object/form-object.component.scss index 80a1827df..fe4454c5a 100644 --- a/frontend/projects/ui/src/app/components/form-object/form-object.component.scss +++ b/frontend/projects/ui/src/app/components/form-object/form-object.component.scss @@ -10,12 +10,13 @@ ion-input { ion-item-divider { text-transform: unset; + --padding-top: 18px; --padding-start: 0; border-bottom: 1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13)))) } .nested-wrapper { - padding: 0 0 30px 30px; + padding: 0 0 24px 24px; } .validation-error { @@ -23,4 +24,8 @@ ion-item-divider { font-size: small; color: var(--ion-color-danger); } +} + +.indent { + margin-left: 24px; } \ No newline at end of file diff --git a/frontend/projects/ui/src/app/components/form-object/form-object.component.ts b/frontend/projects/ui/src/app/components/form-object/form-object.component.ts index 67d6353e4..7f51f5295 100644 --- a/frontend/projects/ui/src/app/components/form-object/form-object.component.ts +++ b/frontend/projects/ui/src/app/components/form-object/form-object.component.ts @@ -278,6 +278,22 @@ export class FormObjectComponent { await alert.present() } + async presentAlertDescription(spec: ValueSpec) { + const { name, description } = spec + + const alert = await this.alertCtrl.create({ + header: name, + message: description, + buttons: [ + { + text: 'OK', + cssClass: 'enter-click', + }, + ], + }) + await alert.present() + } + private deleteListItem(key: string, index: number, markDirty = true): void { if (this.objectListDisplay[key]) this.objectListDisplay[key][index].height = '0px' @@ -352,6 +368,12 @@ export class FormLabelComponent { const alert = await this.alertCtrl.create({ header: name, message: description, + buttons: [ + { + text: 'OK', + cssClass: 'enter-click', + }, + ], }) await alert.present() }