Merge pull request '代码库一级页面提交描述信息md渲染' (#136) from durian/forgeplus-react:pre_develop_dev into pre_develop_dev
This commit is contained in:
commit
e04496f662
|
@ -22,6 +22,7 @@ import UpdateDescModal from './sub/UpdateDescModal';
|
||||||
import Nodata from '../Nodata';
|
import Nodata from '../Nodata';
|
||||||
import Invite from './sub/Invite';
|
import Invite from './sub/Invite';
|
||||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
import RenderHtml from '../../components/render-html';
|
||||||
/**
|
/**
|
||||||
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
||||||
*/
|
*/
|
||||||
|
@ -196,7 +197,7 @@ function CoderDepot(props){
|
||||||
let ele = document.getElementById("ptxt");
|
let ele = document.getElementById("ptxt");
|
||||||
if(ele){
|
if(ele){
|
||||||
let h = ele.offsetHeight;
|
let h = ele.offsetHeight;
|
||||||
if( h > 18 ) setHideBtn(true);
|
if( h > 33 ) setHideBtn(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},[projectDetail,lastCommit])
|
},[projectDetail,lastCommit])
|
||||||
|
@ -457,7 +458,7 @@ function CoderDepot(props){
|
||||||
<div className="listtablehead">
|
<div className="listtablehead">
|
||||||
<User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/>
|
<User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/>
|
||||||
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}>
|
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}>
|
||||||
<pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}>{lastCommit.message}</Link></pre>
|
<pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}><RenderHtml value={lastCommit.message}/></Link></pre>
|
||||||
</div>
|
</div>
|
||||||
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }
|
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ export default (props) => {
|
||||||
<div className="f-wrap-between">
|
<div className="f-wrap-between">
|
||||||
<div>
|
<div>
|
||||||
{commit && commit.message &&
|
{commit && commit.message &&
|
||||||
<RenderHtml className="task-hide" value={commit.message} url={history.location} />
|
<RenderHtml className="task-hide" value={commit.message}/>
|
||||||
}
|
}
|
||||||
<Link to={`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`}><i className="iconfont icon-fenzhi2 font-18"></i>{data.branch}</Link>
|
<Link to={`/${owner}/${projectsId}/tree/${truncateCommitId(sha)}`}><i className="iconfont icon-fenzhi2 font-18"></i>{data.branch}</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -252,7 +252,13 @@
|
||||||
border: 1px solid rgba(42, 97, 255, 0.23);
|
border: 1px solid rgba(42, 97, 255, 0.23);
|
||||||
background-color: #FAFCFF;
|
background-color: #FAFCFF;
|
||||||
.ellipsistxt{
|
.ellipsistxt{
|
||||||
margin-top: 6px;
|
.markdown-body{
|
||||||
|
line-height: 8px;
|
||||||
|
& p {
|
||||||
|
margin: 0 0px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
margin-top: 2px;
|
||||||
// cursor: pointer;
|
// cursor: pointer;
|
||||||
#ptxt{
|
#ptxt{
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
|
@ -270,7 +276,7 @@
|
||||||
width: 0;
|
width: 0;
|
||||||
color: #666;
|
color: #666;
|
||||||
&.hidetxt{
|
&.hidetxt{
|
||||||
height: 18px;
|
height: 22px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-right:8px;
|
padding-right:8px;
|
||||||
|
|
|
@ -104,7 +104,7 @@ ul,ol,dl{
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
&:hover{
|
&:hover{
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
& p{
|
& .markdown-body{
|
||||||
color: #466AFF;
|
color: #466AFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue