diff options
author | ThibG <thib@sitedethib.com> | 2020-10-26 22:54:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 22:54:50 +0100 |
commit | c762ca49dc924ce32b512c2aece4d7d1e0229b5c (patch) | |
tree | 3f24094f0886e1c437230a1125fbc49dd5cf65a6 /app/javascript/flavours/glitch/features/status/components/detailed_status.js | |
parent | 9c88792f0a60f2b383f0d3919475403e1e244faf (diff) | |
parent | 49ee69f75f24ef13f36cb177d5278fcc3a5f3d37 (diff) |
Merge pull request #1443 from ThibG/glitch-soc/features/upstream-pop-in
Port upstream's pop-in player to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/features/status/components/detailed_status.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/components/detailed_status.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js index e4aecbf94..04d350bcb 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -18,6 +18,7 @@ import classNames from 'classnames'; import PollContainer from 'flavours/glitch/containers/poll_container'; import Icon from 'flavours/glitch/components/icon'; import AnimatedNumber from 'flavours/glitch/components/animated_number'; +import PictureInPicturePlaceholder from 'flavours/glitch/components/picture_in_picture_placeholder'; export default class DetailedStatus extends ImmutablePureComponent { @@ -37,6 +38,7 @@ export default class DetailedStatus extends ImmutablePureComponent { domain: PropTypes.string.isRequired, compact: PropTypes.bool, showMedia: PropTypes.bool, + usingPiP: PropTypes.bool, onToggleMediaVisibility: PropTypes.func, }; @@ -109,7 +111,7 @@ export default class DetailedStatus extends ImmutablePureComponent { render () { const status = (this.props.status && this.props.status.get('reblog')) ? this.props.status.get('reblog') : this.props.status; - const { expanded, onToggleHidden, settings } = this.props; + const { expanded, onToggleHidden, settings, usingPiP } = this.props; const outerStyle = { boxSizing: 'border-box' }; const { compact } = this.props; @@ -131,6 +133,9 @@ export default class DetailedStatus extends ImmutablePureComponent { if (status.get('poll')) { media = <PollContainer pollId={status.get('poll')} />; mediaIcon = 'tasks'; + } else if (usingPiP) { + media = <PictureInPicturePlaceholder />; + mediaIcon = 'video-camera'; } else if (status.get('media_attachments').size > 0) { if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) { media = <AttachmentList media={status.get('media_attachments')} />; |