overleaf/services/web/app/views/project/editor/editor-pane.pug
Alf Eaton 753be43c53 [web] [cm6] Add a source editor toggle (#6674)
* Add a source editor toggle
* Only show the toggle if in split test variant (or query param override)
* Change labels
* Add check for this.editor
* Update toolbar.pug

GitOrigin-RevId: ee00e31db334fc562b00d28a8c2de5d03456f749
2022-02-16 11:37:33 +00:00

61 lines
2.2 KiB
Text

.ui-layout-center(
ng-controller="ReviewPanelController",
ng-class="{\
'rp-unsupported': editor.showRichText,\
'rp-state-current-file': (reviewPanel.subView === SubViews.CUR_FILE),\
'rp-state-current-file-expanded': (reviewPanel.subView === SubViews.CUR_FILE && ui.reviewPanelOpen),\
'rp-state-current-file-mini': (reviewPanel.subView === SubViews.CUR_FILE && !ui.reviewPanelOpen),\
'rp-state-overview': (reviewPanel.subView === SubViews.OVERVIEW),\
'rp-size-mini': ui.miniReviewPanelVisible,\
'rp-size-expanded': ui.reviewPanelOpen,\
'rp-layout-left': reviewPanel.layoutToLeft,\
'rp-loading-threads': reviewPanel.loadingThreads,\
}"
)
.editor-container.full-size(
vertical-resizable-panes="symbol-palette-resizer"
vertical-resizable-panes-hidden-externally-on="symbol-palette-toggled"
vertical-resizable-panes-hidden-initially="true"
vertical-resizable-panes-default-size="250"
vertical-resizable-panes-min-size="250"
vertical-resizable-panes-max-size="336"
vertical-resizable-panes-resize-on="layout:flat-screen:toggle,symbol-palette-toggled"
)
.div(vertical-resizable-top)
.loading-panel(
ng-show="(!editor.sharejs_doc || editor.opening) && !editor.error_state",
style=showRichText ? "top: 32px" : "",
)
span(ng-show="editor.open_doc_id")
i.fa.fa-spin.fa-refresh
|   #{translate("loading")}…
span(ng-show="!editor.open_doc_id")
i.fa.fa-arrow-left
|   #{translate("open_a_file_on_the_left")}
if moduleIncludesAvailable('editor:main')
!= moduleIncludes('editor:main', locals)
else
.toolbar.toolbar-editor
.multi-selection-ongoing(
ng-show="multiSelectedCount > 0"
)
.multi-selection-message
h4 {{ multiSelectedCount }} #{translate('files_selected')}
div(ng-if="editor.newSourceEditor")
if moduleIncludesAvailable('editor:source-editor')
!= moduleIncludes('editor:source-editor', locals)
div(ng-if="!editor.newSourceEditor")
include ./source-editor
if !isRestrictedTokenMember
include ./review-panel
if moduleIncludesAvailable('editor:symbol-palette')
.div(vertical-resizable-bottom)
!= moduleIncludes('editor:symbol-palette', locals)