From 18fd07182cdbf03667012a750e89ba4d5b875686 Mon Sep 17 00:00:00 2001 From: Jakeeyturner Date: Thu, 16 Mar 2017 09:33:34 +0000 Subject: [PATCH] Nitpick fix, updated export modal --- .../composer-playground/src/app/app.module.ts | 3 -- .../src/app/editor/editor.component.ts | 4 +-- .../src/app/export/export.component.html | 19 ------------- .../src/app/export/export.component.scss | 9 ------ .../src/app/export/export.component.spec.ts | 28 ------------------- .../src/app/export/export.component.ts | 23 --------------- .../src/app/export/index.ts | 1 - .../src/assets/styles/elements/_button.scss | 5 +++- 8 files changed, 5 insertions(+), 87 deletions(-) delete mode 100644 packages/composer-playground/src/app/export/export.component.html delete mode 100644 packages/composer-playground/src/app/export/export.component.scss delete mode 100644 packages/composer-playground/src/app/export/export.component.spec.ts delete mode 100644 packages/composer-playground/src/app/export/export.component.ts delete mode 100644 packages/composer-playground/src/app/export/index.ts diff --git a/packages/composer-playground/src/app/app.module.ts b/packages/composer-playground/src/app/app.module.ts index a194139bef..6a9e04bb4c 100644 --- a/packages/composer-playground/src/app/app.module.ts +++ b/packages/composer-playground/src/app/app.module.ts @@ -31,7 +31,6 @@ import { SuccessComponent } from './success'; import { ResetComponent } from './reset'; import { FileImporterComponent } from './file-importer'; import { ImportComponent } from './import'; -import { ExportComponent } from './export'; import { ResourceComponent } from './resource'; import { AddFileComponent } from './add-file'; import { TransactionComponent } from './transaction'; @@ -85,7 +84,6 @@ type StoreType = { bootstrap: [ AppComponent ], entryComponents: [ ImportComponent, - ExportComponent, ErrorComponent, SuccessComponent, ConfirmComponent, @@ -111,7 +109,6 @@ type StoreType = { ConfirmComponent, ResetComponent, ImportComponent, - ExportComponent, GithubComponent, NoContentComponent, AboutComponent, diff --git a/packages/composer-playground/src/app/editor/editor.component.ts b/packages/composer-playground/src/app/editor/editor.component.ts index 100e34ddb9..76dbf83426 100644 --- a/packages/composer-playground/src/app/editor/editor.component.ts +++ b/packages/composer-playground/src/app/editor/editor.component.ts @@ -447,9 +447,7 @@ export class EditorComponent implements OnInit { this.deployedPackageName + '.bna', { type: 'application/octet-stream' }); saveAs(file); - - this.modalService.open(ExportComponent); - + this.alertService.successStatus$.next(this.deployedPackageName + '.bna was exported'); }); } diff --git a/packages/composer-playground/src/app/export/export.component.html b/packages/composer-playground/src/app/export/export.component.html deleted file mode 100644 index 762f50933a..0000000000 --- a/packages/composer-playground/src/app/export/export.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- -
diff --git a/packages/composer-playground/src/app/export/export.component.scss b/packages/composer-playground/src/app/export/export.component.scss deleted file mode 100644 index dc8b0b6628..0000000000 --- a/packages/composer-playground/src/app/export/export.component.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../assets/styles/base/_colors.scss'; -@import '../../assets/styles/base/_variables.scss'; - -.export { - max-width: 660px; - .margin-right{ - margin-right: $space-smedium; - } -} diff --git a/packages/composer-playground/src/app/export/export.component.spec.ts b/packages/composer-playground/src/app/export/export.component.spec.ts deleted file mode 100644 index 7c284bc1b9..0000000000 --- a/packages/composer-playground/src/app/export/export.component.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* tslint:disable:no-unused-variable */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { DebugElement } from '@angular/core'; - -import { ExportComponent } from './export.component'; - -describe('ImportComponent', () => { - // let component: ExportComponent; - // let fixture: ComponentFixture; - - // beforeEach(async(() => { - // TestBed.configureTestingModule({ - // declarations: [ ExportComponent ] - // }) - // .compileComponents(); - // })); - - // beforeEach(() => { - // fixture = TestBed.createComponent(ExportComponent); - // component = fixture.componentInstance; - // fixture.detectChanges(); - // }); - - // it('should create', () => { - // expect(component).toBeTruthy(); - // }); -}); diff --git a/packages/composer-playground/src/app/export/export.component.ts b/packages/composer-playground/src/app/export/export.component.ts deleted file mode 100644 index 8fa5b228be..0000000000 --- a/packages/composer-playground/src/app/export/export.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {Component, OnInit} from '@angular/core'; -import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap'; -import {ClientService} from '../services/client.service'; - -@Component({ - selector: 'export-modal', - templateUrl: 'export.component.html', - styleUrls: ['./export.component.scss'.toString()] -}) -export class ExportComponent implements OnInit { - private fileName; - - constructor(public activeModal: NgbActiveModal,private clientService: ClientService) { - let businessNetworkDefinition = clientService.getBusinessNetwork(); - this.fileName = businessNetworkDefinition.getName(); - - } - - ngOnInit(){ - console.log('Exported:',this.fileName); - }; - -} diff --git a/packages/composer-playground/src/app/export/index.ts b/packages/composer-playground/src/app/export/index.ts deleted file mode 100644 index 93b65e842f..0000000000 --- a/packages/composer-playground/src/app/export/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './export.component'; diff --git a/packages/composer-playground/src/assets/styles/elements/_button.scss b/packages/composer-playground/src/assets/styles/elements/_button.scss index 668c6e18a2..d24afe21e0 100644 --- a/packages/composer-playground/src/assets/styles/elements/_button.scss +++ b/packages/composer-playground/src/assets/styles/elements/_button.scss @@ -71,6 +71,7 @@ color: $white; } + &.active, &:active, &:focus { background-color: $second-highlight; border-color: $second-highlight; @@ -79,8 +80,10 @@ &[disabled], &[disabled]:hover { border-color: $fifth-highlight; - color: $fifth-highlight + color: $fifth-highlight; + background-color:$white; } + } &.expand {