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>
|
<app-navigation [activeLink]="'tweets'"></app-navigation>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="text-center">
|
<div class="text-center" *ngIf="feeds.length === 0">
|
||||||
<span>Kein RSS_Feed vorhanden</span>
|
<span>Kein RSS-Feed vorhanden</span>
|
||||||
<br>
|
<br>
|
||||||
<span><a routerLink="/einstellungen/editieren">RSS-Feed erstellen</a></span>
|
<span><a routerLink="/einstellungen/editieren">RSS-Feed erstellen</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<span>Kein Tweets vorhanden</span>
|
<span>Keine Tweets vorhanden</span>
|
||||||
<br>
|
<br>
|
||||||
<span>Schau später noch einmal vorbei!</span>
|
<span>Schau später noch einmal vorbei!</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {AuthService} from '../../services/auth.service';
|
import {AuthService} from '../../services/auth.service';
|
||||||
import {HttpClient, HttpHeaders} from '@angular/common/http';
|
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 {
|
class Tweet {
|
||||||
|
|
||||||
@ -14,9 +17,16 @@ class Tweet {
|
|||||||
export class TweetsComponent implements OnInit {
|
export class TweetsComponent implements OnInit {
|
||||||
|
|
||||||
tweets: Tweet[] = [];
|
tweets: Tweet[] = [];
|
||||||
|
feeds: Observable<IFeed>[] = [];
|
||||||
|
|
||||||
constructor(private http: HttpClient,
|
constructor(private http: HttpClient,
|
||||||
private authService: AuthService) {
|
private authService: AuthService,
|
||||||
|
private _feedService: FeedService) {
|
||||||
|
this._feedService.getFeeds().subscribe(
|
||||||
|
(data: any) => {
|
||||||
|
this.feeds = data;
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user