forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
e2b9f16f60
commit
d7a2c31ffb
|
@ -32,6 +32,7 @@
|
|||
<script src="https://gw.alipayobjects.com/os/lib/react-dom/16.14.0/umd/react-dom.%REACT_URL%.js"></script>
|
||||
<script src="%PUBLIC_URL%js/jquery-1.8.3.min.js"></script>
|
||||
<script src="%PUBLIC_URL%js/js_min_all.js"></script>
|
||||
<script src="%PUBLIC_URL%js/common.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/codemirror.js"></script>
|
||||
<script src="%PUBLIC_URL%js/editormd/editormd.min.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/merge/merge.js"></script>
|
||||
|
@ -45,8 +46,19 @@
|
|||
hm.src = "https://hm.baidu.com/hm.js?7e2def1fe918f15f9f1c5c061f69b256";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
|
||||
})();
|
||||
</script>
|
||||
window.onload=function(){
|
||||
$(".newContainer").delegate("a.anchors","click",function(){
|
||||
let h = $(this).offset().top - 180;
|
||||
console.log($(this).offset().top,document.body.scrollTop);
|
||||
$("html,body").animate({scrollTop:h},10);
|
||||
window.location.hash = $(this).attr("name");
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -23,6 +23,7 @@ function indentCodeCompensation(raw, text) {
|
|||
.join('\n');
|
||||
}
|
||||
|
||||
|
||||
//兼容之前的 ##标题式写法
|
||||
let toc = []
|
||||
let ctx = ["<ul>"]
|
||||
|
@ -117,6 +118,7 @@ function replace_math_with_ids(text) {
|
|||
return rs
|
||||
}
|
||||
|
||||
|
||||
const original_listitem = renderer.listitem
|
||||
renderer.listitem = function (text, task, checked) {
|
||||
return original_listitem(replace_math_with_ids(text), task, checked)
|
||||
|
@ -155,7 +157,8 @@ renderer.heading = function (text, level, raw) {
|
|||
level: level,
|
||||
text: text
|
||||
})
|
||||
return '<h' + level + ' id="' + anchor + '" class="markdown_anchors"><a href="#'+anchor+'" class="anchors"><i class="iconfont icon-lianjieicon font-14"></i></a>' + text + '</h' + level + '>'
|
||||
let id = anchor.replace(/[.,/#!$%^&*;:{}=\-_`~():,。¥;「」|?》《~·【】‘、!]/g,"");
|
||||
return '<h' + level + ' id="' + id + '" class="markdown_anchors"><a name="#'+id+'" class="anchors"><i class="iconfont icon-lianjieicon font-14"></i></a>' + text + '</h' + level + '>'
|
||||
}
|
||||
marked.setOptions({
|
||||
silent: true,
|
||||
|
|
|
@ -56,7 +56,7 @@ export default ({
|
|||
let id = decodeURIComponent(u.split("#")[1]);
|
||||
let ele = document.getElementById(id);
|
||||
if(ele){
|
||||
window.scrollTo(0, ele.offsetTop + 120);
|
||||
window.scrollTo(0, ele.offsetTop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,8 +124,29 @@ export default ((props) => {
|
|||
</AlignCenterBetween>
|
||||
<div className="g-desc">{group.description ? group.description : "暂无描述"}</div>
|
||||
<div className="g-tip">
|
||||
<p>组织的Owner团队拥有更改组织设置,在组织内新建仓库,新建组织团队等权限。</p>
|
||||
<p>此外,Owner团队成员对当前组织下所有项目均具有仓库管理员权限,组织下其他团队的权限可由Owner团队成员自由制定。</p>
|
||||
{
|
||||
group.authorize === "owner"?
|
||||
<div>
|
||||
<p>管理员团队对 <span>所有仓库</span> 具有操作权限,且对组织具有 <span>管理员权限</span>。</p>
|
||||
<p>此外,该团队拥有了 <span>创建仓库</span> 的权限:成员可以在组织中创建新的仓库。</p>
|
||||
</div>
|
||||
:
|
||||
group.authorize === "admin" ?
|
||||
<div>
|
||||
<p>该团队拥有<span> 管理 所有仓库</span>的权限:团队成员可以读取、克隆、推送以及添加其它仓库协作者。</p>
|
||||
<p>此外,该团队拥有了 <span>创建仓库</span> 的权限:成员可以在组织中创建新的仓库</p>
|
||||
</div>
|
||||
:
|
||||
group.authorize === "write" ?
|
||||
<div>
|
||||
<p>该团队拥有对所属仓库的 <span>读取</span> 和 <span>写入</span> 的权限</p>
|
||||
</div>
|
||||
:
|
||||
<div>
|
||||
<p>此团队授予 <span>读取所有仓库</span> 的访问权限:成员可以查看和克隆仓库。</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
{group.is_admin ? <Button type="primary" onClick={()=>props.history.push(`/${OIdentifier}/teams/${groupId}/setting`)}><span className="color-white">团队设置</span></Button> : ""}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -291,10 +291,10 @@
|
|||
color:#888;
|
||||
padding:28px 20px;
|
||||
border-top: 1px solid #eee;
|
||||
&>p{
|
||||
&>div>p{
|
||||
margin-bottom: 10px!important;
|
||||
}
|
||||
&>p>span{
|
||||
&>div>p>span{
|
||||
color:#333;
|
||||
}
|
||||
&>button{
|
||||
|
|
Loading…
Reference in New Issue