1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

change file path max-height (#3814)

This commit is contained in:
Michael An
2019-07-15 14:42:18 +08:00
committed by Daniel Pan
parent 5f2382ff0d
commit 09abcfa5e0
3 changed files with 22 additions and 5 deletions

View File

@@ -43,10 +43,10 @@ class DirPath extends React.Component {
} else { } else {
nodePath += '/' + item; nodePath += '/' + item;
return ( return (
<span key={index} > <Fragment key={index} >
<span className="path-split">/</span> <span className="path-split">/</span>
<a className="path-link" data-path={nodePath} onClick={this.onPathClick}>{item}</a> <a className="path-link" data-path={nodePath} onClick={this.onPathClick}>{item}</a>
</span> </Fragment>
); );
} }
}); });

View File

@@ -286,3 +286,20 @@ img[src=""],img:not([src]){ /* for first loading img*/
color: #999; color: #999;
} }
.path-container {
display: flex;
word-break: keep-all;
width: 90%;
}
.path-container a {
max-height: 50px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.path-container span, .path-container a {
flex-shrink: 1;
}
.path-container span:first-child, .path-container span:last-child {
flex-shrink: 0;
}

View File

@@ -57,7 +57,7 @@ class MainPanel extends Component {
} else { } else {
nodePath += '/' + item; nodePath += '/' + item;
return ( return (
<span key={index} > <Fragment key={index} >
<span className="path-split">/</span> <span className="path-split">/</span>
<a <a
className="path-link" className="path-link"
@@ -65,7 +65,7 @@ class MainPanel extends Component {
onClick={this.onMainNavBarClick}> onClick={this.onMainNavBarClick}>
{item} {item}
</a> </a>
</span> </Fragment>
); );
} }
}); });
@@ -116,7 +116,7 @@ class MainPanel extends Component {
</div> </div>
<div className="main-panel-center"> <div className="main-panel-center">
<div className="cur-view-path"> <div className="cur-view-path">
<div className="path-containter"> <div className="path-container">
<a href={siteRoot + 'published/' + slug} className="normal">{slug}</a> <a href={siteRoot + 'published/' + slug} className="normal">{slug}</a>
{this.renderNavPath()} {this.renderNavPath()}
</div> </div>