mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-10 17:17:59 +00:00
Merge pull request #18590 from overleaf/td-ieee-editor-remove-blue
Disable IEEE stylesheet in IEEE editor based on feature flag GitOrigin-RevId: 09b203e3220a868d5f0a0e413bdc4d3ff7a1792e
This commit is contained in:
parent
d209c107c5
commit
1b247347e7
3 changed files with 9 additions and 3 deletions
|
@ -335,6 +335,7 @@ const _ProjectController = {
|
|||
'table-generator-promotion',
|
||||
'track-pdf-download',
|
||||
!anonymous && 'writefull-oauth-promotion',
|
||||
'ieee-stylesheet',
|
||||
].filter(Boolean)
|
||||
|
||||
const responses = await pProps(
|
||||
|
|
|
@ -186,12 +186,16 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
|
|||
res.locals.isIEEE = brandVariation =>
|
||||
brandVariation?.brand_id === IEEE_BRAND_ID
|
||||
|
||||
res.locals.getCssThemeModifier = function (userSettings, brandVariation) {
|
||||
res.locals.getCssThemeModifier = function (
|
||||
userSettings,
|
||||
brandVariation,
|
||||
ieeeStylesheetEnabled
|
||||
) {
|
||||
// Themes only exist in OL v2
|
||||
if (Settings.overleaf != null) {
|
||||
// The IEEE theme takes precedence over the user personal setting, i.e. a user with
|
||||
// a theme setting of "light" will still get the IEE theme in IEEE branded projects.
|
||||
if (res.locals.isIEEE(brandVariation)) {
|
||||
if (ieeeStylesheetEnabled && res.locals.isIEEE(brandVariation)) {
|
||||
return 'ieee-'
|
||||
} else if (userSettings && userSettings.overallTheme != null) {
|
||||
return userSettings.overallTheme
|
||||
|
|
|
@ -16,9 +16,10 @@ html(
|
|||
include ./_metadata.pug
|
||||
|
||||
- const bootstrapVersion = bootstrap5PageStatus !== 'disabled' && (bootstrap5Override || (bootstrap5PageStatus === 'enabled' && splitTestVariants['bootstrap-5'] === 'enabled')) ? 5 : 3
|
||||
- const ieeeStylesheetEnabled = splitTestVariants?.['ieee-stylesheet'] !== 'disabled'
|
||||
|
||||
//- Stylesheet
|
||||
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation), bootstrapVersion), id="main-stylesheet")
|
||||
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation, ieeeStylesheetEnabled), bootstrapVersion), id="main-stylesheet")
|
||||
block css
|
||||
each file in entrypointStyles(entrypoint)
|
||||
link(rel='stylesheet', href=file)
|
||||
|
|
Loading…
Add table
Reference in a new issue