From b7ce474ad894e2562f0368bc84e96b510e797aca Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Fri, 17 Feb 2017 19:17:07 +0800 Subject: [PATCH] refine harbor shell component --- .../account-settings-modal.component.html | 32 ++++++++++ .../account-settings-modal.component.ts | 25 ++++++++ .../base-settings.component.html | 12 ---- .../base-settings/base-settings.component.ts | 16 ----- harbor-app/src/app/base/base.module.ts | 6 +- .../global-search.component.html | 10 +-- .../harbor-shell/harbor-shell.component.html | 62 +++++++------------ .../harbor-shell/harbor-shell.component.ts | 44 ++++++++++++- harbor-app/src/app/base/modal-event.ts | 5 ++ .../base/navigator/navigator.component.html | 28 +++------ .../app/base/navigator/navigator.component.ts | 13 +++- 11 files changed, 157 insertions(+), 96 deletions(-) create mode 100644 harbor-app/src/app/base/account-settings/account-settings-modal.component.html create mode 100644 harbor-app/src/app/base/account-settings/account-settings-modal.component.ts delete mode 100644 harbor-app/src/app/base/base-settings/base-settings.component.html delete mode 100644 harbor-app/src/app/base/base-settings/base-settings.component.ts create mode 100644 harbor-app/src/app/base/modal-event.ts diff --git a/harbor-app/src/app/base/account-settings/account-settings-modal.component.html b/harbor-app/src/app/base/account-settings/account-settings-modal.component.html new file mode 100644 index 000000000..fff3ba84e --- /dev/null +++ b/harbor-app/src/app/base/account-settings/account-settings-modal.component.html @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/harbor-app/src/app/base/account-settings/account-settings-modal.component.ts b/harbor-app/src/app/base/account-settings/account-settings-modal.component.ts new file mode 100644 index 000000000..d8f86ac88 --- /dev/null +++ b/harbor-app/src/app/base/account-settings/account-settings-modal.component.ts @@ -0,0 +1,25 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: "account-settings-modal", + templateUrl: "account-settings-modal.component.html" +}) + +export class AccountSettingsModalComponent{ + opened:boolean = false; + staticBackdrop: boolean = true; + + open() { + this.opened = true; + } + + close() { + this.opened = false; + } + + submit() { + console.info("ok here!"); + this.close(); + } + +} \ No newline at end of file diff --git a/harbor-app/src/app/base/base-settings/base-settings.component.html b/harbor-app/src/app/base/base-settings/base-settings.component.html deleted file mode 100644 index 6a87002b9..000000000 --- a/harbor-app/src/app/base/base-settings/base-settings.component.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file diff --git a/harbor-app/src/app/base/base-settings/base-settings.component.ts b/harbor-app/src/app/base/base-settings/base-settings.component.ts deleted file mode 100644 index 99a8abdf2..000000000 --- a/harbor-app/src/app/base/base-settings/base-settings.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: "base-settings", - templateUrl: "base-settings.component.html" -}) - -/** - * Component to handle the account settings - */ -export class BaseSettingsComponent implements OnInit { - - ngOnInit(): void { - } - -} diff --git a/harbor-app/src/app/base/base.module.ts b/harbor-app/src/app/base/base.module.ts index 2b4242193..1b31cc6a3 100644 --- a/harbor-app/src/app/base/base.module.ts +++ b/harbor-app/src/app/base/base.module.ts @@ -9,7 +9,7 @@ import { NavigatorComponent } from './navigator/navigator.component'; import { GlobalSearchComponent } from './global-search/global-search.component'; import { FooterComponent } from './footer/footer.component'; import { HarborShellComponent } from './harbor-shell/harbor-shell.component'; -import { BaseSettingsComponent } from './base-settings/base-settings.component'; +import { AccountSettingsModalComponent } from './account-settings/account-settings-modal.component'; import { BaseRoutingModule } from './base-routing.module'; @@ -24,9 +24,9 @@ import { BaseRoutingModule } from './base-routing.module'; declarations: [ NavigatorComponent, GlobalSearchComponent, - BaseSettingsComponent, FooterComponent, - HarborShellComponent + HarborShellComponent, + AccountSettingsModalComponent ], exports: [ HarborShellComponent ] }) diff --git a/harbor-app/src/app/base/global-search/global-search.component.html b/harbor-app/src/app/base/global-search/global-search.component.html index def5c50e1..2ff6858a7 100644 --- a/harbor-app/src/app/base/global-search/global-search.component.html +++ b/harbor-app/src/app/base/global-search/global-search.component.html @@ -1,5 +1,5 @@ - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/harbor-app/src/app/base/harbor-shell/harbor-shell.component.html b/harbor-app/src/app/base/harbor-shell/harbor-shell.component.html index f56210587..c56668b46 100644 --- a/harbor-app/src/app/base/harbor-shell/harbor-shell.component.html +++ b/harbor-app/src/app/base/harbor-shell/harbor-shell.component.html @@ -1,41 +1,27 @@ - - -