|
|
@ -299,12 +299,6 @@ export const Workspace = (props: WorkspaceProps) => { |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// const handleWorkspaceSelect = (e) => {
|
|
|
|
|
|
|
|
// const value = e.target.value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setWorkspace(value)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className='remixui_container'> |
|
|
|
<div className='remixui_container'> |
|
|
|
<ModalDialog |
|
|
|
<ModalDialog |
|
|
@ -358,15 +352,15 @@ export const Workspace = (props: WorkspaceProps) => { |
|
|
|
title='Delete'> |
|
|
|
title='Delete'> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<select id="workspacesSelect" data-id="workspacesSelect" onChange={(e) => setWorkspace(e.target.value)} className="form-control custom-select"> |
|
|
|
<select id="workspacesSelect" value={state.currentWorkspace} data-id="workspacesSelect" onChange={(e) => setWorkspace(e.target.value)} className="form-control custom-select"> |
|
|
|
{ |
|
|
|
{ |
|
|
|
state.workspaces |
|
|
|
state.workspaces |
|
|
|
.map((folder) => { |
|
|
|
.map((folder, index) => { |
|
|
|
return <option selected={state.currentWorkspace === folder} value={folder}>{folder}</option> |
|
|
|
return <option key={index} value={folder}>{folder}</option> |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
<option selected={state.currentWorkspace === LOCALHOST} value={LOCALHOST}>{state.currentWorkspace === LOCALHOST ? 'localhost' : LOCALHOST}</option> |
|
|
|
<option value={LOCALHOST}>{state.currentWorkspace === LOCALHOST ? 'localhost' : LOCALHOST}</option> |
|
|
|
{ state.workspaces.length <= 0 && <option selected={state.currentWorkspace === NO_WORKSPACE} value={NO_WORKSPACE}>{NO_WORKSPACE}</option> } |
|
|
|
{ state.workspaces.length <= 0 && <option value={NO_WORKSPACE}>{NO_WORKSPACE}</option> } |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</header> |
|
|
|
</header> |
|
|
@ -404,20 +398,6 @@ export const Workspace = (props: WorkspaceProps) => { |
|
|
|
} |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
} |
|
|
|
<div className='pl-2 remixui_treeview'> |
|
|
|
|
|
|
|
{ false && <FileExplorer |
|
|
|
|
|
|
|
name='browser' |
|
|
|
|
|
|
|
registry={props.registry} |
|
|
|
|
|
|
|
filesProvider={props.browser} |
|
|
|
|
|
|
|
menuItems={['createNewFile', 'createNewFolder', 'publishToGist', canUpload ? 'uploadFile' : '']} |
|
|
|
|
|
|
|
plugin={props.plugin} |
|
|
|
|
|
|
|
focusRoot={state.reset} |
|
|
|
|
|
|
|
contextMenuItems={props.registeredMenuItems} |
|
|
|
|
|
|
|
displayInput={state.displayNewFile} |
|
|
|
|
|
|
|
externalUploads={state.uploadFileEvent} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|