Only show first 8 characters of git commit hash on about page

This commit is contained in:
wiz 2020-10-11 20:17:36 +09:00
parent 024b2d58f7
commit 1d8d39db6b
No known key found for this signature in database
GPG Key ID: A394E332255A6173
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@
<br /><br />
<div class="text-small text-center">
Git commit: {{ gitCommit$ | async }}
v2.0-SNAPSHOT ({{ gitCommit$ | async }})
</div>
<br>

View File

@ -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']);