Sengi-Windows-MacOS-Linux/src/app/components/floating-column/manage-account/notifications/notification/notification.component.ts

40 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-06-14 09:07:44 +02:00
import { Component, Input } from '@angular/core';
2019-11-19 05:54:11 +01:00
import { faUserPlus } from "@fortawesome/free-solid-svg-icons";
import { NotificationWrapper } from '../notifications.component';
2020-06-14 09:07:44 +02:00
import { ToolsService } from '../../../../../services/tools.service';
2019-11-19 05:54:11 +01:00
import { Account } from '../../../../../services/models/mastodon.interfaces';
2020-06-14 09:07:44 +02:00
import { BrowseBase } from '../../../../../components/common/browse-base';
2019-11-19 05:54:11 +01:00
@Component({
selector: 'app-notification',
templateUrl: './notification.component.html',
styleUrls: ['./notification.component.scss']
})
2020-06-14 09:07:44 +02:00
export class NotificationComponent extends BrowseBase {
2019-11-19 05:54:11 +01:00
faUserPlus = faUserPlus;
@Input() notification: NotificationWrapper;
2020-06-14 09:07:44 +02:00
constructor(private readonly toolsService: ToolsService) {
super();
2019-11-19 05:54:11 +01:00
}
2020-06-14 09:07:44 +02:00
ngOnInit() {
2019-11-19 05:54:11 +01:00
}
2020-06-14 09:07:44 +02:00
ngOnDestroy() {
2019-11-19 05:54:11 +01:00
}
openAccount(account: Account): boolean {
let accountName = this.toolsService.getAccountFullHandle(account);
this.browseAccountEvent.next(accountName);
return false;
}
openUrl(url: string): boolean {
window.open(url, '_blank');
return false;
}
}