mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
[web] Remove new editor elements for CE/SP (#31004)
* [web] Remove new editor elements for CE/SP Makes rendering of elements conditional or completely removes them from CE/SP: - Subscription link is removed from settings modal - Documentation link is present on `proxyLearn === true` - Contact us link is present when `support` module is available (not the case for CE/SP) * Using hidden instead of conditional rendering in settings GitOrigin-RevId: 562563d0bc4d0ca919e336f0c13cf6b476c6cf31
This commit is contained in:
+17
-12
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user