aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authoreperelm2 <emily_perelman@brown.edu>2023-07-18 11:40:12 -0400
committereperelm2 <emily_perelman@brown.edu>2023-07-18 11:40:12 -0400
commit5100a643fb0d98b6dd738e7024f4fe15f56ba1a8 (patch)
tree92fa39d2d5cc8f584e3346c8fe0efaa5b184a9e5 /src/client/views/MainView.tsx
parentc9779f31d9ce2363e61c3c9fa7e3446203622dde (diff)
parent16a1b7de3ec26187b3a426eb037a5e4f4b9fcc55 (diff)
Merge branch 'master' into secondpropertiesmenu-emily
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 79c308221..efd8206bf 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -49,6 +49,7 @@ import { InkTranscription } from './InkTranscription';
import { LightboxView } from './LightboxView';
import { LinkMenu } from './linking/LinkMenu';
import './MainView.scss';
+import { NewLightboxView } from './newlightbox/NewLightboxView';
import { AudioBox } from './nodes/AudioBox';
import { DocumentLinksButton } from './nodes/DocumentLinksButton';
import { DocumentView, DocumentViewInternal, OpenWhere, OpenWhereMod } from './nodes/DocumentView';
@@ -153,37 +154,33 @@ export class MainView extends React.Component {
}
this._sidebarContent.proto = undefined;
if (!MainView.Live) {
- DocServer.setPlaygroundFields([
+ DocServer.setLivePlaygroundFields([
'dataTransition',
'viewTransition',
'treeViewOpen',
- 'layout_showSidebar',
+ 'treeViewExpandedView',
'carousel_index',
'itemIndex', // for changing slides in presentations
'layout_sidebarWidthPercent',
'layout_currentTimecode',
'layout_timelineHeightPercent',
+ 'layout_hideMinimap',
+ 'layout_showSidebar',
+ 'layout_scrollTop',
+ 'layout_fitWidth',
+ 'layout_curPage',
'presStatus',
'freeform_panX',
'freeform_panY',
+ 'freeform_scale',
'overlayX',
'overlayY',
- 'layout_fitWidth',
- 'nativeWidth',
- 'nativeHeight',
'text_scrollHeight',
'text_height',
- 'layout_hideMinimap',
- 'freeform_scale',
- 'layout_scrollTop',
'hidden',
- 'layout_curPage',
- 'type_collection',
+ //'type_collection',
'chromeHidden',
'currentFrame',
- 'width',
- 'height',
- 'nativeWidth',
]); // can play with these fields on someone else's
}
DocServer.GetRefField('rtfProto').then(
@@ -753,7 +750,8 @@ export class MainView extends React.Component {
@computed get leftMenuPanel() {
return (
- <div key="menu" className="mainView-leftMenuPanel" style={{ display: LightboxView.LightboxDoc ? 'none' : undefined }}>
+ <div key="menu" className="mainView-leftMenuPanel" style={{ background: StrCast(Doc.UserDoc().userBackgroundColor),
+ display: LightboxView.LightboxDoc ? 'none' : undefined }}>
<DocumentView
Document={Doc.MyLeftSidebarMenu}
DataDoc={undefined}
@@ -808,8 +806,8 @@ export class MainView extends React.Component {
{this._hideUI ? null : this.leftMenuPanel}
<div key="inner" className={`mainView-innerContent${this.colorScheme}`}>
{this.flyout}
- <div className="mainView-libraryHandle" style={{ left: leftMenuFlyoutWidth - 10 /* ~half width of handle */, display: !this._leftMenuFlyoutWidth ? 'none' : undefined }} onPointerDown={this.onFlyoutPointerDown}>
- <FontAwesomeIcon icon="chevron-left" color={this.colorScheme === ColorScheme.Dark ? 'white' : 'black'} style={{ opacity: '50%' }} size="sm" />
+ <div className="mainView-libraryHandle" style={{ background: StrCast(Doc.UserDoc().userBackgroundColor), left: leftMenuFlyoutWidth - 10 /* ~half width of handle */, display: !this._leftMenuFlyoutWidth ? 'none' : undefined }} onPointerDown={this.onFlyoutPointerDown}>
+ <FontAwesomeIcon icon="chevron-left" color={StrCast(Doc.UserDoc().userColor)} style={{ opacity: '50%' }} size="sm" />
</div>
<div className="mainView-innerContainer" style={{ width: `calc(100% - ${width}px)` }}>
{this.dockingContent}
@@ -963,7 +961,11 @@ export class MainView extends React.Component {
render() {
return (
<div
- className={`mainView-container${this.colorScheme}`}
+ className={`mainView-container ${this.colorScheme}`}
+ style={{
+ color: StrCast(Doc.UserDoc().userColor),
+ background: StrCast(Doc.UserDoc().userBackgroundColor),
+ }}
onScroll={() => (ele => (ele.scrollTop = ele.scrollLeft = 0))(document.getElementById('root')!)}
ref={r => {
r &&
@@ -1018,6 +1020,7 @@ export class MainView extends React.Component {
<InkTranscription />
{this.snapLines}
<LightboxView key="lightbox" PanelWidth={this._windowWidth} PanelHeight={this._windowHeight} maxBorder={[200, 50]} />
+ {/* <NewLightboxView key="newLightbox" PanelWidth={this._windowWidth} PanelHeight={this._windowHeight} maxBorder={[200, 50]} /> */}
</div>
);
}