From 1d8d39db6b00259cc3a0481a1013f5b29d6bd2a3 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 11 Oct 2020 20:17:36 +0900 Subject: [PATCH] Only show first 8 characters of git commit hash on about page --- frontend/src/app/components/about/about.component.html | 2 +- frontend/src/app/components/about/about.component.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index deb8825dd..afadfca67 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -5,7 +5,7 @@

- Git commit: {{ gitCommit$ | async }} + v2.0-SNAPSHOT ({{ gitCommit$ | async }})

diff --git a/frontend/src/app/components/about/about.component.ts b/frontend/src/app/components/about/about.component.ts index a239adf46..fc7eb6bc4 100644 --- a/frontend/src/app/components/about/about.component.ts +++ b/frontend/src/app/components/about/about.component.ts @@ -7,6 +7,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { ApiService } from 'src/app/services/api.service'; import { env } from '../../app.constants'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; +import { map } from 'rxjs/operators'; @Component({ selector: 'app-about', @@ -33,7 +34,7 @@ export class AboutComponent implements OnInit { ) { } ngOnInit() { - this.gitCommit$ = this.stateService.gitCommit$; + this.gitCommit$ = this.stateService.gitCommit$.pipe(map((str) => str.substr(0, 8))); this.seoService.setTitle('About'); this.websocketService.want(['blocks']);