mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user