diff --git a/ui/page/file/view.jsx b/ui/page/file/view.jsx index a75d497da..987b6bcac 100644 --- a/ui/page/file/view.jsx +++ b/ui/page/file/view.jsx @@ -1,4 +1,5 @@ // @flow +import * as PAGES from 'constants/pages'; import * as React from 'react'; import classnames from 'classnames'; import { lazyImport } from 'util/lazyImport'; @@ -11,6 +12,9 @@ import FileRenderDownload from 'component/fileRenderDownload'; import RecommendedContent from 'component/recommendedContent'; import CollectionContent from 'component/collectionContentSidebar'; import CommentsList from 'component/commentsList'; +import { Redirect } from 'react-router'; +import Button from 'component/button'; +import I18nMessage from 'component/i18nMessage'; import Empty from 'component/common/empty'; const PostViewer = lazyImport(() => import('component/postViewer' /* webpackChunkName: "postViewer" */)); @@ -32,7 +36,9 @@ type Props = { collection?: Collection, collectionId: string, videoTheaterMode: boolean, + claimIsMine: boolean, commentsDisabled: boolean, + isLivestream: boolean, }; function FilePage(props: Props) { @@ -49,9 +55,12 @@ function FilePage(props: Props) { linkedCommentId, setPrimaryUri, videoTheaterMode, + + claimIsMine, commentsDisabled, collection, collectionId, + isLivestream, } = props; const cost = costInfo ? costInfo.cost : null; const hasFileInfo = fileInfo !== undefined; @@ -136,6 +145,10 @@ function FilePage(props: Props) { ); } + if (!claimIsMine && isLivestream) { + return ; + } + if (obscureNsfw && isMature) { return ( @@ -156,6 +169,18 @@ function FilePage(props: Props) { {!isMarkdown && (
+ {claimIsMine && isLivestream && ( +
+

{__('Only visible to you')}

+ + People who view this link will be redirected to your livestream. Make sure to use this for sharing + so your title and thumbnail are displayed properly. + +
+
+
+ )} {RENDER_MODES.FLOATING_MODES.includes(renderMode) && } {commentsDisabled && } {!commentsDisabled && }