From bf273cc02f2be1056c82fd2a0c61d1deed149f8f Mon Sep 17 00:00:00 2001 From: Richard Treier Date: Mon, 5 Jun 2023 11:52:54 +0200 Subject: [PATCH] feat: copyright footer (broker) (#302) --- CHANGELOG.md | 6 +++++- src/app/core/services/title-utils.service.ts | 10 ++++++++-- src/app/routes/broker-ui/broker-ui.component.html | 6 +++++- src/app/routes/broker-ui/broker-ui.component.scss | 4 ++-- src/app/routes/broker-ui/broker-ui.component.ts | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43db79fef..f3430540c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,12 @@ the detailed section referring to by linking pull requests or issues. #### Added +- Added Broker PoC UI: + - Refactored Module Structure + - Added Catalog Page + - Added Connector Page + - Added Copyright Footer - Tooltips for Asset Properties that show the asset property names. -- Added Broker UI: Catalog Page, Connector Page #### Changed diff --git a/src/app/core/services/title-utils.service.ts b/src/app/core/services/title-utils.service.ts index cd5e12508..5ac0365de 100644 --- a/src/app/core/services/title-utils.service.ts +++ b/src/app/core/services/title-utils.service.ts @@ -1,4 +1,4 @@ -import {Injectable} from '@angular/core'; +import {Inject, Injectable} from '@angular/core'; import {Title} from '@angular/platform-browser'; import { ActivatedRoute, @@ -8,6 +8,7 @@ import { } from '@angular/router'; import {concat, of} from 'rxjs'; import {filter, map, shareReplay} from 'rxjs/operators'; +import {APP_CONFIG, AppConfig} from '../config/app-config'; @Injectable() export class TitleUtilsService { @@ -18,6 +19,7 @@ export class TitleUtilsService { title$ = this.routeData$.pipe(map((data) => data.title)); constructor( + @Inject(APP_CONFIG) private config: AppConfig, private router: Router, private titleService: Title, private activatedRoute: ActivatedRoute, @@ -25,7 +27,11 @@ export class TitleUtilsService { startUpdatingTitleFromRouteData(defaultTitle: string) { this.title$.subscribe((title) => { - this.titleService.setTitle(`MDS Broker - ${title ?? defaultTitle}`); + let fullTitle = title ?? defaultTitle; + if (this.config.routes === 'broker-ui') { + fullTitle = `MDS Broker - ${fullTitle}`; + } + this.titleService.setTitle(fullTitle); }); } diff --git a/src/app/routes/broker-ui/broker-ui.component.html b/src/app/routes/broker-ui/broker-ui.component.html index 7b125860a..498b6ba84 100644 --- a/src/app/routes/broker-ui/broker-ui.component.html +++ b/src/app/routes/broker-ui/broker-ui.component.html @@ -14,7 +14,7 @@ [attr.src]="config.brandLogoSrc" [style]="config.brandLogoStyle" /> - + +
+
+ © {{ currentYear }} Mobility Data Space +
diff --git a/src/app/routes/broker-ui/broker-ui.component.scss b/src/app/routes/broker-ui/broker-ui.component.scss index 90dfc915c..bde29cdb6 100644 --- a/src/app/routes/broker-ui/broker-ui.component.scss +++ b/src/app/routes/broker-ui/broker-ui.component.scss @@ -25,8 +25,8 @@ background-color: #dedede; } -::ng-deep app-navigation .mat-drawer-inner-container { +::ng-deep .mat-drawer-inner-container { display: flex; flex-direction: column; - overflow: hidden; + overflow: hidden !important; } diff --git a/src/app/routes/broker-ui/broker-ui.component.ts b/src/app/routes/broker-ui/broker-ui.component.ts index 04cc319d0..51319ed7e 100644 --- a/src/app/routes/broker-ui/broker-ui.component.ts +++ b/src/app/routes/broker-ui/broker-ui.component.ts @@ -13,6 +13,7 @@ import {routes} from './broker-ui-routing.module'; providers: [TitleUtilsService], }) export class BrokerUiComponent implements OnInit { + currentYear = new Date().getFullYear(); isHandset$: Observable = this.breakpointObserver .observe(Breakpoints.Handset) .pipe(