diff --git a/frontend/src/app/components/footer/footer.component.html b/frontend/src/app/components/footer/footer.component.html index baa120e..42dffef 100644 --- a/frontend/src/app/components/footer/footer.component.html +++ b/frontend/src/app/components/footer/footer.component.html @@ -5,9 +5,9 @@ Made with favorite_border by - Rubikscraft + + Rubikscraft + {{ isDemo ? ' - Demo Version' : '' }} @@ -16,9 +16,9 @@  - {{ version }} - - Source Code + + Source Code +

diff --git a/frontend/src/app/components/footer/footer.component.ts b/frontend/src/app/components/footer/footer.component.ts index 0895e49..bdadd2a 100644 --- a/frontend/src/app/components/footer/footer.component.ts +++ b/frontend/src/app/components/footer/footer.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator'; import { InfoService } from 'src/app/services/api/info.service'; @@ -6,9 +6,13 @@ import { InfoService } from 'src/app/services/api/info.service'; selector: 'app-footer', templateUrl: './footer.component.html', styleUrls: ['./footer.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, }) export class FooterComponent implements OnInit { - constructor(private readonly infoService: InfoService) {} + constructor( + private readonly infoService: InfoService, + private readonly changeDetector: ChangeDetectorRef, + ) {} isDemo: boolean = false; version: string = 'Unkown Version'; @@ -22,6 +26,7 @@ export class FooterComponent implements OnInit { return this.infoService.live.subscribe((info) => { this.isDemo = info.demo; this.version = 'V' + info.version; + this.changeDetector.markForCheck(); }); } } diff --git a/frontend/src/app/components/header/header.component.html b/frontend/src/app/components/header/header.component.html index 5a33d03..9640bf0 100644 --- a/frontend/src/app/components/header/header.component.html +++ b/frontend/src/app/components/header/header.component.html @@ -1,6 +1,6 @@