Merge pull request 'issue上线' (#119) from caishi/forgeplus-react:feature_repo_second_page into feature_repo_second_page
This commit is contained in:
commit
e7b977cc6b
|
@ -67,11 +67,14 @@ function Index(props) {
|
|||
last_commit && last_commit.committer && last_commit.committer.id?
|
||||
<Link to={`/${ last_commit.committer.login}`}>
|
||||
<img style={{borderRadius:"50%"}} src={getImageUrl(`/${ last_commit.committer.image_url}`)} alt=""/>
|
||||
<span className="mr3 color-grey-3" style={{fontWeight:"500"}}>{last_commit && last_commit.committer && last_commit.committer.name}</span>
|
||||
</Link>
|
||||
:
|
||||
<img style={{borderRadius:"50%"}} src={getImageUrl(`/${ last_commit.committer.image_url}`)} alt=""/>
|
||||
<React.Fragment>
|
||||
<img style={{borderRadius:"50%"}} src={getImageUrl(`/${ last_commit.committer.image_url}`)} alt=""/>
|
||||
<span className="mr3 color-grey-3" style={{fontWeight:"500"}}>{last_commit && last_commit.committer && last_commit.committer.name}</span>
|
||||
</React.Fragment>
|
||||
}
|
||||
<span className="mr3 color-grey-3" style={{fontWeight:"500"}}>{last_commit && last_commit.committer && last_commit.committer.name}</span>
|
||||
<span className="color-grey-3">更新于{last_commit && last_commit.time_from_now}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
flex:1;
|
||||
flex-direction: column;
|
||||
a:hover{
|
||||
text-decoration: underline;
|
||||
span{
|
||||
color: #466AFF!important;
|
||||
}
|
||||
}
|
||||
img{
|
||||
height: 20px;
|
||||
|
|
|
@ -65,16 +65,18 @@ class Index extends Component {
|
|||
<FileLanguage language={language} select_language={this.select_language}></FileLanguage>
|
||||
</div>
|
||||
</div>
|
||||
<Meditor
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
filepath={`${file_path}`}
|
||||
language = {language}
|
||||
content={undefined}
|
||||
readOnly={false}
|
||||
editorType="new"
|
||||
descName={filename && `Add ${filename}`}
|
||||
></Meditor>
|
||||
<div className="editorBorder">
|
||||
<Meditor
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
filepath={`${file_path}`}
|
||||
language = {language}
|
||||
content={undefined}
|
||||
readOnly={false}
|
||||
editorType="new"
|
||||
descName={filename && `Add ${filename}`}
|
||||
></Meditor>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
|
|
@ -8,7 +8,13 @@
|
|||
border: 1px solid #d9d9d9!important;
|
||||
border-right: none!important;
|
||||
}
|
||||
|
||||
.editorBorder .editorBorderBox{
|
||||
border:1px solid #eee;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.editorBorder .editorBorderSubmitBox{
|
||||
padding:20px 0px!important;
|
||||
}
|
||||
.userScrew{
|
||||
margin:20px 0px;
|
||||
border:1px solid #f4f4f4;
|
||||
|
|
|
@ -69,10 +69,12 @@ class m_editor extends Component {
|
|||
);
|
||||
|
||||
const lineCount = editor.getModel().getLineCount() || 1;
|
||||
const height =
|
||||
let height =
|
||||
editor.getTopForLineNumber(lineCount + 1) +
|
||||
lineHeight +
|
||||
padding;
|
||||
padding ;
|
||||
|
||||
if(height<400){height = 400;}
|
||||
|
||||
if (this.state.prevHeight !== height) {
|
||||
this.setState({
|
||||
|
@ -89,36 +91,32 @@ class m_editor extends Component {
|
|||
|
||||
|
||||
return (
|
||||
|
||||
|
||||
<React.Fragment>
|
||||
<div>
|
||||
<div className="">
|
||||
<Editor
|
||||
language={language ? language : "plaintext"}
|
||||
theme={"vs-grey"}
|
||||
placeholder="请输入内容"
|
||||
value={editorValue}
|
||||
options={editor_options}
|
||||
onChange={this.changeEditor}
|
||||
editorWillMount={this.editorWillMount}
|
||||
editorDidMount={handleEditorMount}
|
||||
/>
|
||||
</div>
|
||||
{!readOnly && (
|
||||
<div style={{marginTop:"20px",padding:"20px"}}>
|
||||
<UserSubmitComponent
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
filepath={`${this.props.filepath}`}
|
||||
content={editorValue}
|
||||
editor_type={editorType}
|
||||
currentBranch={currentBranch}
|
||||
descName={descName}
|
||||
></UserSubmitComponent>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="editorBorderBox">
|
||||
<Editor
|
||||
language={language ? language : "plaintext"}
|
||||
theme={"vs-grey"}
|
||||
placeholder="请输入内容"
|
||||
value={editorValue}
|
||||
options={editor_options}
|
||||
onChange={this.changeEditor}
|
||||
editorWillMount={this.editorWillMount}
|
||||
editorDidMount={handleEditorMount}
|
||||
/>
|
||||
</div>
|
||||
{!readOnly && (
|
||||
<div className="editorBorderSubmitBox" style={{marginTop:"20px",padding:"20px"}}>
|
||||
<UserSubmitComponent
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
filepath={`${this.props.filepath}`}
|
||||
content={editorValue}
|
||||
editor_type={editorType}
|
||||
currentBranch={currentBranch}
|
||||
descName={descName}
|
||||
></UserSubmitComponent>
|
||||
</div>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ export default Form.create()(
|
|||
}
|
||||
],
|
||||
<Input
|
||||
addonBefore={`https://`+ port ? `${hostname}:${port}`:`${hostname}`}
|
||||
addonBefore={port ? `${hostname}:${port}/`:`https://${hostname}/`}
|
||||
placeholder="组织账号" maxLength={100}
|
||||
/>
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue