mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-14 08:34:32 +00:00
Create uiConfig Pug local; render it in the HTML.
This commit is contained in:
parent
74ba7402de
commit
71604ebd5c
2 changed files with 10 additions and 0 deletions
|
@ -290,3 +290,12 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
|
|||
res.locals.moduleIncludes = Modules.moduleIncludes
|
||||
res.locals.moduleIncludesAvailable = Modules.moduleIncludesAvailable
|
||||
next()
|
||||
|
||||
webRouter.use (req, res, next) ->
|
||||
isOl = (Settings.brandPrefix == 'ol-')
|
||||
res.locals.uiConfig =
|
||||
defaultResizerSizeOpen : if isOl then 2 else 24
|
||||
defaultResizerSizeClosed : if isOl then 2 else 24
|
||||
chatResizerSizeOpen : if isOl then 2 else 6
|
||||
chatResizerSizeClosed : 0
|
||||
next()
|
||||
|
|
|
@ -157,6 +157,7 @@ block requirejs
|
|||
window.aceFingerprint = "#{fingerprint(jsPath + lib('ace') + '/ace.js')}"
|
||||
window.aceWorkerPath = "#{aceWorkerPath}";
|
||||
window.pdfCMapsPath = "#{pdfCMapsPath}"
|
||||
window.uiConfig = JSON.parse('!{JSON.stringify(uiConfig).replace(/\//g, "\\/")}');
|
||||
|
||||
script(
|
||||
data-main=buildJsPath("ide.js", {fingerprint:false}),
|
||||
|
|
Loading…
Add table
Reference in a new issue