fix mobile embed

This commit is contained in:
Rafael 2022-03-16 10:47:30 -03:00 committed by Thomas Zarebczan
parent e93d734fa3
commit d4cb51ff2a
3 changed files with 9 additions and 11 deletions

View file

@ -2,7 +2,6 @@
import { INLINE_PLAYER_WRAPPER_CLASS } from 'component/fileRenderFloating/view';
import * as React from 'react';
import Button from 'component/button';
import classnames from 'classnames';
import FileRenderInitiator from 'component/fileRenderInitiator';
import UriIndicator from 'component/uriIndicator';
@ -82,8 +81,8 @@ class ClaimLink extends React.Component<Props> {
if (allowPreview) {
return (
<div className={classnames('claim-link')}>
<div className={isPlayingInline ? INLINE_PLAYER_WRAPPER_CLASS : undefined}>
<div className="claim-link">
<div className={isPlayingInline ? INLINE_PLAYER_WRAPPER_CLASS : 'embed__inline-wrapper'}>
<FileRenderInitiator uri={uri} parentCommentId={parentCommentId} isMarkdownPost={isMarkdownPost} embedded />
</div>
<Button button="link" className="preview-link__url" label={uri} navigate={uri} />

View file

@ -332,7 +332,7 @@ export default function FileRenderFloating(props: Props) {
'content__viewer--secondary': isComment,
'content__viewer--theater-mode': videoTheaterMode && mainFilePlaying && !isCurrentClaimLive && !isMobile,
'content__viewer--disable-click': wasDragging,
'content__viewer--mobile': isMobile,
'content__viewer--mobile': isMobile && !playingUriSource,
})}
style={
!isFloating && fileViewerRect
@ -340,9 +340,12 @@ export default function FileRenderFloating(props: Props) {
width: fileViewerRect.width,
height: fileViewerRect.height,
left: fileViewerRect.x,
top: isMobile
? HEADER_HEIGHT_MOBILE
: fileViewerRect.windowOffset + fileViewerRect.top - HEADER_HEIGHT - (IS_DESKTOP_MAC ? 24 : 0),
top:
isMobile && !playingUriSource
? HEADER_HEIGHT_MOBILE
: fileViewerRect.windowOffset +
fileViewerRect.top -
(!isMobile ? HEADER_HEIGHT - (IS_DESKTOP_MAC ? 24 : 0) : 0),
}
: {}
}

View file

@ -3,10 +3,6 @@
position: absolute;
top: var(--spacing-s);
border-radius: var(--border-radius);
@media (max-width: $breakpoint-small) {
// margin-top: calc(var(--header-height) - var(--header-height-mobile));
}
}
.content__viewer--mobile {