From 30b10f252a6005e65891e6f9e1853efed53917a0 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Mon, 30 Mar 2020 13:38:27 -0400 Subject: [PATCH] Tidying up --- src/app/api-errors/api-errors.component.spec.ts | 10 +++++++++- src/app/diagram/diagram.component.ts | 5 ++++- src/app/file-list/file-list.component.html | 4 ++-- src/app/file-list/file-list.component.scss | 5 +++++ src/app/file-list/file-list.component.ts | 2 -- .../workflow-spec-list.component.scss | 6 ++++++ 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/app/api-errors/api-errors.component.spec.ts b/src/app/api-errors/api-errors.component.spec.ts index 8ec5518..13c2b67 100644 --- a/src/app/api-errors/api-errors.component.spec.ts +++ b/src/app/api-errors/api-errors.component.spec.ts @@ -1,5 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import {MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef} from '@angular/material/bottom-sheet'; +import {MatIconModule} from '@angular/material/icon'; +import {MatListModule} from '@angular/material/list'; import { ApiErrorsComponent } from './api-errors.component'; @@ -9,7 +11,13 @@ describe('ApiErrorsComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ApiErrorsComponent ], + declarations: [ + ApiErrorsComponent + ], + imports: [ + MatIconModule, + MatListModule, + ], providers: [ { provide: MatBottomSheetRef, diff --git a/src/app/diagram/diagram.component.ts b/src/app/diagram/diagram.component.ts index 060b35b..7fc56a3 100644 --- a/src/app/diagram/diagram.component.ts +++ b/src/app/diagram/diagram.component.ts @@ -203,7 +203,10 @@ export class DiagramComponent implements ControlValueAccessor, AfterViewInit { this.modeler.on('commandStack.changed', () => this.saveDiagram()); this.modeler.on('views.changed', () => { - this.modeler.getActiveViewer().get('eventBus').on('commandStack.changed', () => this.saveDiagram()); + const viewer = this.modeler.getActiveViewer(); + if (viewer) { + viewer.get('eventBus').on('commandStack.changed', () => this.saveDiagram()); + } this.saveDiagram(); }); diff --git a/src/app/file-list/file-list.component.html b/src/app/file-list/file-list.component.html index 463d567..09e911f 100644 --- a/src/app/file-list/file-list.component.html +++ b/src/app/file-list/file-list.component.html @@ -7,11 +7,11 @@ > {{fm.type | getIconCode}} - - diff --git a/src/app/file-list/file-list.component.scss b/src/app/file-list/file-list.component.scss index f97a645..35567fc 100644 --- a/src/app/file-list/file-list.component.scss +++ b/src/app/file-list/file-list.component.scss @@ -9,3 +9,8 @@ cursor: pointer; } } + +.make-primary { + padding-right: 4rem; + margin-right: 4rem; +} diff --git a/src/app/file-list/file-list.component.ts b/src/app/file-list/file-list.component.ts index fbc70e1..c12a8b5 100644 --- a/src/app/file-list/file-list.component.ts +++ b/src/app/file-list/file-list.component.ts @@ -112,8 +112,6 @@ export class FileListComponent implements OnInit { workflow_spec_id: this.workflowSpec.id, }; - console.log('data.fileMetaId', data.fileMetaId); - console.log('isNumberDefined(data.fileMetaId)', isNumberDefined(data.fileMetaId)); if (isNumberDefined(data.fileMetaId)) { // Update existing file this.api.updateFileData(newFileMeta).subscribe(() => { diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.scss b/src/app/workflow-spec-list/workflow-spec-list.component.scss index c61b1b3..4d14106 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.scss +++ b/src/app/workflow-spec-list/workflow-spec-list.component.scss @@ -23,3 +23,9 @@ } } } + +.workflow-spec-actions { + button { + margin-right: 1em; + } +}