mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Use hard-coded feature flag for rich text
This commit is contained in:
parent
fff8e37bc7
commit
4202b9c717
4 changed files with 8 additions and 2 deletions
|
@ -28,6 +28,7 @@ Modules = require '../../infrastructure/Modules'
|
|||
ProjectEntityHandler = require './ProjectEntityHandler'
|
||||
crypto = require 'crypto'
|
||||
{ V1ConnectionError } = require '../Errors/Errors'
|
||||
Features = require('../../Infrastructure/Features')
|
||||
|
||||
module.exports = ProjectController =
|
||||
|
||||
|
@ -344,7 +345,7 @@ module.exports = ProjectController =
|
|||
themes: THEME_LIST
|
||||
maxDocLength: Settings.max_doc_length
|
||||
useV2History: !!project.overleaf?.history?.display
|
||||
showRichText: req.query?.rt == 'true'
|
||||
richTextEnabled: Features.richTextEnabled()
|
||||
showTestControls: req.query?.tc == 'true' || user.isAdmin
|
||||
showPublishModal: req.query?.pm == 'true'
|
||||
timer.done()
|
||||
|
|
|
@ -4,6 +4,10 @@ module.exports = Features =
|
|||
externalAuthenticationSystemUsed: ->
|
||||
Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth?
|
||||
|
||||
richTextEnabled: ->
|
||||
isEnabled = true # Switch to false to disable
|
||||
Settings.overleaf? and isEnabled
|
||||
|
||||
hasFeature: (feature) ->
|
||||
switch feature
|
||||
when 'homepage'
|
||||
|
|
|
@ -133,6 +133,7 @@ block requirejs
|
|||
window.maxDocLength = #{maxDocLength};
|
||||
window.trackChangesState = data.trackChangesState;
|
||||
window.wikiEnabled = #{!!(settings.apis.wiki && settings.apis.wiki.url)};
|
||||
window.richTextEnabled = #{richTextEnabled}
|
||||
window.requirejs = {
|
||||
"paths" : {
|
||||
"moment": "libs/#{lib('moment')}",
|
||||
|
|
|
@ -43,7 +43,7 @@ div.full-size(
|
|||
ace-editor="editor",
|
||||
ng-if="!editor.showRichText",
|
||||
ng-show="!!editor.sharejs_doc && !editor.opening",
|
||||
style=showRichText ? "top: 32px" : "",
|
||||
style=richTextEnabled ? "top: 32px" : "",
|
||||
theme="settings.theme",
|
||||
keybindings="settings.mode",
|
||||
font-size="settings.fontSize",
|
||||
|
|
Loading…
Reference in a new issue