From 87e56e2975d2dd8fda14617c97f995389886b62a Mon Sep 17 00:00:00 2001 From: softsimon Date: Thu, 16 Jul 2020 13:37:28 +0700 Subject: [PATCH] Network menu design updates. --- backend/src/api/bisq.ts | 4 ++-- frontend/src/app/app.module.ts | 3 ++- .../master-page/master-page.component.html | 23 ++++++++----------- .../master-page/master-page.component.scss | 9 ++++++++ .../master-page/master-page.component.ts | 9 -------- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/backend/src/api/bisq.ts b/backend/src/api/bisq.ts index 2013e4365..acf8ecf0e 100644 --- a/backend/src/api/bisq.ts +++ b/backend/src/api/bisq.ts @@ -27,12 +27,12 @@ class Bisq { this.loadBisqDumpFile(); let fsWait: NodeJS.Timeout | null = null; - fs.watch(config.BSQ_BLOCKS_DATA_PATH, (event: string, filename: string) => { + fs.watch(config.BSQ_BLOCKS_DATA_PATH, () => { if (fsWait) { clearTimeout(fsWait); } fsWait = setTimeout(() => { - console.log(`${filename} file change detected.`); + console.log(`Change detected in the Bisq data folder.`); this.loadBisqDumpFile(); }, 1000); }); diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index e25791775..7ff1e770b 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -3,7 +3,7 @@ import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { ReactiveFormsModule } from '@angular/forms'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { NgbButtonsModule, NgbTooltipModule, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgbButtonsModule, NgbTooltipModule, NgbPaginationModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; import { InfiniteScrollModule } from 'ngx-infinite-scroll'; import { AppRoutingModule } from './app-routing.module'; @@ -81,6 +81,7 @@ import { SharedModule } from './shared/shared.module'; NgbButtonsModule, NgbTooltipModule, NgbPaginationModule, + NgbDropdownModule, InfiniteScrollModule, SharedModule, ], diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html index 2c08b617a..a80d7782f 100644 --- a/frontend/src/app/components/master-page/master-page.component.html +++ b/frontend/src/app/components/master-page/master-page.component.html @@ -6,24 +6,21 @@
Reconnecting...
- - - -
- - - diff --git a/frontend/src/app/components/master-page/master-page.component.scss b/frontend/src/app/components/master-page/master-page.component.scss index 8e3700b7c..2be014e42 100644 --- a/frontend/src/app/components/master-page/master-page.component.scss +++ b/frontend/src/app/components/master-page/master-page.component.scss @@ -51,3 +51,12 @@ nav { .dropdown-divider { border-top: 1px solid #121420; } + +.dropdown-toggle::after { + vertical-align: 0.1em; +} + +.dropdown-item { + display: flex; + align-items:center; +} diff --git a/frontend/src/app/components/master-page/master-page.component.ts b/frontend/src/app/components/master-page/master-page.component.ts index bda40cea5..7aa81fa07 100644 --- a/frontend/src/app/components/master-page/master-page.component.ts +++ b/frontend/src/app/components/master-page/master-page.component.ts @@ -15,19 +15,10 @@ export class MasterPageComponent implements OnInit { navCollapsed = false; connectionState = 2; - networkDropdownHidden = true; - constructor( private stateService: StateService, ) { } - @HostListener('document:click', ['$event']) - documentClick(event: any): void { - if (!event.target.classList.contains('dropdown-toggle')) { - this.networkDropdownHidden = true; - } - } - ngOnInit() { this.stateService.connectionState$ .subscribe((state) => {