2017-06-10 13:55:32 +00:00
|
|
|
<!--
|
|
|
|
Generated template for the StreamPage page.
|
|
|
|
|
|
|
|
See http://ionicframework.com/docs/components/#navigation for more info on
|
|
|
|
Ionic pages and navigation.
|
|
|
|
-->
|
|
|
|
<ion-header>
|
|
|
|
|
|
|
|
<ion-navbar>
|
2017-06-10 15:24:38 +00:00
|
|
|
<button ion-button menuToggle>
|
|
|
|
<ion-icon name="menu"></ion-icon>
|
|
|
|
</button>
|
2017-06-10 17:26:18 +00:00
|
|
|
<ion-title>{{ title }}</ion-title>
|
2017-06-10 13:55:32 +00:00
|
|
|
</ion-navbar>
|
|
|
|
|
|
|
|
</ion-header>
|
|
|
|
|
|
|
|
|
2017-07-06 23:33:48 +00:00
|
|
|
<ion-content overflow-scroll=”true”>
|
2017-06-10 13:55:32 +00:00
|
|
|
|
2017-06-11 05:43:38 +00:00
|
|
|
<ion-refresher (ionRefresh)="fetchNewerPosts($event)">
|
|
|
|
<ion-refresher-content></ion-refresher-content>
|
|
|
|
</ion-refresher>
|
|
|
|
|
2017-06-10 13:55:32 +00:00
|
|
|
<ion-list>
|
2017-06-25 21:01:43 +00:00
|
|
|
<ion-card *ngFor="let post of posts" color="{{ post.you_are_mentioned ? 'mention' : '' }}">
|
|
|
|
<ion-item color="{{ post.you_are_mentioned ? 'mention' : '' }}">
|
2017-06-10 18:53:36 +00:00
|
|
|
<ion-avatar item-start>
|
|
|
|
<img src="{{ post.user.content.avatar_image.link }}">
|
|
|
|
</ion-avatar>
|
|
|
|
<h2>{{ post.user.name }}</h2>
|
|
|
|
<p>@{{ post.user.username }}</p>
|
2017-06-11 14:41:04 +00:00
|
|
|
<ion-note item-end>
|
|
|
|
<div text-right>
|
|
|
|
{{ post.created_at | timeago }}<br/>
|
|
|
|
{{ post.source.name }}
|
|
|
|
</div>
|
2017-06-11 02:12:54 +00:00
|
|
|
</ion-note>
|
2017-06-10 18:53:36 +00:00
|
|
|
</ion-item>
|
|
|
|
<ion-card-content>
|
2017-06-18 17:02:10 +00:00
|
|
|
<div *ngIf="post.is_deleted; else renderBlock"></div>
|
|
|
|
<ng-template #renderBlock >
|
|
|
|
<div [innerHTML]="post.content.html | parser"></div>
|
|
|
|
</ng-template>
|
2017-06-10 18:53:36 +00:00
|
|
|
</ion-card-content>
|
2017-06-10 17:26:18 +00:00
|
|
|
<div *ngIf="post.raw">
|
|
|
|
<div *ngFor="let r of post.raw">
|
|
|
|
<div *ngIf="r.type == 'io.pnut.core.oembed'">
|
2017-06-10 18:53:36 +00:00
|
|
|
<img src="{{ r.value.url }}">
|
2017-06-10 17:26:18 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-06-25 17:52:26 +00:00
|
|
|
<div *ngIf="post.reposted_by_string">
|
|
|
|
<ion-item><ion-note>{{ post.reposted_by_string }}</ion-note></ion-item>
|
|
|
|
</div>
|
2017-06-10 18:53:36 +00:00
|
|
|
<ion-row>
|
|
|
|
<ion-col>
|
2017-06-11 02:12:54 +00:00
|
|
|
<button ion-button icon-left clear small block (click)="showReplyPost(post)">
|
2017-06-11 14:54:09 +00:00
|
|
|
<ion-icon name="ios-undo"></ion-icon>
|
2017-06-10 21:45:02 +00:00
|
|
|
</button>
|
|
|
|
</ion-col>
|
|
|
|
<ion-col>
|
2017-06-11 05:43:38 +00:00
|
|
|
<button ion-button icon-left clear small block (click)="showQuotedPost(post)">
|
2017-06-10 21:45:02 +00:00
|
|
|
<ion-icon name="quote"></ion-icon>
|
|
|
|
</button>
|
|
|
|
</ion-col>
|
2017-06-10 18:53:36 +00:00
|
|
|
<ion-col>
|
2017-06-10 21:45:02 +00:00
|
|
|
<button ion-button icon-left clear small block (click)="repost(post.id, post.you_reposted)">
|
2017-06-10 18:53:36 +00:00
|
|
|
<ion-icon name="repeat"></ion-icon>
|
|
|
|
<div *ngIf="post.counts.reposts > 0">{{ post.counts.reposts }}</div>
|
|
|
|
</button>
|
|
|
|
</ion-col>
|
2017-07-06 23:33:48 +00:00
|
|
|
<ion-col>
|
|
|
|
<button ion-button icon-left clear small block (click)="bookmark(post.id, post.you_bookmarked)">
|
|
|
|
<ion-icon name="star"></ion-icon>
|
|
|
|
<div *ngIf="post.counts.bookmarks > 0">{{ post.counts.bookmarks }}</div>
|
|
|
|
</button>
|
|
|
|
</ion-col>
|
2017-06-10 18:53:36 +00:00
|
|
|
<ion-col>
|
2017-06-11 14:22:49 +00:00
|
|
|
<button ion-button icon-left clear small block (click)="fetchThread(post.thread_id)">
|
2017-06-10 21:45:02 +00:00
|
|
|
<ion-icon name="chatboxes"></ion-icon>
|
2017-06-10 18:53:36 +00:00
|
|
|
<div *ngIf="post.counts.replies > 0">{{ post.counts.replies }}</div>
|
|
|
|
</button>
|
|
|
|
</ion-col>
|
2017-08-04 23:43:48 +00:00
|
|
|
<ion-col>
|
|
|
|
<button ion-button icon-left clear small block (click)="presentPostMenu($event, post)">
|
2017-07-06 23:33:48 +00:00
|
|
|
<ion-icon name="more"></ion-icon>
|
|
|
|
</button>
|
2017-08-04 23:43:48 +00:00
|
|
|
</ion-col>
|
2017-06-10 18:53:36 +00:00
|
|
|
</ion-row>
|
|
|
|
</ion-card>
|
2017-06-10 13:55:32 +00:00
|
|
|
</ion-list>
|
|
|
|
|
2017-06-11 05:43:38 +00:00
|
|
|
<ion-infinite-scroll (ionInfinite)="fetchOlderPosts($event)">
|
|
|
|
<ion-infinite-scroll-content></ion-infinite-scroll-content>
|
|
|
|
</ion-infinite-scroll>
|
|
|
|
|
2017-06-10 21:45:02 +00:00
|
|
|
<ion-fab right bottom>
|
2017-06-11 02:12:54 +00:00
|
|
|
<button ion-fab (click)="showNewPost()">
|
2017-06-10 21:45:02 +00:00
|
|
|
<ion-icon name="add"></ion-icon>
|
|
|
|
</button>
|
|
|
|
</ion-fab>
|
|
|
|
|
2017-06-26 04:19:49 +00:00
|
|
|
<ion-fab *ngIf="showScrollBtn" left bottom>
|
|
|
|
<button ion-fab color="light" (click)="scrollToTop()">
|
|
|
|
<ion-icon name="arrow-dropup"></ion-icon>
|
|
|
|
</button>
|
|
|
|
</ion-fab>
|
|
|
|
|
2017-06-10 13:55:32 +00:00
|
|
|
</ion-content>
|