added external link into profile images, fix #254

This commit is contained in:
Nicolas Constant 2020-04-18 18:23:38 -04:00
parent b65737e237
commit 8b397a3f7c
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 3 additions and 4 deletions

View File

@ -215,9 +215,7 @@
</div>
<div *ngIf="statusSection === 'media'" class="status-media">
<div *ngFor="let media of statusWrapper.status.media_attachments">
<a *ngIf="media.type === 'image' || media.type === 'gifv'" href title="open" (click)="openAttachment(media)">
<img class="status-media__image" src="{{media.preview_url}}" />
</a>
<app-attachement-image *ngIf="media.type === 'image' || media.type === 'gifv'" class="status-media__image" [attachment]="media" (openEvent)="openAttachment(media)"></app-attachement-image>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
import { Component, OnInit, Input, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { faUser, faHourglassHalf, faUserCheck, faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
import { faUser, faHourglassHalf, faUserCheck, faExclamationTriangle, faLink } from "@fortawesome/free-solid-svg-icons";
import { faUser as faUserRegular } from "@fortawesome/free-regular-svg-icons";
import { Observable, Subscription } from 'rxjs';
import { Store } from '@ngxs/store';
@ -27,6 +27,7 @@ export class UserProfileComponent implements OnInit {
faHourglassHalf = faHourglassHalf;
faUserCheck = faUserCheck;
faExclamationTriangle = faExclamationTriangle;
faLink = faLink;
displayedAccount: Account;
hasNote: boolean;