mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
[fix] readme-style (#2885)
This commit is contained in:
@@ -37,7 +37,7 @@ class ReadmeDialog extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Modal isOpen={true} className="readme-dialog" size="lg">
|
<Modal isOpen={true} toggle={this.props.toggleCancel} className="readme-dialog" size="lg">
|
||||||
<ModalHeader>{gettext(this.props.fileName)}
|
<ModalHeader>{gettext(this.props.fileName)}
|
||||||
<a className="readme-dialog-edit" href={this.props.href} target='_blank'><i className="fa fa-pencil"></i></a>
|
<a className="readme-dialog-edit" href={this.props.href} target='_blank'><i className="fa fa-pencil"></i></a>
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
|
@@ -84,22 +84,22 @@ class RepoInfoBar extends React.Component {
|
|||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
<div className="readme-files">
|
<div className={(usedRepoTags.length > 0 && readmeMarkdown) ? 'file-info-list mt-1' : 'file-info-list'}>
|
||||||
{(readmeMarkdown !== null && readmeMarkdown.size > 1) &&
|
{(readmeMarkdown !== null && parseInt(readmeMarkdown.size) > 1) &&
|
||||||
<span className="readme-file" onClick={this.toggleReadme}>
|
<span className="file-info" onClick={this.toggleReadme}>
|
||||||
<i className="readme-flag fa fa-flag"></i>
|
<i className="file-flag fa fa-flag"></i>
|
||||||
<span className="readme-name">{readmeMarkdown.name}</span>
|
<span className="used-tag-name">{readmeMarkdown.name}</span>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
{(readmeMarkdown !== null && readmeMarkdown.size < 2) &&
|
{(readmeMarkdown !== null && parseInt(readmeMarkdown.size) < 2) &&
|
||||||
<span className="readme-file">
|
<span className="file-info">
|
||||||
<i className="readme-flag fa fa-flag"></i>
|
<i className="file-flag fa fa-flag"></i>
|
||||||
<a className="readme-name" href={href} target='_blank'>{readmeMarkdown.name}</a>
|
<a className="used-tag-name" href={href} target='_blank'>{readmeMarkdown.name}</a>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
{this.props.draftCounts > 0 &&
|
{this.props.draftCounts > 0 &&
|
||||||
<span className="readme-file">
|
<span className="file-info">
|
||||||
<i className="readme-flag fa fa-pen"></i>
|
<i className="file-flag fa fa-pen"></i>
|
||||||
<span className="used-tag-name">{gettext('draft')}</span>
|
<span className="used-tag-name">{gettext('draft')}</span>
|
||||||
<span className="used-tag-files" onClick={this.toggleDrafts}>
|
<span className="used-tag-files" onClick={this.toggleDrafts}>
|
||||||
{this.props.draftCounts > 1 ? this.props.draftCounts + ' files' : this.props.draftCounts + ' file'}
|
{this.props.draftCounts > 1 ? this.props.draftCounts + ' files' : this.props.draftCounts + ' file'}
|
||||||
@@ -107,8 +107,8 @@ class RepoInfoBar extends React.Component {
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
{this.props.reviewCounts > 0 &&
|
{this.props.reviewCounts > 0 &&
|
||||||
<span className="readme-file">
|
<span className="file-info">
|
||||||
<i className="readme-flag fa fa-clipboard"></i>
|
<i className="file-flag fa fa-clipboard"></i>
|
||||||
<span className="used-tag-name">{gettext('review')}</span>
|
<span className="used-tag-name">{gettext('review')}</span>
|
||||||
<span className="used-tag-files" onClick={this.toggleReviews}>
|
<span className="used-tag-files" onClick={this.toggleReviews}>
|
||||||
{this.props.reviewCounts > 1 ? this.props.reviewCounts + ' files' : this.props.reviewCounts + ' file'}
|
{this.props.reviewCounts > 1 ? this.props.reviewCounts + ' files' : this.props.reviewCounts + ' file'}
|
||||||
|
@@ -36,30 +36,21 @@
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.readme-files {
|
.file-info {
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.readme-file {
|
|
||||||
margin: 0 15px;
|
margin: 0 15px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.readme-file a {
|
.file-info a {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.readme-flag {
|
.file-flag {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #f19645;
|
color: #f19645;
|
||||||
}
|
}
|
||||||
|
|
||||||
.readme-name {
|
|
||||||
margin: 0 0.25rem;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.readme-dialog-edit {
|
.readme-dialog-edit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
|
Reference in New Issue
Block a user