pull/5370/head
bunsenstraat 3 years ago
parent 1a609b7d6f
commit 286001a3f7
  1. 2
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx
  2. 4
      libs/remix-ui/workspace/src/lib/components/file-render.tsx

@ -619,7 +619,7 @@ export const EditorUI = (props: EditorUIProps) => {
language={editorModelsState[props.currentFile] ? editorModelsState[props.currentFile].language : 'text'} language={editorModelsState[props.currentFile] ? editorModelsState[props.currentFile].language : 'text'}
onMount={handleEditorDidMount} onMount={handleEditorDidMount}
beforeMount={handleEditorWillMount} beforeMount={handleEditorWillMount}
options={{ glyphMargin: true, readOnly: true }} options={{ glyphMargin: true, readOnly: (!editorRef.current || !props.currentFile) }}
defaultValue={defaultEditorValue} defaultValue={defaultEditorValue}
/> />

@ -128,12 +128,12 @@ export const FileRender = (props: RenderFileProps) => {
key={`treeView${file.path}`} key={`treeView${file.path}`}
label={ label={
<> <>
<div className="d-flex flex-row">
<Draggable isDraggable={props.focusEdit.element !== null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}> <Draggable isDraggable={props.focusEdit.element !== null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}>
<div className="d-flex flex-row">
<FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} /> <FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} />
</Draggable>
<FileDecorationIcons file={file} fileDecorations={props.fileDecorations} /> <FileDecorationIcons file={file} fileDecorations={props.fileDecorations} />
</div> </div>
</Draggable>
</> </>
} }
onClick={handleFileClick} onClick={handleFileClick}

Loading…
Cancel
Save