Merge pull request 'issue上线' (#119) from caishi/forgeplus-react:feature_repo_second_page into feature_repo_second_page

This commit is contained in:
jasder 2021-10-08 18:46:22 +08:00
commit e7b977cc6b
6 changed files with 57 additions and 46 deletions

View File

@ -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>
: :
<React.Fragment>
<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> <span className="mr3 color-grey-3" style={{fontWeight:"500"}}>{last_commit && last_commit.committer && last_commit.committer.name}</span>
</React.Fragment>
}
<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>

View File

@ -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;

View File

@ -65,6 +65,7 @@ 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>
<div className="editorBorder">
<Meditor <Meditor
{...this.props} {...this.props}
{...this.state} {...this.state}
@ -77,6 +78,7 @@ class Index extends Component {
></Meditor> ></Meditor>
</div> </div>
</div> </div>
</div>
</React.Fragment> </React.Fragment>
); );
} }

View File

@ -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;

View File

@ -69,11 +69,13 @@ 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({
prevHeight:height prevHeight:height
@ -89,11 +91,8 @@ 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"}
@ -106,7 +105,7 @@ class m_editor extends Component {
/> />
</div> </div>
{!readOnly && ( {!readOnly && (
<div style={{marginTop:"20px",padding:"20px"}}> <div className="editorBorderSubmitBox" style={{marginTop:"20px",padding:"20px"}}>
<UserSubmitComponent <UserSubmitComponent
{...this.props} {...this.props}
{...this.state} {...this.state}
@ -118,7 +117,6 @@ class m_editor extends Component {
></UserSubmitComponent> ></UserSubmitComponent>
</div> </div>
)} )}
</div>
</React.Fragment> </React.Fragment>
); );
} }

View File

@ -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}
/> />
)} )}