mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 17:33:40 -05:00
Merge pull request #10772 from overleaf/em-ieee-brand-id
Make the IEEE brand id configurable GitOrigin-RevId: 3ee286131d6ed8f43247ab1e2954eabec83d75d6
This commit is contained in:
parent
38df974ce1
commit
04d0eabb32
2 changed files with 6 additions and 3 deletions
|
@ -21,6 +21,8 @@ const {
|
||||||
addOptionalCleanupHandlerAfterDrainingConnections,
|
addOptionalCleanupHandlerAfterDrainingConnections,
|
||||||
} = require('./GracefulShutdown')
|
} = require('./GracefulShutdown')
|
||||||
|
|
||||||
|
const IEEE_BRAND_ID = Settings.ieeeBrandId
|
||||||
|
|
||||||
let webpackManifest
|
let webpackManifest
|
||||||
switch (process.env.NODE_ENV) {
|
switch (process.env.NODE_ENV) {
|
||||||
case 'production':
|
case 'production':
|
||||||
|
@ -179,10 +181,8 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
|
||||||
|
|
||||||
res.locals.moment = moment
|
res.locals.moment = moment
|
||||||
|
|
||||||
const IEEE_BRAND_ID = 15
|
|
||||||
res.locals.isIEEE = brandVariation =>
|
res.locals.isIEEE = brandVariation =>
|
||||||
(brandVariation != null ? brandVariation.brand_id : undefined) ===
|
brandVariation?.brand_id === IEEE_BRAND_ID
|
||||||
IEEE_BRAND_ID
|
|
||||||
|
|
||||||
res.locals.getCssThemeModifier = function (userSettings, brandVariation) {
|
res.locals.getCssThemeModifier = function (userSettings, brandVariation) {
|
||||||
// Themes only exist in OL v2
|
// Themes only exist in OL v2
|
||||||
|
|
|
@ -801,6 +801,9 @@ module.exports = {
|
||||||
unsupportedBrowsers: {
|
unsupportedBrowsers: {
|
||||||
ie: '<=11',
|
ie: '<=11',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// ID of the IEEE brand in the rails app
|
||||||
|
ieeeBrandId: intFromEnv('IEEE_BRAND_ID', 15),
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.mergeWith = function (overrides) {
|
module.exports.mergeWith = function (overrides) {
|
||||||
|
|
Loading…
Reference in a new issue