about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components/video_modal.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-11-27 03:24:11 +0100
committerGitHub <noreply@github.com>2020-11-27 03:24:11 +0100
commit1e89e2ed988d2103ecd46e06476d863cb40c57c7 (patch)
tree8106653d22e2f0275529fca4f9f8f763326ccd77 /app/javascript/mastodon/features/ui/components/video_modal.js
parentcb7bd8ee0333b608b168c20f32acf3337412dac0 (diff)
Change media modals look in web UI (#15217)
- Change overlay background to match color of viewed image
- Add interactive reply/boost/favourite buttons to footer of modal
- Change ugly "View context" link to button among the action bar
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/video_modal.js')
-rw-r--r--app/javascript/mastodon/features/ui/components/video_modal.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/app/javascript/mastodon/features/ui/components/video_modal.js b/app/javascript/mastodon/features/ui/components/video_modal.js
index cce6756c3..2c3c026c8 100644
--- a/app/javascript/mastodon/features/ui/components/video_modal.js
+++ b/app/javascript/mastodon/features/ui/components/video_modal.js
@@ -3,9 +3,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
 import PropTypes from 'prop-types';
 import Video from 'mastodon/features/video';
 import ImmutablePureComponent from 'react-immutable-pure-component';
-import { FormattedMessage } from 'react-intl';
-import classNames from 'classnames';
-import Icon from 'mastodon/components/icon';
 
 export const previewState = 'previewVideoModal';
 
@@ -13,7 +10,7 @@ export default class VideoModal extends ImmutablePureComponent {
 
   static propTypes = {
     media: ImmutablePropTypes.map.isRequired,
-    status: ImmutablePropTypes.map,
+    statusId: PropTypes.string,
     options: PropTypes.shape({
       startTime: PropTypes.number,
       autoPlay: PropTypes.bool,
@@ -48,15 +45,8 @@ export default class VideoModal extends ImmutablePureComponent {
     }
   }
 
-  handleStatusClick = e => {
-    if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
-      e.preventDefault();
-      this.context.router.history.push(`/statuses/${this.props.status.get('id')}`);
-    }
-  }
-
   render () {
-    const { media, status, onClose } = this.props;
+    const { media, onClose } = this.props;
     const options = this.props.options || {};
 
     return (
@@ -75,12 +65,6 @@ export default class VideoModal extends ImmutablePureComponent {
             alt={media.get('description')}
           />
         </div>
-
-        {status && (
-          <div className={classNames('media-modal__meta')}>
-            <a href={status.get('url')} onClick={this.handleStatusClick}><Icon id='comments' /> <FormattedMessage id='lightbox.view_context' defaultMessage='View context' /></a>
-          </div>
-        )}
       </div>
     );
   }