added poll support in notifications
This commit is contained in:
parent
ba4fa61667
commit
83258ed553
|
@ -154,6 +154,7 @@ class NotificationWrapper {
|
||||||
case 'mention':
|
case 'mention':
|
||||||
case 'reblog':
|
case 'reblog':
|
||||||
case 'favourite':
|
case 'favourite':
|
||||||
|
case 'poll':
|
||||||
this.status= new StatusWrapper(notification.status, provider);
|
this.status= new StatusWrapper(notification.status, provider);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -164,5 +165,5 @@ class NotificationWrapper {
|
||||||
wrapperId: string;
|
wrapperId: string;
|
||||||
account: Account;
|
account: Account;
|
||||||
status: StatusWrapper;
|
status: StatusWrapper;
|
||||||
type: 'mention' | 'reblog' | 'favourite' | 'follow';
|
type: 'mention' | 'reblog' | 'favourite' | 'follow' | 'poll';
|
||||||
}
|
}
|
|
@ -21,6 +21,14 @@
|
||||||
innerHTML="{{ notificationAccount | accountEmoji }}"></a> boosted your status
|
innerHTML="{{ notificationAccount | accountEmoji }}"></a> boosted your status
|
||||||
</div>
|
</div>
|
||||||
</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 class="status">
|
||||||
<div [ngClass]="{'notification--status': notificationAccount }">
|
<div [ngClass]="{'notification--status': notificationAccount }">
|
||||||
<a href class="status__profile-link" title="{{displayedStatus.account.acct}}"
|
<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 { 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 { Status, Account } from "../../../services/models/mastodon.interfaces";
|
||||||
import { OpenThreadEvent, ToolsService } from "../../../services/tools.service";
|
import { OpenThreadEvent, ToolsService } from "../../../services/tools.service";
|
||||||
|
@ -17,6 +17,7 @@ export class StatusComponent implements OnInit {
|
||||||
|
|
||||||
faStar = faStar;
|
faStar = faStar;
|
||||||
faRetweet = faRetweet;
|
faRetweet = faRetweet;
|
||||||
|
faList = faList;
|
||||||
|
|
||||||
displayedStatus: Status;
|
displayedStatus: Status;
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ export interface Mention {
|
||||||
|
|
||||||
export interface Notification {
|
export interface Notification {
|
||||||
id: string;
|
id: string;
|
||||||
type: 'mention' | 'reblog' | 'favourite' | 'follow';
|
type: 'mention' | 'reblog' | 'favourite' | 'follow' | 'poll';
|
||||||
created_at: string;
|
created_at: string;
|
||||||
account: Account;
|
account: Account;
|
||||||
status?: Status;
|
status?: Status;
|
||||||
|
|
Loading…
Reference in New Issue