mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Add hotfixes 6.1.1 and 6.1.2 (adapted)
This commit is contained in:
12
server-ce/hotfix/6.1.1/Dockerfile
Normal file
12
server-ce/hotfix/6.1.1/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM sharelatex/sharelatex:6.1.0
|
||||||
|
|
||||||
|
# Apply security updates to base image
|
||||||
|
RUN apt update && apt install -y linux-libc-dev \
|
||||||
|
&& unattended-upgrade --verbose --no-minimal-upgrade-steps \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Fix rendering logic for UI elements in the redesigned editor
|
||||||
|
COPY pr_31004.patch .
|
||||||
|
RUN patch -p1 < pr_31004.patch && rm pr_31004.patch
|
||||||
|
|
||||||
|
RUN node genScript compile | bash
|
||||||
131
server-ce/hotfix/6.1.1/pr_31004.patch
Normal file
131
server-ce/hotfix/6.1.1/pr_31004.patch
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
--- a/services/web/frontend/js/features/ide-redesign/components/rail/rail-help-dropdown.tsx
|
||||||
|
+++ b/services/web/frontend/js/features/ide-redesign/components/rail/rail-help-dropdown.tsx
|
||||||
|
@@ -10,6 +10,7 @@ import {
|
||||||
|
|
||||||
|
export default function RailHelpDropdown() {
|
||||||
|
const showSupport = getMeta('ol-showSupport')
|
||||||
|
+ const showDocumentation = getMeta('ol-wikiEnabled')
|
||||||
|
const { t } = useTranslation()
|
||||||
|
const { setActiveModal } = useRailContext()
|
||||||
|
const openKeyboardShortcutsModal = useCallback(() => {
|
||||||
|
@@ -24,20 +25,24 @@ export default function RailHelpDropdown() {
|
||||||
|
<DropdownItem onClick={openKeyboardShortcutsModal}>
|
||||||
|
{t('keyboard_shortcuts')}
|
||||||
|
</DropdownItem>
|
||||||
|
- <DropdownItem
|
||||||
|
- href="/learn"
|
||||||
|
- role="menuitem"
|
||||||
|
- target="_blank"
|
||||||
|
- rel="noopener noreferrer"
|
||||||
|
- >
|
||||||
|
- {t('documentation')}
|
||||||
|
- </DropdownItem>
|
||||||
|
- <DropdownDivider />
|
||||||
|
- {showSupport && (
|
||||||
|
- <DropdownItem onClick={openContactUsModal}>
|
||||||
|
- {t('contact_us')}
|
||||||
|
+ {showDocumentation && (
|
||||||
|
+ <DropdownItem
|
||||||
|
+ href="/learn"
|
||||||
|
+ role="menuitem"
|
||||||
|
+ target="_blank"
|
||||||
|
+ rel="noopener noreferrer"
|
||||||
|
+ >
|
||||||
|
+ {t('documentation')}
|
||||||
|
</DropdownItem>
|
||||||
|
)}
|
||||||
|
+ {showSupport && (
|
||||||
|
+ <>
|
||||||
|
+ <DropdownDivider />
|
||||||
|
+ <DropdownItem onClick={openContactUsModal}>
|
||||||
|
+ {t('contact_us')}
|
||||||
|
+ </DropdownItem>
|
||||||
|
+ </>
|
||||||
|
+ )}
|
||||||
|
</DropdownMenu>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
diff --git a/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx b/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx
|
||||||
|
index 1610cdb89675..648d2f47fb53 100644
|
||||||
|
--- a/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx
|
||||||
|
+++ b/services/web/frontend/js/features/ide-redesign/components/toolbar/menu-bar.tsx
|
||||||
|
@@ -43,6 +43,8 @@ export const ToolbarMenuBar = () => {
|
||||||
|
const openProject = useOpenProject()
|
||||||
|
|
||||||
|
const anonymous = getMeta('ol-anonymous')
|
||||||
|
+ const showSupport = getMeta('ol-showSupport')
|
||||||
|
+ const showDocumentation = getMeta('ol-wikiEnabled')
|
||||||
|
|
||||||
|
useCommandProvider(
|
||||||
|
() => [
|
||||||
|
@@ -266,19 +268,25 @@ export const ToolbarMenuBar = () => {
|
||||||
|
title={t('keyboard_shortcuts')}
|
||||||
|
onClick={openKeyboardShortcutsModal}
|
||||||
|
/>
|
||||||
|
- <MenuBarOption
|
||||||
|
- title={t('documentation')}
|
||||||
|
- eventKey="documentation"
|
||||||
|
- href="/learn"
|
||||||
|
- target="_blank"
|
||||||
|
- rel="noopener noreferrer"
|
||||||
|
- />
|
||||||
|
- <DropdownDivider />
|
||||||
|
- <MenuBarOption
|
||||||
|
- eventKey="contact_us"
|
||||||
|
- title={t('contact_us')}
|
||||||
|
- onClick={openContactUsModal}
|
||||||
|
- />
|
||||||
|
+ {showDocumentation && (
|
||||||
|
+ <MenuBarOption
|
||||||
|
+ title={t('documentation')}
|
||||||
|
+ eventKey="documentation"
|
||||||
|
+ href="/learn"
|
||||||
|
+ target="_blank"
|
||||||
|
+ rel="noopener noreferrer"
|
||||||
|
+ />
|
||||||
|
+ )}
|
||||||
|
+ {showSupport && (
|
||||||
|
+ <>
|
||||||
|
+ <DropdownDivider />
|
||||||
|
+ <MenuBarOption
|
||||||
|
+ eventKey="contact_us"
|
||||||
|
+ title={t('contact_us')}
|
||||||
|
+ onClick={openContactUsModal}
|
||||||
|
+ />
|
||||||
|
+ </>
|
||||||
|
+ )}
|
||||||
|
</MenuBarDropdown>
|
||||||
|
</MenuBar>
|
||||||
|
<WordCountModal
|
||||||
|
diff --git a/services/web/frontend/js/features/ide-redesign/contexts/settings-modal-context.tsx b/services/web/frontend/js/features/ide-redesign/contexts/settings-modal-context.tsx
|
||||||
|
index 56f0d4e30fe4..ab3bbd9d2b7f 100644
|
||||||
|
--- a/services/web/frontend/js/features/ide-redesign/contexts/settings-modal-context.tsx
|
||||||
|
+++ b/services/web/frontend/js/features/ide-redesign/contexts/settings-modal-context.tsx
|
||||||
|
@@ -29,6 +29,7 @@ import DarkModePdfSetting from '../components/settings/appearance-settings/dark-
|
||||||
|
import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context'
|
||||||
|
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||||
|
import ProjectNotificationsSetting from '../components/settings/editor-settings/project-notifications-setting'
|
||||||
|
+import getMeta from '@/utils/meta'
|
||||||
|
|
||||||
|
const [referenceSearchSettingModule] = importOverleafModules(
|
||||||
|
'referenceSearchSetting'
|
||||||
|
@@ -82,6 +83,7 @@ export const SettingsModalProvider: FC<React.PropsWithChildren> = ({
|
||||||
|
children,
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
+ const { isOverleaf } = getMeta('ol-ExposedSettings')
|
||||||
|
const { overallTheme } = useProjectSettingsContext()
|
||||||
|
|
||||||
|
// TODO ide-redesign-cleanup: Rename this field and move it directly into this context
|
||||||
|
@@ -265,9 +267,10 @@ export const SettingsModalProvider: FC<React.PropsWithChildren> = ({
|
||||||
|
title: t('subscription'),
|
||||||
|
icon: 'account_balance',
|
||||||
|
href: '/user/subscription',
|
||||||
|
+ hidden: !isOverleaf,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
- [t, overallTheme, hasEmailNotifications, noNewEditorOptOut]
|
||||||
|
+ [t, overallTheme, hasEmailNotifications, noNewEditorOptOut, isOverleaf]
|
||||||
|
)
|
||||||
|
|
||||||
|
const settingsTabs = useMemo(
|
||||||
13
server-ce/hotfix/6.1.2/Dockerfile
Normal file
13
server-ce/hotfix/6.1.2/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM sharelatex/sharelatex:6.1.1
|
||||||
|
|
||||||
|
# Apply security updates to base image
|
||||||
|
RUN apt update && apt install -y linux-libc-dev \
|
||||||
|
&& unattended-upgrade --verbose --no-minimal-upgrade-steps \
|
||||||
|
&& apt purge -y imagemagick \
|
||||||
|
&& apt autoremove -y \
|
||||||
|
&& apt install -y poppler-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Update converter
|
||||||
|
COPY issue_31527.patch .
|
||||||
|
RUN patch -p0 < issue_31527.patch && rm issue_31527.patch
|
||||||
87
server-ce/hotfix/6.1.2/issue_31527.patch
Normal file
87
server-ce/hotfix/6.1.2/issue_31527.patch
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
--- services/filestore/app/js/FileConverter.js
|
||||||
|
+++ services/filestore/app/js/FileConverter.js
|
||||||
|
@@ -22,45 +22,44 @@ export default {
|
||||||
|
}
|
||||||
|
|
||||||
|
async function convert(sourcePath, requestedFormat) {
|
||||||
|
- const width = '600x'
|
||||||
|
+ const width = '1500'
|
||||||
|
return await _convert(sourcePath, requestedFormat, [
|
||||||
|
- 'convert',
|
||||||
|
- '-define',
|
||||||
|
- `pdf:fit-page=${width}`,
|
||||||
|
- '-flatten',
|
||||||
|
- '-density',
|
||||||
|
- '300',
|
||||||
|
- `${sourcePath}[0]`,
|
||||||
|
+ 'pdftocairo',
|
||||||
|
+ '-png',
|
||||||
|
+ '-singlefile',
|
||||||
|
+ '-scale-to-x',
|
||||||
|
+ width.toString(),
|
||||||
|
+ '-scale-to-y',
|
||||||
|
+ '-1',
|
||||||
|
+ sourcePath,
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
async function thumbnail(sourcePath) {
|
||||||
|
- const width = '548x'
|
||||||
|
- return await _convert(sourcePath, 'jpg', [
|
||||||
|
- 'convert',
|
||||||
|
- '-flatten',
|
||||||
|
- '-background',
|
||||||
|
- 'white',
|
||||||
|
- '-density',
|
||||||
|
- '300',
|
||||||
|
- `${sourcePath}[0]`,
|
||||||
|
- '-resize',
|
||||||
|
- width,
|
||||||
|
+ const width = 700
|
||||||
|
+ return await _convert(sourcePath, 'png', [
|
||||||
|
+ 'pdftocairo',
|
||||||
|
+ '-png',
|
||||||
|
+ '-singlefile',
|
||||||
|
+ '-scale-to-x',
|
||||||
|
+ width.toString(),
|
||||||
|
+ '-scale-to-y',
|
||||||
|
+ '-1',
|
||||||
|
+ sourcePath,
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
async function preview(sourcePath) {
|
||||||
|
- const width = '794x'
|
||||||
|
- return await _convert(sourcePath, 'jpg', [
|
||||||
|
- 'convert',
|
||||||
|
- '-flatten',
|
||||||
|
- '-background',
|
||||||
|
- 'white',
|
||||||
|
- '-density',
|
||||||
|
- '300',
|
||||||
|
- `${sourcePath}[0]`,
|
||||||
|
- '-resize',
|
||||||
|
- width,
|
||||||
|
+ const width = 1000
|
||||||
|
+ return await _convert(sourcePath, 'png', [
|
||||||
|
+ 'pdftocairo',
|
||||||
|
+ '-png',
|
||||||
|
+ '-singlefile',
|
||||||
|
+ '-scale-to-x',
|
||||||
|
+ width.toString(),
|
||||||
|
+ '-scale-to-y',
|
||||||
|
+ '-1',
|
||||||
|
+ sourcePath,
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -74,7 +73,8 @@ async function _convert(sourcePath, requestedFormat, command) {
|
||||||
|
const timer = new metrics.Timer('imageConvert')
|
||||||
|
const destPath = `${sourcePath}.${requestedFormat}`
|
||||||
|
|
||||||
|
- command.push(destPath)
|
||||||
|
+ const outputBaseName = sourcePath
|
||||||
|
+ command.push(outputBaseName)
|
||||||
|
command = Settings.commands.convertCommandPrefix.concat(command)
|
||||||
|
|
||||||
|
try {
|
||||||
Reference in New Issue
Block a user