clean up
This commit is contained in:
parent
74a8dd21f1
commit
c7b256b16f
|
@ -1,11 +1,7 @@
|
|||
import { Component, OnInit, Input, Output, Inject, LOCALE_ID, ElementRef, EventEmitter, Pipe, PipeTransform, ViewChild, Renderer2 } from "@angular/core";
|
||||
import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core";
|
||||
import { Status, Account } from "../../../services/models/mastodon.interfaces";
|
||||
import { formatDate } from '@angular/common';
|
||||
import { stateNameErrorMessage } from "@ngxs/store/src/decorators/state";
|
||||
import { StatusWrapper } from "../stream.component";
|
||||
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
|
||||
@Component({
|
||||
selector: "app-status",
|
||||
templateUrl: "./status.component.html",
|
||||
|
@ -28,10 +24,6 @@ export class StatusComponent implements OnInit {
|
|||
this._statusWrapper = value;
|
||||
this.status = value.status;
|
||||
|
||||
//TEST
|
||||
//this.status.content += '<br/><br/><a href class="test">TEST</a>';
|
||||
|
||||
|
||||
if (this.status.reblog) {
|
||||
this.reblog = true;
|
||||
this.displayedStatus = this.status.reblog;
|
||||
|
@ -46,31 +38,16 @@ export class StatusComponent implements OnInit {
|
|||
if (this.displayedStatus.media_attachments && this.displayedStatus.media_attachments.length > 0) {
|
||||
this.hasAttachments = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
get statusWrapper(): StatusWrapper {
|
||||
return this._statusWrapper;
|
||||
}
|
||||
|
||||
|
||||
constructor(@Inject(LOCALE_ID) private locale: string) { }
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
// ngAfterViewInit() {
|
||||
// let el = this.contentElement.nativeElement.querySelector('.test');
|
||||
// console.log(this.contentElement.nativeElement);
|
||||
// console.log(el);
|
||||
// if (el)
|
||||
// this.renderer.listen(el, 'click', (el2) => {
|
||||
// console.log(el2);
|
||||
// console.warn('YOOOOO');
|
||||
// return false;
|
||||
// });
|
||||
// }
|
||||
|
||||
openAccount(account: Account): boolean {
|
||||
let accountName = account.acct;
|
||||
if(!accountName.includes('@'))
|
||||
|
@ -80,24 +57,6 @@ export class StatusComponent implements OnInit {
|
|||
return false;
|
||||
}
|
||||
|
||||
// getCompactRelativeTime(d: string): string {
|
||||
// const date = (new Date(d)).getTime();
|
||||
// const now = Date.now();
|
||||
// const timeDelta = (now - date) / (1000);
|
||||
|
||||
// if (timeDelta < 60) {
|
||||
// return `${timeDelta | 0}s`;
|
||||
// } else if (timeDelta < 60 * 60) {
|
||||
// return `${timeDelta / 60 | 0}m`;
|
||||
// } else if (timeDelta < 60 * 60 * 24) {
|
||||
// return `${timeDelta / (60 * 60) | 0}h`;
|
||||
// } else if (timeDelta < 60 * 60 * 24 * 31) {
|
||||
// return `${timeDelta / (60 * 60 * 24) | 0}d`;
|
||||
// }
|
||||
|
||||
// return formatDate(date, 'MM/dd', this.locale);
|
||||
// }
|
||||
|
||||
openReply(): boolean {
|
||||
this.replyingToStatus = !this.replyingToStatus;
|
||||
|
||||
|
@ -109,11 +68,6 @@ export class StatusComponent implements OnInit {
|
|||
return false;
|
||||
}
|
||||
|
||||
// test(): boolean {
|
||||
// console.warn('heeeeyaaa!');
|
||||
// return false;
|
||||
// }
|
||||
|
||||
accountSelected(accountName: string): void {
|
||||
console.warn(`status comp: accountSelected ${accountName}`);
|
||||
this.browseAccount.next(accountName);
|
||||
|
|
Loading…
Reference in New Issue