Show disclaimer when no feeds available
This commit is contained in:
parent
1661d5eaee
commit
b48f11b6dd
@ -1,12 +1,12 @@
|
||||
<app-navigation [activeLink]="'tweets'"></app-navigation>
|
||||
<div class="content">
|
||||
<div class="text-center">
|
||||
<span>Kein RSS_Feed vorhanden</span>
|
||||
<div class="text-center" *ngIf="feeds.length === 0">
|
||||
<span>Kein RSS-Feed vorhanden</span>
|
||||
<br>
|
||||
<span><a routerLink="/einstellungen/editieren">RSS-Feed erstellen</a></span>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<span>Kein Tweets vorhanden</span>
|
||||
<span>Keine Tweets vorhanden</span>
|
||||
<br>
|
||||
<span>Schau später noch einmal vorbei!</span>
|
||||
</div>
|
||||
|
||||
@ -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<IFeed>[] = [];
|
||||
|
||||
constructor(private http: HttpClient,
|
||||
private authService: AuthService) {
|
||||
private authService: AuthService,
|
||||
private _feedService: FeedService) {
|
||||
this._feedService.getFeeds().subscribe(
|
||||
(data: any) => {
|
||||
this.feeds = data;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user