Skip to content

Commit

Permalink
Add share doc and preview only open attachment warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Komediruzecki authored and Rokt33r committed Jul 20, 2022
1 parent 0221606 commit 10a0ae9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/cloud/components/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,9 @@ const Editor = ({
className='scroller'
getEmbed={getEmbed}
scrollerRef={previewRef}
showLinkOpenWarning={
!docIsEditable || !currentUserIsCoreMember
}
/>
</StyledPreview>
</StyledEditor>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const CustomizedMarkdownPreviewer = ({
getEmbed,
scrollerRef,
codeFence = true,
showLinkOpenWarning,
showLinkOpenWarning = false,
}: CustomizedMarkdownViewProps) => {
const { previewStyle } = usePreviewStyle()
const { settings } = useSettings()
Expand Down
1 change: 1 addition & 0 deletions src/mobile/components/pages/DocViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const ViewPage = ({
onRender={onRender.current}
className='scroller'
scrollerRef={previewRef}
showLinkOpenWarning={true}
/>
) : (
<>
Expand Down

0 comments on commit 10a0ae9

Please sign in to comment.