From b48f11b6dd7df3733bf6fd75cb66af773cb59325 Mon Sep 17 00:00:00 2001 From: Tobias Eidelpes Date: Mon, 3 May 2021 15:59:05 +0200 Subject: [PATCH] Show disclaimer when no feeds available --- .../src/app/component/tweets/tweets.component.html | 6 +++--- .../src/app/component/tweets/tweets.component.ts | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/component/tweets/tweets.component.html b/frontend/src/app/component/tweets/tweets.component.html index 7892d63..d31e499 100644 --- a/frontend/src/app/component/tweets/tweets.component.html +++ b/frontend/src/app/component/tweets/tweets.component.html @@ -1,12 +1,12 @@
-
- Kein RSS_Feed vorhanden +
+ Kein RSS-Feed vorhanden
RSS-Feed erstellen
- Kein Tweets vorhanden + Keine Tweets vorhanden
Schau später noch einmal vorbei!
diff --git a/frontend/src/app/component/tweets/tweets.component.ts b/frontend/src/app/component/tweets/tweets.component.ts index e5d58e4..3ee55e2 100644 --- a/frontend/src/app/component/tweets/tweets.component.ts +++ b/frontend/src/app/component/tweets/tweets.component.ts @@ -1,6 +1,9 @@ import {Component, OnInit} from '@angular/core'; import {AuthService} from '../../services/auth.service'; import {HttpClient, HttpHeaders} from '@angular/common/http'; +import {FeedService} from '../../services/feed.service'; +import {IFeed} from '../../interfaces/feed.interface'; +import {Observable} from 'rxjs'; class Tweet { @@ -14,9 +17,16 @@ class Tweet { export class TweetsComponent implements OnInit { tweets: Tweet[] = []; + feeds: Observable[] = []; constructor(private http: HttpClient, - private authService: AuthService) { + private authService: AuthService, + private _feedService: FeedService) { + this._feedService.getFeeds().subscribe( + (data: any) => { + this.feeds = data; + } + ); } ngOnInit(): void {