From f127e7c61a64f9d6807bd8afb8e8db1c4cc68436 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 9 Aug 2022 19:28:13 +0200 Subject: [PATCH] Feature/improve styling of benchmarks (#1131) * Harmonize benchmark table styling * Update changelog --- CHANGELOG.md | 1 + .../components/home-market/home-market.html | 1 + .../lib/benchmark/benchmark.component.html | 98 +++++++++---------- .../src/lib/benchmark/benchmark.component.ts | 1 + libs/ui/src/lib/benchmark/benchmark.module.ts | 8 +- 5 files changed, 59 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bd17aead..32bce2498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Simplified the initialization of the exchange rate service +- Improved the styling of the benchmarks in the markets overview ## 1.177.0 - 04.08.2022 diff --git a/apps/client/src/app/components/home-market/home-market.html b/apps/client/src/app/components/home-market/home-market.html index e8cf52bee..b0a01a43c 100644 --- a/apps/client/src/app/components/home-market/home-market.html +++ b/apps/client/src/app/components/home-market/home-market.html @@ -34,6 +34,7 @@ - - - Index - - Change from All Time High - from ATH - - - - - - - -
- {{ benchmark.name }} -
- - - - - -
- {{ resolveMarketCondition(benchmark.marketCondition).emoji }} -
- - - + + + + + + + + + + + + + + + + + +
Index + {{ element?.name }} + + Change from All Time High + from ATH + + + +
+ {{ resolveMarketCondition(element.marketCondition).emoji }} +
+
diff --git a/libs/ui/src/lib/benchmark/benchmark.component.ts b/libs/ui/src/lib/benchmark/benchmark.component.ts index c1e35f438..a5c117c24 100644 --- a/libs/ui/src/lib/benchmark/benchmark.component.ts +++ b/libs/ui/src/lib/benchmark/benchmark.component.ts @@ -18,6 +18,7 @@ export class BenchmarkComponent implements OnChanges { @Input() benchmarks: Benchmark[]; @Input() locale: string; + public displayedColumns = ['name', 'change', 'marketCondition']; public resolveMarketCondition = resolveMarketCondition; public constructor() {} diff --git a/libs/ui/src/lib/benchmark/benchmark.module.ts b/libs/ui/src/lib/benchmark/benchmark.module.ts index 3a0eeb5dd..1768aa39f 100644 --- a/libs/ui/src/lib/benchmark/benchmark.module.ts +++ b/libs/ui/src/lib/benchmark/benchmark.module.ts @@ -1,5 +1,6 @@ import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; +import { MatTableModule } from '@angular/material/table'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { GfValueModule } from '../value'; @@ -8,7 +9,12 @@ import { BenchmarkComponent } from './benchmark.component'; @NgModule({ declarations: [BenchmarkComponent], exports: [BenchmarkComponent], - imports: [CommonModule, GfValueModule, NgxSkeletonLoaderModule], + imports: [ + CommonModule, + GfValueModule, + MatTableModule, + NgxSkeletonLoaderModule + ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) export class GfBenchmarkModule {}