mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Fix: hide Git Bridge, GitHub Sync and Zotero UI elements when the corresponding feature is disabled
This commit is contained in:
@@ -71,7 +71,7 @@ export const RailLayout = () => {
|
||||
const { features } = useProjectContext()
|
||||
const { isRestrictedTokenMember } = useEditorContext()
|
||||
const gitBridgeEnabled = getMeta('ol-gitBridgeEnabled')
|
||||
const { isOverleaf } = getMeta('ol-ExposedSettings')
|
||||
const { isOverleaf, githubSyncEnabled, zoteroEnabled } = getMeta('ol-ExposedSettings')
|
||||
|
||||
const { view, setSettingsShown, focusMode } = useLayoutContext()
|
||||
|
||||
@@ -119,7 +119,7 @@ export const RailLayout = () => {
|
||||
icon: 'integration_instructions',
|
||||
title: t('integrations'),
|
||||
component: <IntegrationsPanel />,
|
||||
hide: !isOverleaf && !gitBridgeEnabled,
|
||||
hide: !isOverleaf && !gitBridgeEnabled && !githubSyncEnabled && !zoteroEnabled,
|
||||
},
|
||||
{
|
||||
key: 'review-panel',
|
||||
@@ -148,6 +148,8 @@ export const RailLayout = () => {
|
||||
isRestrictedTokenMember,
|
||||
isOverleaf,
|
||||
gitBridgeEnabled,
|
||||
githubSyncEnabled,
|
||||
zoteroEnabled,
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user