mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-55165] Remove target=_blank from file preview links (#25317)
This commit is contained in:
parent
dc269f244e
commit
8bf0c19714
@ -4,10 +4,9 @@ exports[`components/FileInfoPreview should match snapshot, can download files 1`
|
||||
<div
|
||||
className="file-details__container"
|
||||
>
|
||||
<ExternalLink
|
||||
<a
|
||||
className="file-details__preview"
|
||||
href="https://pre-release.mattermost.com/api/v4/files/rqir81f7a7ft8m6j6ej7g1txuo"
|
||||
location="file_info_preview"
|
||||
>
|
||||
<span
|
||||
className="file-details__preview-helper"
|
||||
@ -16,7 +15,7 @@ exports[`components/FileInfoPreview should match snapshot, can download files 1`
|
||||
alt="file preview"
|
||||
src={null}
|
||||
/>
|
||||
</ExternalLink>
|
||||
</a>
|
||||
<div
|
||||
className="file-details"
|
||||
>
|
||||
|
@ -5,8 +5,6 @@ import React from 'react';
|
||||
|
||||
import type {FileInfo} from '@mattermost/types/files';
|
||||
|
||||
import ExternalLink from 'components/external_link';
|
||||
|
||||
import * as Utils from 'utils/utils';
|
||||
|
||||
type Props = {
|
||||
@ -36,17 +34,16 @@ export default class FileInfoPreview extends React.PureComponent<Props> {
|
||||
let preview = null;
|
||||
if (this.props.canDownloadFiles) {
|
||||
preview = (
|
||||
<ExternalLink
|
||||
<a
|
||||
className='file-details__preview'
|
||||
href={fileUrl}
|
||||
location='file_info_preview'
|
||||
>
|
||||
<span className='file-details__preview-helper'/>
|
||||
<img
|
||||
alt={'file preview'}
|
||||
src={Utils.getFileIconPath(fileInfo)}
|
||||
/>
|
||||
</ExternalLink>
|
||||
</a>
|
||||
);
|
||||
} else {
|
||||
preview = (
|
||||
|
Loading…
Reference in New Issue
Block a user