Skip to content

Commit

Permalink
Merge pull request #54 from Coding/yangzhen/add-details
Browse files Browse the repository at this point in the history
Yangzhen/add details
  • Loading branch information
hackape committed Feb 20, 2017
2 parents 84691c5 + f11081c commit 8defe85
Show file tree
Hide file tree
Showing 6 changed files with 426 additions and 20 deletions.
5 changes: 2 additions & 3 deletions app/components/FileTree/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,10 @@ class FileTreeNode extends Component {
<span className="filetree-node-arrow"
onClick={e => openNode(node, null, e.altKey)}
>
<i className={cx({
{(node.isDir && node.childrenCount !== 0)&&<i className={cx({
'fa fa-angle-right': node.isFolded,
'fa fa-angle-down': !node.isFolded,
hidden: !node.isDir || node.childrenCount === 0
})}></i>
})}></i>}
</span>
<span className="filetree-node-icon">
<i className={cx({
Expand Down
7 changes: 6 additions & 1 deletion app/components/Git/GitCommitView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ import * as GitActions from './actions'
import GitFileTree from './GitFileTree'

var GitCommitView = ({isWorkingDirClean, ...actionProps}) => {
const {updateCommitMessage, commit, statusFiles} = actionProps
const {updateCommitMessage, commit, statusFiles, diffFile} = actionProps
return isWorkingDirClean ?
<h1 className=''>Your working directory is clean. Nothing to commit.</h1>
: (<div>
<GitFileTree
statusFiles={statusFiles}
handleClick={(path) => {
diffFile({
path, newRef: 'HEAD', oldRef: '~~unstaged~~'
})
}}
/>
<hr />
<div className='git-commit-message-container'>
Expand Down
6 changes: 3 additions & 3 deletions app/components/MarkdownEditor/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { PropTypes } from 'react';
import AceEditor from '../AceEditor';
import CodeMirrorEditor from '../CodeMirrorEditor'
import { markdown } from 'markdown';
import { connect } from 'react-redux';
import cx from 'classnames';
Expand All @@ -12,7 +12,7 @@ const styles = {
const PreviewEditor = (content) => {
const makeHTMLComponent = (html) => React.DOM.div({ dangerouslySetInnerHTML: {__html: html} });
return (
<div name="markdown_preview">
<div name="markdown_preview" className="markdown content">
{ makeHTMLComponent(markdown.toHTML(content)) }
</div>);
}
Expand Down Expand Up @@ -97,7 +97,7 @@ const MarkdownEditor = ({
flexShrink: 0,
flexBasis: 0,
}}>
{React.createElement(AceEditor, { tab })}
{React.createElement(CodeMirrorEditor, { tab })}
</div>): null
}
{ (showPreview && !showBigSize) ? (
Expand Down
Loading

0 comments on commit 8defe85

Please sign in to comment.