Merge pull request #479 from sharelatex/as-rt-feature-flag

Switch to runtime flag for RT instead of feature flag
This commit is contained in:
Alasdair Smith 2018-04-10 10:24:58 +01:00 committed by GitHub
commit f0bcb332bb
5 changed files with 5 additions and 14 deletions

View file

@ -301,6 +301,7 @@ module.exports = ProjectController =
themes: THEME_LIST
maxDocLength: Settings.max_doc_length
useV2History: !!project.overleaf?.history?.display
showRichText: req.query.rt == 'true'
timer.done()
_buildProjectList: (allProjects, v1Projects = [])->

View file

@ -14,8 +14,6 @@ module.exports = Features =
return Settings.enableGithubSync
when 'v1-return-message'
return Settings.accountMerge? and Settings.overleaf?
when 'rich-text'
return Settings.showRichText
when 'custom-togglers'
return Settings.overleaf?
else

View file

@ -39,6 +39,7 @@ div.full-size(
ace-editor="editor",
ng-if="!editor.richText",
ng-show="!!editor.sharejs_doc && !editor.opening",
style=showRichText ? "top: 40px" : "",
theme="settings.theme",
keybindings="settings.mode",
font-size="settings.fontSize",

View file

@ -84,8 +84,4 @@
@import "../js/libs/pdfListView/TextLayer.css";
@import "../js/libs/pdfListView/AnnotationsLayer.css";
@import "../js/libs/pdfListView/HighlightsLayer.css";
// CodeMirror
& when (@show-rich-text) {
@import "vendor/codemirror.css";
}
@import "vendor/codemirror.css";

View file

@ -12,9 +12,7 @@
@import "./editor/online-users.less";
@import "./editor/hotkeys.less";
@import "./editor/review-panel.less";
& when (@show-rich-text) {
@import "./editor/rich-text.less";
}
@import "./editor/rich-text.less";
@ui-layout-toggler-def-height: 50px;
@ui-resizer-size: 7px;
@ -82,10 +80,7 @@
.full-size;
}
#editor when (@show-rich-text = true) {
top: 40px; // TODO: replace with toolbar height var
}
#editor-rich-text when (@show-rich-text = true) {
#editor-rich-text {
top: 40px; // TODO: replace with toolbar height var
}