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