diff --git a/client/images/folder-triangle.svg b/client/images/folder-triangle.svg new file mode 100644 index 00000000..1843a73e --- /dev/null +++ b/client/images/folder-triangle.svg @@ -0,0 +1,14 @@ + + \ No newline at end of file diff --git a/client/images/folder.svg b/client/images/folder.svg new file mode 100644 index 00000000..172b4d75 --- /dev/null +++ b/client/images/folder.svg @@ -0,0 +1,12 @@ + + \ No newline at end of file diff --git a/client/modules/IDE/actions/files.js b/client/modules/IDE/actions/files.js index 638aca56..aeba6588 100644 --- a/client/modules/IDE/actions/files.js +++ b/client/modules/IDE/actions/files.js @@ -74,7 +74,7 @@ export function createFile(formProps) { const postParams = { name: createUniqueName(formProps.name, state.files), url: formProps.url, - content: formProps.content || '' + content: formProps.content || '', // TODO pass parent id to API, once there are folders parentId: rootFile.id }; @@ -107,7 +107,7 @@ export function createFile(formProps) { id, _id: id, url: formProps.url, - content: formProps.content || '' + content: formProps.content || '', // TODO pass parent id from File Tree parentId: rootFile.id }); diff --git a/client/modules/IDE/components/FileNode.js b/client/modules/IDE/components/FileNode.js index 6048aefa..ebd3abf1 100644 --- a/client/modules/IDE/components/FileNode.js +++ b/client/modules/IDE/components/FileNode.js @@ -5,6 +5,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import InlineSVG from 'react-inlinesvg'; const downArrowUrl = require('../../../images/down-arrow.svg'); +const fileUrl = require('../../../images/file.svg'); import classNames from 'classnames'; export class FileNode extends React.Component { @@ -70,6 +71,15 @@ export class FileNode extends React.Component { if (this.props.name !== 'root') { return (