fix date link in status

This commit is contained in:
Nicolas Constant 2019-05-16 00:41:17 -04:00
parent 4362e87806
commit 258fc00914
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 9 additions and 2 deletions

View File

@ -36,7 +36,7 @@
</span>
</a>
<div class="status__created-at" title="{{ displayedStatus.created_at | date: 'full' }}">
<a class="status__created-at--link" href="{{ displayedStatus.url }}" target="_blank">
<a href class="status__created-at--link" (click)="textSelected()" (auxclick)="openUrl()">
{{ status.created_at | timeAgo | async }}
</a>
</div>

View File

@ -149,7 +149,7 @@ export class StatusComponent implements OnInit {
this.browseHashtagEvent.next(hashtag);
}
textSelected(): void {
textSelected(): boolean {
const status = this._statusWrapper.status;
const accountInfo = this._statusWrapper.provider;
@ -161,5 +161,12 @@ export class StatusComponent implements OnInit {
}
this.browseThreadEvent.next(openThread);
return false;
}
openUrl(): boolean {
event.preventDefault();
window.open(this.displayedStatus.url, "_blank");
return false;
}
}