Skip to content

Commit

Permalink
feat: copyright footer (broker) (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtreier authored Jun 5, 2023
1 parent ce83762 commit bf273cc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 8 additions & 2 deletions src/app/core/services/title-utils.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Injectable} from '@angular/core';
import {Inject, Injectable} from '@angular/core';
import {Title} from '@angular/platform-browser';
import {
ActivatedRoute,
Expand All @@ -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 {
Expand All @@ -18,14 +19,19 @@ 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,
) {}

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);
});
}

Expand Down
6 changes: 5 additions & 1 deletion src/app/routes/broker-ui/broker-ui.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[attr.src]="config.brandLogoSrc"
[style]="config.brandLogoStyle" />
</mat-toolbar>
<mat-nav-list class="overflow-auto grow">
<mat-nav-list class="overflow-auto grow !flex flex-col">
<ng-container *ngFor="let route of routes">
<a *ngIf="!route.data?.hideInNav" [routerLink]="[route.path]">
<mat-list-item
Expand All @@ -30,6 +30,10 @@
</mat-list-item>
</a></ng-container
>
<div class="grow"></div>
<div class="shrink-0 p-x-[15px] p-y-[10px]">
&copy; {{ currentYear }} Mobility Data Space
</div>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content>
Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/broker-ui/broker-ui.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions src/app/routes/broker-ui/broker-ui.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {routes} from './broker-ui-routing.module';
providers: [TitleUtilsService],
})
export class BrokerUiComponent implements OnInit {
currentYear = new Date().getFullYear();
isHandset$: Observable<boolean> = this.breakpointObserver
.observe(Breakpoints.Handset)
.pipe(
Expand Down

0 comments on commit bf273cc

Please sign in to comment.