1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-15 06:44:16 +00:00

modify tag style

This commit is contained in:
shanshuirenjia
2018-12-17 18:43:18 +08:00
parent 0b9e5d3a1b
commit 163f92493c
3 changed files with 10 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ class EditFileTagDialog extends React.Component {
} }
</ModalBody> </ModalBody>
<ModalFooter> <ModalFooter>
<Button color="primary" onClick={this.toggle}>{gettext('Close')}</Button> <Button onClick={this.toggle}>{gettext('Close')}</Button>
</ModalFooter> </ModalFooter>
</Modal> </Modal>
); );

View File

@@ -377,6 +377,12 @@ class DirentListItem extends React.Component {
let { path, dirent } = this.props; let { path, dirent } = this.props;
let direntPath = Utils.joinPath(path, dirent.name); let direntPath = Utils.joinPath(path, dirent.name);
let href = siteRoot + 'wiki/lib/' + this.props.repoID + Utils.encodePath(direntPath); let href = siteRoot + 'wiki/lib/' + this.props.repoID + Utils.encodePath(direntPath);
let tagTitle = '';
if (dirent.file_tags) {
dirent.file_tags.forEach(item => {
tagTitle += item.name + ' ';
});
}
return ( return (
<Fragment> <Fragment>
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave}> <tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave}>
@@ -400,11 +406,11 @@ class DirentListItem extends React.Component {
} }
</td> </td>
<td> <td>
<div className="dirent-item tag-list tag-list-stacked "> <div className="dirent-item tag-list tag-list-stacked" title={tagTitle}>
{ dirent.type !== 'dir' && dirent.file_tags.map((fileTag, index) => { { dirent.type !== 'dir' && dirent.file_tags.map((fileTag, index) => {
let length = dirent.file_tags.length; let length = dirent.file_tags.length;
return ( return (
<span className={`file-tag bg-${fileTag.color}`} key={fileTag.id} title={fileTag.name} style={{zIndex: length - index }}></span> <span className={`file-tag bg-${fileTag.color}`} key={fileTag.id} style={{zIndex: length - index }}></span>
); );
})} })}
</div> </div>

View File

@@ -1011,7 +1011,7 @@ table .menu-toggle {
.tag-list-stacked .file-tag{ .tag-list-stacked .file-tag{
margin-right: -0.3rem; margin-right: -0.3rem;
box-shadow: 0 0 0 0.125rem #fff; border: 0.125rem solid #fff;
cursor: pointer; cursor: pointer;
} }