mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #15976 from overleaf/jdt-jpa-ieee-theme-picker
Hiding the overall theme for IEEE branded projects GitOrigin-RevId: 5f07a7b316aea29ab72183fe4014c1b3e5c94bb8
This commit is contained in:
committed by
Copybot
parent
2cd10df47e
commit
cea7846795
+6
-4
@@ -6,6 +6,7 @@ import SettingsMenuSelect, { Option } from './settings-menu-select'
|
||||
import { useProjectSettingsContext } from '../../context/project-settings-context'
|
||||
import type { OverallThemeMeta } from '../../../../../../types/project-settings'
|
||||
import type { OverallTheme } from '../../../source-editor/extensions/theme'
|
||||
import { ExposedSettings } from '../../../../../../types/exposed-settings'
|
||||
|
||||
export default function SettingsOverallTheme() {
|
||||
const { t } = useTranslation()
|
||||
@@ -24,10 +25,11 @@ export default function SettingsOverallTheme() {
|
||||
[overallThemes]
|
||||
)
|
||||
|
||||
// TODO: check for IEEE brand by:
|
||||
// - const brandVariation = getMeta('ol-brandVariation') as any[]
|
||||
// - settings.overleaf != null && !isIEEE(brandVariation)
|
||||
if (!overallThemes) {
|
||||
const brandVariation = getMeta('ol-brandVariation') as any
|
||||
const { ieeeBrandId } = getMeta('ol-ExposedSettings') as ExposedSettings
|
||||
const isIEEEBranded = brandVariation?.brand_id === ieeeBrandId
|
||||
|
||||
if (!overallThemes || isIEEEBranded) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user