Add a hidden 'Test Controls' section to the left-menu.

This is to be used for hidden features that are not yet ready to ship,
and would otherwise be hidden behind a console command.
Append `?tc=true` to the project url to reveal this panel.
This commit is contained in:
Shane Kilkelly 2018-05-23 12:37:42 +01:00
parent f5dd94ca1d
commit 561b62f7db
5 changed files with 37 additions and 0 deletions

View file

@ -344,6 +344,7 @@ module.exports = ProjectController =
maxDocLength: Settings.max_doc_length maxDocLength: Settings.max_doc_length
useV2History: !!project.overleaf?.history?.display useV2History: !!project.overleaf?.history?.display
showRichText: req.query?.rt == 'true' showRichText: req.query?.rt == 'true'
showTestControls: req.query?.tc == 'true'
showPublishModal: req.query?.pm == 'true' showPublishModal: req.query?.pm == 'true'
timer.done() timer.done()

View file

@ -62,6 +62,23 @@ aside#left-menu.full-size(
!= moduleIncludes("editorLeftMenu:editing_services", locals) != moduleIncludes("editorLeftMenu:editing_services", locals)
if showTestControls
h4 Test Controls
ul.list-unstyled.nav(ng-controller="TestControlsController")
li
a(href="#" ng-click="richText()")
i.fa.fa-exclamation.fa-fw
| Rich Text
li
a(href="#" ng-click="openProjectLinkedFileModal()")
i.fa.fa-exclamation.fa-fw
| Project-Linked-File Modal
li
a(href="#" ng-click="openLinkedFileModal()")
i.fa.fa-exclamation.fa-fw
| URL-Linked-File Modal
h4(ng-show="!anonymous") #{translate("settings")} h4(ng-show="!anonymous") #{translate("settings")}
form.settings(ng-controller="SettingsController", ng-show="!anonymous") form.settings(ng-controller="SettingsController", ng-show="!anonymous")
.containter-fluid .containter-fluid
@ -179,6 +196,7 @@ aside#left-menu.full-size(
option(value="pdfjs") #{translate("built_in")} option(value="pdfjs") #{translate("built_in")}
option(value="native") #{translate("native")} option(value="native") #{translate("native")}
h4 #{translate("hotkeys")} h4 #{translate("hotkeys")}
ul.list-unstyled.nav ul.list-unstyled.nav
li(ng-controller="HotkeysController") li(ng-controller="HotkeysController")

View file

@ -18,6 +18,7 @@ define [
"ide/chat/index" "ide/chat/index"
"ide/clone/index" "ide/clone/index"
"ide/hotkeys/index" "ide/hotkeys/index"
"ide/test-controls/index"
"ide/wordcount/index" "ide/wordcount/index"
"ide/directives/layout" "ide/directives/layout"
"ide/directives/validFile" "ide/directives/validFile"

View file

@ -0,0 +1,14 @@
define [
"base"
"ace/ace"
], (App) ->
App.controller "TestControlsController", ($scope) ->
$scope.openProjectLinkedFileModal = () ->
window.openProjectLinkedFileModal()
$scope.openLinkedFileModal = () ->
window.openLinkedFileModal()
$scope.richText = () ->
window.location.href = window.location.toString() + '&rt=true'

View file

@ -0,0 +1,3 @@
define [
"ide/test-controls/controllers/TestControlsController"
], () ->