diff --git a/server-ce/hotfix/6.1.1/Dockerfile b/server-ce/hotfix/6.1.1/Dockerfile new file mode 100644 index 0000000000..8b2c28205a --- /dev/null +++ b/server-ce/hotfix/6.1.1/Dockerfile @@ -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 diff --git a/server-ce/hotfix/6.1.1/pr_31004.patch b/server-ce/hotfix/6.1.1/pr_31004.patch new file mode 100644 index 0000000000..00bcec9f3a --- /dev/null +++ b/server-ce/hotfix/6.1.1/pr_31004.patch @@ -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() { + + {t('keyboard_shortcuts')} + +- +- {t('documentation')} +- +- +- {showSupport && ( +- +- {t('contact_us')} ++ {showDocumentation && ( ++ ++ {t('documentation')} + + )} ++ {showSupport && ( ++ <> ++ ++ ++ {t('contact_us')} ++ ++ ++ )} + + ) + } +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} + /> +- +- +- ++ {showDocumentation && ( ++ ++ )} ++ {showSupport && ( ++ <> ++ ++ ++ ++ )} + + + = ({ + 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 = ({ + title: t('subscription'), + icon: 'account_balance', + href: '/user/subscription', ++ hidden: !isOverleaf, + }, + ], +- [t, overallTheme, hasEmailNotifications, noNewEditorOptOut] ++ [t, overallTheme, hasEmailNotifications, noNewEditorOptOut, isOverleaf] + ) + + const settingsTabs = useMemo(