-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4668ad
commit 20eb4e6
Showing
2 changed files
with
4 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
frontend/src/app/shared/custom/okr-tangram/okr-tangram.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<img alt="okr-logo" ngSrc="{{ this.trianglesSrc$ | async }}" width="274" height="140" priority /> | ||
<img alt="okr-logo" ngSrc="{{ this.trianglesSrc$ | async }}" width="274" height="140" /> |
8 changes: 3 additions & 5 deletions
8
frontend/src/app/shared/custom/okr-tangram/okr-tangram.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { Component } from '@angular/core'; | ||
import { ConfigService } from '../../../services/config.service'; | ||
import { map, Observable } from 'rxjs'; | ||
import { BehaviorSubject, map, Observable, Subject, Subscription } from 'rxjs'; | ||
|
||
@Component({ | ||
selector: 'app-okr-tangram', | ||
templateUrl: 'okr-tangram.component.html', | ||
styleUrl: 'okr-tangram.component.scss', | ||
}) | ||
export class OkrTangramComponent { | ||
private readonly DEFAULT_TRIANGLE_SRC = 'assets/images/empty.svg'; | ||
private readonly defaultTrianglesSrc = 'assets/images/empty.svg'; | ||
trianglesSrc$ = new Observable<string>(); | ||
|
||
constructor(private readonly configService: ConfigService) { | ||
this.trianglesSrc$ = this.configService.config$.pipe( | ||
map((config) => config.triangles || this.DEFAULT_TRIANGLE_SRC), | ||
); | ||
this.trianglesSrc$ = this.configService.config$.pipe(map((config) => config.triangles || this.defaultTrianglesSrc)); | ||
} | ||
} |