| 220 | } |
| 221 | |
| 222 | render() { |
| 223 | const { workspaceVisibles, workspaceWeights } = this.state; |
| 224 | const { titles, description, saved } = this.props.current; |
| 225 | |
| 226 | const title = `${saved ? '' : '(Unsaved) '}${titles.join(' - ')}`; |
| 227 | const [navigatorOpened] = workspaceVisibles; |
| 228 | |
| 229 | return ( |
| 230 | <div className={styles.app}> |
| 231 | <Helmet> |
| 232 | <title>{title}</title> |
| 233 | <meta name="description" content={description}/> |
| 234 | </Helmet> |
| 235 | <Header className={styles.header} onClickTitleBar={this.handleClickTitleBar} |
| 236 | navigatorOpened={navigatorOpened} loadScratchPapers={this.loadScratchPapers} |
| 237 | ignoreHistoryBlock={this.ignoreHistoryBlock}/> |
| 238 | <ResizableContainer className={styles.workspace} horizontal weights={workspaceWeights} |
| 239 | visibles={workspaceVisibles} onChangeWeights={this.handleChangeWorkspaceWeights}> |
| 240 | <Navigator/> |
| 241 | <VisualizationViewer className={styles.visualization_viewer}/> |
| 242 | <TabContainer className={styles.editor_tab_container}> |
| 243 | <CodeEditor ref={this.codeEditorRef}/> |
| 244 | </TabContainer> |
| 245 | </ResizableContainer> |
| 246 | <ToastContainer className={styles.toast_container}/> |
| 247 | </div> |
| 248 | ); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | export default connect(({ current, env }) => ({ current, env }), actions)( |