added poll support in notifications
This commit is contained in:
parent
ba4fa61667
commit
83258ed553
|
@ -154,6 +154,7 @@ class NotificationWrapper {
|
|||
case 'mention':
|
||||
case 'reblog':
|
||||
case 'favourite':
|
||||
case 'poll':
|
||||
this.status= new StatusWrapper(notification.status, provider);
|
||||
break;
|
||||
}
|
||||
|
@ -164,5 +165,5 @@ class NotificationWrapper {
|
|||
wrapperId: string;
|
||||
account: Account;
|
||||
status: StatusWrapper;
|
||||
type: 'mention' | 'reblog' | 'favourite' | 'follow';
|
||||
type: 'mention' | 'reblog' | 'favourite' | 'follow' | 'poll';
|
||||
}
|
|
@ -21,6 +21,14 @@
|
|||
innerHTML="{{ notificationAccount | accountEmoji }}"></a> boosted your status
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="notificationType === 'poll'">
|
||||
<div class="notification--icon">
|
||||
<fa-icon class="boost" [icon]="faList"></fa-icon>
|
||||
</div>
|
||||
<div class="notification--label">
|
||||
A poll you have voted in has ended
|
||||
</div>
|
||||
</div>
|
||||
<div class="status">
|
||||
<div [ngClass]="{'notification--status': notificationAccount }">
|
||||
<a href class="status__profile-link" title="{{displayedStatus.account.acct}}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from "@angular/core";
|
||||
import { faStar, faRetweet } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faStar, faRetweet, faList } from "@fortawesome/free-solid-svg-icons";
|
||||
|
||||
import { Status, Account } from "../../../services/models/mastodon.interfaces";
|
||||
import { OpenThreadEvent, ToolsService } from "../../../services/tools.service";
|
||||
|
@ -17,6 +17,7 @@ export class StatusComponent implements OnInit {
|
|||
|
||||
faStar = faStar;
|
||||
faRetweet = faRetweet;
|
||||
faList = faList;
|
||||
|
||||
displayedStatus: Status;
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ export interface Mention {
|
|||
|
||||
export interface Notification {
|
||||
id: string;
|
||||
type: 'mention' | 'reblog' | 'favourite' | 'follow';
|
||||
type: 'mention' | 'reblog' | 'favourite' | 'follow' | 'poll';
|
||||
created_at: string;
|
||||
account: Account;
|
||||
status?: Status;
|
||||
|
|
Loading…
Reference in New Issue