mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 01:43:07 +00:00
Merge pull request #8853 from overleaf/jpa-no-pdf-download-in-editor-only-mode
[web] do not download the pdf in editor only view mode GitOrigin-RevId: 4d8936964540c0820f72abb8c858e86e2e7196e2
This commit is contained in:
parent
6cac373446
commit
3c8a9d9863
3 changed files with 7 additions and 3 deletions
|
@ -3,9 +3,13 @@ import useCompileTriggers from '../hooks/use-compile-triggers'
|
|||
import { memo } from 'react'
|
||||
import withErrorBoundary from '../../../infrastructure/error-boundary'
|
||||
import ErrorBoundaryFallback from './error-boundary-fallback'
|
||||
import { useLayoutContext } from '../../../shared/context/layout-context'
|
||||
|
||||
function PdfPreview() {
|
||||
useCompileTriggers()
|
||||
|
||||
const { detachRole } = useLayoutContext()
|
||||
if (detachRole === 'detacher') return null
|
||||
return <PdfPreviewPane />
|
||||
}
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ describe('<ToolbarHeader />', function () {
|
|||
hasPublishPermissions: true,
|
||||
trackChangesVisible: true,
|
||||
handleChangeLayout: () => {},
|
||||
pdfLayout: '',
|
||||
view: '',
|
||||
pdfLayout: 'sideBySide',
|
||||
view: 'editor',
|
||||
reattach: () => {},
|
||||
detach: () => {},
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ export function EditorProviders({
|
|||
fileRefs: [],
|
||||
},
|
||||
],
|
||||
ui = { view: null, pdfLayout: 'flat', chatOpen: true },
|
||||
ui = { view: 'editor', pdfLayout: 'sideBySide', chatOpen: true },
|
||||
fileTreeManager = {
|
||||
findEntityById: () => null,
|
||||
findEntityByPath: () => null,
|
||||
|
|
Loading…
Reference in a new issue