diff --git a/public/css/iconfont.css b/public/css/iconfont.css
index 9cface5a9..037ef59d9 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=1682403222759') format('woff2'),
- url('iconfont.woff?t=1682403222759') format('woff'),
- url('iconfont.ttf?t=1682403222759') format('truetype');
+ src: url('iconfont.woff2?t=1686823554834') format('woff2'),
+ url('iconfont.woff?t=1686823554834') format('woff'),
+ url('iconfont.ttf?t=1686823554834') format('truetype');
}
.iconfont {
@@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-a-zu2044:before {
+ content: "\e96d";
+}
+
+.icon-cuo:before {
+ content: "\e96c";
+}
+
+.icon-dui:before {
+ content: "\e96b";
+}
+
+.icon-zanting:before {
+ content: "\e96a";
+}
+
.icon-cangkuyuyanicon:before {
content: "\e962";
}
diff --git a/public/css/iconfont.js b/public/css/iconfont.js
index 26c9209ee..2baa04e0d 100644
--- a/public/css/iconfont.js
+++ b/public/css/iconfont.js
@@ -1 +1 @@
-window._iconfont_svg_string_2340181='',function(c){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,i,o,z,t,p=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2340181,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,z=c.document,t=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,v())})}function v(){t||(t=!0,o())}function m(){try{z.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}}(window);
\ No newline at end of file
+window._iconfont_svg_string_2340181='',function(c){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var h,i,o,z,t,p=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2340181,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,z=c.document,t=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,v())})}function v(){t||(t=!0,o())}function m(){try{z.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}}(window);
\ No newline at end of file
diff --git a/public/css/iconfont.json b/public/css/iconfont.json
index c21fd868d..bcaf91ced 100644
--- a/public/css/iconfont.json
+++ b/public/css/iconfont.json
@@ -5,6 +5,34 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
+ {
+ "icon_id": "36020261",
+ "name": "组 2044",
+ "font_class": "a-zu2044",
+ "unicode": "e96d",
+ "unicode_decimal": 59757
+ },
+ {
+ "icon_id": "5287658",
+ "name": "错",
+ "font_class": "cuo",
+ "unicode": "e96c",
+ "unicode_decimal": 59756
+ },
+ {
+ "icon_id": "8802648",
+ "name": "对",
+ "font_class": "dui",
+ "unicode": "e96b",
+ "unicode_decimal": 59755
+ },
+ {
+ "icon_id": "887857",
+ "name": "暂停",
+ "font_class": "zanting",
+ "unicode": "e96a",
+ "unicode_decimal": 59754
+ },
{
"icon_id": "34965902",
"name": "仓库语言icon",
diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf
index 3a879e105..7e2bf2dfa 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 ec894a8ce..b39f48934 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 3d4905eed..0cc082d5f 100644
Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ
diff --git a/src/AppConfig.js b/src/AppConfig.js
index cf7fe8b6a..9c5fbfd40 100644
--- a/src/AppConfig.js
+++ b/src/AppConfig.js
@@ -25,7 +25,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
- window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
+ window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student'
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
diff --git a/src/forge/Component/Setnav.jsx b/src/forge/Component/Setnav.jsx
index 970121597..0a918bd53 100644
--- a/src/forge/Component/Setnav.jsx
+++ b/src/forge/Component/Setnav.jsx
@@ -11,10 +11,12 @@ export default(({ header , nav })=>{
nav && nav.list && nav.list.length>0 ?
nav.list.map((item,key)=>{
return(
-
+ !item.hide &&
- {item.name}
+ {item.icon && }
+ {item.img &&
}
+ {item.name}
diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx
index eba75c5f5..ce20aae94 100644
--- a/src/forge/Information/Pages/newsDetail.jsx
+++ b/src/forge/Information/Pages/newsDetail.jsx
@@ -46,7 +46,7 @@ function NewsDetail(props){
{detail.name}
{ cmsDir && - {cmsDir.name}
}
- { cmsDir && - 发布于{cmsDir.createdAt}
}
+ { cmsDir && - 发布于{detail.publishTime}
}
{ detail.visits &&
{detail.visits} }
diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx
index c7da2c5ca..33de4f597 100644
--- a/src/forge/Information/index.jsx
+++ b/src/forge/Information/index.jsx
@@ -92,8 +92,8 @@ function Index(props){
function getAdminUrl(id){
getCheckZoneRole(id).then(response=>{
- if(response && response.data.code === 200){
- setAdminUrl(response.data);
+ if(response && response.data.data){
+ setAdminUrl(response.data.data);
}else{
setAdminUrl(undefined);
}
diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss
index 71f343b27..60d4d1e13 100644
--- a/src/forge/Information/index.scss
+++ b/src/forge/Information/index.scss
@@ -1022,12 +1022,6 @@
margin: 25px 25px 25px 0;
border-radius: 12px;
}
- .informations_detail.markdown-body{
- &>p{
- line-height: 32px;
- margin-bottom: 8px!important;
- }
- }
}
.zone_parter{
background-color: #fff;
@@ -1195,4 +1189,10 @@
}
}
}
+}
+.informations_detail.markdown-body{
+ &>p{
+ line-height: 32px;
+ margin-bottom: 8px!important;
+ }
}
\ No newline at end of file
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx
index 91bc4ef21..39ec3726c 100644
--- a/src/forge/Main/CoderDepot.jsx
+++ b/src/forge/Main/CoderDepot.jsx
@@ -63,9 +63,9 @@ function CoderDepot(props){
branchName = returnbar(branchName);
const details = props.projectDetail;
let pathname = props.history.location.pathname;
- const { platform } = props ;
+ const { platform , mirror_status } = props ;
//distribution:判断此用户是否可以创建发行版
- const distribution = details && details.type !== 2 && ( details.permission && details.permission !== "Reporter");
+ const distribution = details && details.type ===0 && ( details.permission && details.permission !== "Reporter");
const { bannerList } = props;
useEffect(()=>{
if(bannerList && bannerList.length>0){
@@ -93,7 +93,7 @@ function CoderDepot(props){
useEffect(()=>{
- if(details){
+ if(details && mirror_status===0){
setProjectDetail(details);
setTopics(details.topics);
setDesc(details.description);
@@ -102,7 +102,7 @@ function CoderDepot(props){
setDefaultBranch(details.default_branch);
setInviteCode(details.invite_code);
}
- },[details])
+ },[details,mirror_status])
useEffect(()=>{
// 设置网页标题
@@ -126,7 +126,7 @@ function CoderDepot(props){
},[treeValue])
useEffect(()=>{
- if (projectsId && owner && defaultBranch){
+ if (projectsId && owner && defaultBranch && mirror_status===0){
let b = turnbar(branchName) ;
if(pathname.indexOf(`/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${b}/`) > -1) {
let url = pathname.split(`/tree/${b}/`)[1];
@@ -139,10 +139,10 @@ function CoderDepot(props){
setType("dir");
}
}
- },[projectsId,owner,pathname,defaultBranch])
+ },[projectsId,owner,pathname,defaultBranch,mirror_status])
useEffect(()=>{
- if(platform){
+ if(platform && mirror_status===0){
setReadOnly(props.history.location.search.indexOf('edit') !== -1);
axios.get(`/${owner}/${projectsId}/releases.json`).then((result)=>{
if(result && result.data){
@@ -154,7 +154,7 @@ function CoderDepot(props){
}
})
}
- },[platform])
+ },[platform,mirror_status])
// 获取readme信息
function getReadmeInfo(path, ref) {
@@ -386,14 +386,14 @@ function CoderDepot(props){
const { current_user , checkIfLogin , showLoginDialog } = props;
const baseOper = current_user && current_user.login && issuesFlag;
- const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type !== 2 && pullsFlag && props.platform;
- const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin));
+ const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type ===0 && pullsFlag && props.platform;
+ const fileOperate = type === "dir" && projectDetail && projectDetail.type ===0 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin));
return(
- setOpenModal(false)} onOk={okUpdate}/>
+ {mirror_status ===0 && setOpenModal(false)} onOk={okUpdate}/> }
{
- (dirInfo || fileInfo) &&
+ ((dirInfo || fileInfo) && mirror_status===0 ) &&
{
- props && props.platform ?
+ props && (props.platform && mirror_status ===0) ?
}
{/* 贡献者 */}
-
+ {mirror_status ===0 && }
{/* 语言 */}
-
+ { mirror_status ===0 && }
}
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 8f4e41887..75cdf8871 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -192,7 +192,7 @@ class Detail extends Component {
// 非本平台项目
platform: false,
- mirror_status:1
+ mirror_status:2
}
}
@@ -240,7 +240,6 @@ class Detail extends Component {
open_devops: result.data.open_devops,
platform: result.data.platform && result.data.platform !== 'educoder'
})
-
if (result.data.type !== 0 && result.data.mirror_status === 1) {
console.log("--------start channel --------");
// 是镜像项目,且未完成迁移
@@ -260,16 +259,18 @@ class Detail extends Component {
mirror_status:1
})
} else if (result.data.mirror_status === 2) {
- this.deleteProjectBack();
this.setState({
- mirror_status:2
+ mirror_status:2,
+ firstSync: false
})
+ this.deleteProjectBack();
} else {
this.getBanner();
this.getDetail();
this.setState({
firstSync: false,
- secondSync: false
+ secondSync: false,
+ mirror_status:0
})
}
}
@@ -860,7 +861,7 @@ class Detail extends Component {
>
(mirror_status!==2 ? :)
+ (props) =>
}
>
diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js
index 8ade2df05..6502016a0 100644
--- a/src/forge/New/Index.js
+++ b/src/forge/New/Index.js
@@ -53,7 +53,10 @@ class Index extends Component {
licenseFlag:false,
// 区块链确权
- tokenConTri: false
+ tokenConTri: false,
+
+ gitHubUrl:false,
+ checkToken:undefined
}
}
componentDidMount = () => {
@@ -203,7 +206,9 @@ class Index extends Component {
isSpin: true
})
const { projectsType } = this.props.match.params;
- const { project_language_id, project_category_id, license_id, ignore_id, owners_id, ignoreFlag, licenseFlag, categoreFlag, languageFlag, tokenConTri} = this.state;
+ const { project_language_id, project_category_id, license_id
+ , ignore_id, owners_id, ignoreFlag, licenseFlag,
+ categoreFlag, languageFlag, tokenConTri,gitHubUrl} = this.state;
const decoderPass = Base64.encode(values.password);
const url = (projectsType && projectsType === "mirror") ? "/projects/migrate.json" : "/projects.json";
// 新建项目的时候,暂存数据,如果失败,返回的时候可以重新赋值
@@ -220,7 +225,8 @@ class Index extends Component {
user_id:owners_id,
blockchain: tokenConTri,
blockchain_token_all: 10000,
- blockchain_init_token: parseInt(blockchain_init)
+ blockchain_init_token: parseInt(blockchain_init),
+ auth_token:gitHubUrl ? values.auth_token : undefined
}).then((result) => {
if (result && result.data.id) {
projectsType && projectsType !== "mirror" && this.props.showNotification(`项目创建成功!`);
@@ -235,6 +241,7 @@ class Index extends Component {
})
})
} else {
+ window.scrollTo(0,0);
this.setState({
isSpin: false
})
@@ -301,6 +308,9 @@ class Index extends Component {
repository_name:first
})
}
+ this.setState({gitHubUrl:value.indexOf("https://github.com")>-1 ? true : false})
+ }else{
+ this.setState({gitHubUrl:false,checkToken:undefined})
}
}
@@ -344,6 +354,29 @@ class Index extends Component {
}
}
+
+ blurFunc=(e)=>{
+ let value = e.target.value;
+ if(value){
+ const { clone_addr } = this.props.form.getFieldsValue();
+ if(clone_addr){
+ const u = `/projects/verify_auth_token.json`;
+ axios.post(u,{
+ auth_token:value,
+ clone_addr
+ }).then(response=>{
+ if(response && response.data){
+ this.setState({
+ checkToken:response.data.data
+ })
+ }
+ }).catch(error=>{})
+ }
+ }else{
+ this.setState({checkToken:undefined})
+ }
+ }
+
render() {
const { getFieldDecorator } = this.props.form;
// 项目类型:deposit-托管项目,mirror-镜像项目
@@ -372,7 +405,9 @@ class Index extends Component {
licenseFlag,
languageFlag,
categoreFlag,
- tokenConTri
+ tokenConTri,
+ gitHubUrl,
+ checkToken
} = this.state;
return (
@@ -381,7 +416,6 @@ class Index extends Component {