mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #23374 from overleaf/dp-compile-button-2
Use old pdf compile button in new editor GitOrigin-RevId: 85a1bacf94b3fb569f95fcea23a16f5f51f29bcd
This commit is contained in:
committed by
Copybot
parent
f166e9263c
commit
f5375f47a2
-33
@@ -1,33 +0,0 @@
|
|||||||
import { useTranslation } from 'react-i18next'
|
|
||||||
import { memo } from 'react'
|
|
||||||
import { useDetachCompileContext as useCompileContext } from '../../../../shared/context/detach-compile-context'
|
|
||||||
import OLButton from '@/features/ui/components/ol/ol-button'
|
|
||||||
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
|
|
||||||
import MaterialIcon from '@/shared/components/material-icon'
|
|
||||||
|
|
||||||
function PdfCompileButton() {
|
|
||||||
const { compiling, startCompile } = useCompileContext()
|
|
||||||
const { t } = useTranslation()
|
|
||||||
|
|
||||||
return (
|
|
||||||
<OLTooltip
|
|
||||||
id="download-pdf"
|
|
||||||
description={compiling ? t('compiling') : t('recompile')}
|
|
||||||
overlayProps={{ placement: 'bottom' }}
|
|
||||||
>
|
|
||||||
{/* TODO: add some indicator that changes have been made */}
|
|
||||||
<OLButton
|
|
||||||
onClick={startCompile}
|
|
||||||
variant="link"
|
|
||||||
className="pdf-toolbar-btn"
|
|
||||||
isLoading={compiling}
|
|
||||||
style={{ pointerEvents: 'auto' }}
|
|
||||||
aria-label={t('download_pdf')}
|
|
||||||
>
|
|
||||||
<MaterialIcon type="refresh" />
|
|
||||||
</OLButton>
|
|
||||||
</OLTooltip>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default memo(PdfCompileButton)
|
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { memo } from 'react'
|
import { memo } from 'react'
|
||||||
import OlButtonToolbar from '@/features/ui/components/ol/ol-button-toolbar'
|
import OlButtonToolbar from '@/features/ui/components/ol/ol-button-toolbar'
|
||||||
import PdfCompileButton from './pdf-compile-button'
|
import PdfCompileButton from '@/features/pdf-preview/components/pdf-compile-button'
|
||||||
import PdfHybridDownloadButton from '@/features/pdf-preview/components/pdf-hybrid-download-button'
|
import PdfHybridDownloadButton from '@/features/pdf-preview/components/pdf-hybrid-download-button'
|
||||||
|
|
||||||
function PdfPreviewHybridToolbar() {
|
function PdfPreviewHybridToolbar() {
|
||||||
|
|||||||
Reference in New Issue
Block a user