diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 1c01cdedf..32cb789aa 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1623836536204') format('woff2'), - url('iconfont.woff?t=1623836536204') format('woff'), - url('iconfont.ttf?t=1623836536204') format('truetype'); + src: url('iconfont.woff2?t=1625800786751') format('woff2'), + url('iconfont.woff?t=1625800786751') format('woff'), + url('iconfont.ttf?t=1625800786751') format('truetype'); } .iconfont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-file-submodule:before { + content: "\e866"; +} + .icon-nv1:before { content: "\e864"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 1cae31eb4..c4fb710fb 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -!function(c){var l,a,h,i,o,z,t='',p=(p=document.getElementsByTagName("script"))[p.length-1].getAttribute("data-injectcss");if(p&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}l=function(){var c,l,a;(a=document.createElement("div")).innerHTML=t,t=null,(l=a.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",c=l,(a=document.body).firstChild?(l=a.firstChild).parentNode.insertBefore(c,l):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,(z=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}v()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file +!function(c){var l,a,h,i,o,z,t='',p=(p=document.getElementsByTagName("script"))[p.length-1].getAttribute("data-injectcss");if(p&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}l=function(){var c,l,a;(a=document.createElement("div")).innerHTML=t,t=null,(l=a.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",c=l,(a=document.body).firstChild?(l=a.firstChild).parentNode.insertBefore(c,l):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,(z=function(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(z,50)}v()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index 243cdd80f..43c5fbfbb 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,13 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "17575494", + "name": "file-submodule", + "font_class": "file-submodule", + "unicode": "e866", + "unicode_decimal": 59494 + }, { "icon_id": "7539612", "name": "nv", diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index e4f568693..96f61dcb8 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index e1493160a..67761f2ca 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index 598c44d6d..ca08e83e2 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index ff13b61c7..a70ae05ed 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -217,10 +217,12 @@ function CoderDepot(props){ } // 点击跳转到子目录 function goToSubRoot(path,type,filename){ - let enBranch = branchName || defaultBranch; - let checkvalue = turnbar(enBranch); - setType(type); - props.history.push(`/projects/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`); + if(type!=="submodule"){ + let enBranch = branchName || defaultBranch; + let checkvalue = turnbar(enBranch); + setType(type); + props.history.push(`/projects/${owner}/${projectsId}${`/tree/${checkvalue}`}${path?`/${path}`:""}`); + } } function onEdit(readOnly){ diff --git a/src/forge/Main/CoderDepotCatalogue.jsx b/src/forge/Main/CoderDepotCatalogue.jsx index f374da15c..9bdf093c0 100644 --- a/src/forge/Main/CoderDepotCatalogue.jsx +++ b/src/forge/Main/CoderDepotCatalogue.jsx @@ -2,12 +2,18 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { truncateCommitId } from '../common/util'; +const typeIco = { + "submodule":"icon-file-submodule font-17", + "file":'icon-wenjia font-15', + "dir":"icon-wenjianjia1 font-15" +} + function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){ return(
  • - goToSubRoot(item.path,item.type,item.name)}> - {item.name} + goToSubRoot(item.path,item.type,item.name)} style={{cursor:item.type!=="submodule"?"pointer":"default"}}> + {item.name}