|
|
@ -1,12 +1,12 @@ |
|
|
|
import React from 'react'; |
|
|
|
import { decode } from 'blurhash'; |
|
|
|
import PropTypes from 'prop-types'; |
|
|
|
import classNames from 'classnames'; |
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes'; |
|
|
|
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component'; |
|
|
|
|
|
|
|
import Icon from 'flavours/glitch/components/icon'; |
|
|
|
import Icon from 'flavours/glitch/components/icon'; |
|
|
|
import { autoPlayGif, displayMedia } from 'flavours/glitch/util/initial_state'; |
|
|
|
import { autoPlayGif, displayMedia } from 'flavours/glitch/util/initial_state'; |
|
|
|
import classNames from 'classnames'; |
|
|
|
|
|
|
|
import { decode } from 'blurhash'; |
|
|
|
|
|
|
|
import { isIOS } from 'flavours/glitch/util/is_mobile'; |
|
|
|
import { isIOS } from 'flavours/glitch/util/is_mobile'; |
|
|
|
|
|
|
|
import PropTypes from 'prop-types'; |
|
|
|
|
|
|
|
import React from 'react'; |
|
|
|
|
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes'; |
|
|
|
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component'; |
|
|
|
|
|
|
|
|
|
|
|
export default class MediaItem extends ImmutablePureComponent { |
|
|
|
export default class MediaItem extends ImmutablePureComponent { |
|
|
|
|
|
|
|
|
|
|
@ -148,7 +148,7 @@ export default class MediaItem extends ImmutablePureComponent { |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className='account-gallery__item' style={{ width, height }}> |
|
|
|
<div className='account-gallery__item' style={{ width, height }}> |
|
|
|
<a className='media-gallery__item-thumbnail' href={status.get('url')} target='_blank' onClick={this.handleClick} title={title}> |
|
|
|
<a className='media-gallery__item-thumbnail' href={status.get('url')} onClick={this.handleClick} title={title} target='_blank' rel='noopener noreferrer'> |
|
|
|
<canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': visible && loaded })} /> |
|
|
|
<canvas width={32} height={32} ref={this.setCanvasRef} className={classNames('media-gallery__preview', { 'media-gallery__preview--hidden': visible && loaded })} /> |
|
|
|
{visible ? thumbnail : icon} |
|
|
|
{visible ? thumbnail : icon} |
|
|
|
</a> |
|
|
|
</a> |
|
|
|