diff --git a/package-lock.json b/package-lock.json index 09f93831a..884889652 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12453,6 +12453,11 @@ "resolved": "https://registry.npmmirror.com/keycode/-/keycode-2.2.1.tgz", "integrity": "sha512-Rdgz9Hl9Iv4QKi8b0OlCRQEzp4AgVxyCtz5S/+VIHezDmrDhkp2N2TqBWOLz0/gbeREXOOiI9/4b8BY9uw2vFg==" }, + "keypress": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/keypress/-/keypress-0.1.0.tgz", + "integrity": "sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA==" + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/killable/-/killable-1.0.1.tgz", diff --git a/package.json b/package.json index 6a4c399bd..e2d3f53f8 100644 --- a/package.json +++ b/package.json @@ -81,6 +81,7 @@ "nvm": "0.0.4", "object-assign": "4.1.1", "papaparse": "^5.3.2", + "pinyin": "^4.0.0-alpha.0", "postcss-flexbugs-fixes": "3.2.0", "promise": "8.0.1", "prop-types": "^15.6.1", diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 2cf2b830c..30dfbeec1 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -1,6 +1,7 @@ import React from "react"; import md5 from 'md5'; import {Input} from "antd"; +import { url as ssrOrigin, host as ssrHost } from '../ssrUrl' const { Search } = Input; import { url as ssrOrigin, host as ssrHost } from '../ssrUrl' diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx index 5f020e6eb..400f08649 100644 --- a/src/forge/Information/Pages/apply.jsx +++ b/src/forge/Information/Pages/apply.jsx @@ -1,8 +1,9 @@ import React, { useEffect } from 'react'; -import { Form , Input , Row , Col, Button } from 'antd'; +import { Form , Input , Row , Col, Button, message } from 'antd'; import '../index.scss'; import { postCreateZone } from '../api'; import axios from 'axios'; + const { TextArea } = Input; const phonereg = /^([1][3456789])\d{9}$/ @@ -25,10 +26,10 @@ function Apply(props){ const zoneApplication = {...values}; postCreateZone(zoneApplication).then(response=>{ if(response && response.data && response.data.code===200){ - props.showNotification("提交成功!"); + message.success("您的专区申请已提交,请耐心等待管理员与您联系!"); setTimeout(() => { window.location.href="/"; - }, 70); + }, 1000); } }).catch(error=>{}) } @@ -55,6 +56,7 @@ function Apply(props){ callback(); }):callback(); } + return( @@ -72,9 +74,12 @@ function Apply(props){ label="专区名称" > {getFieldDecorator("name",{ - rules:[{required:true,message:"请输入专区名称"}] + rules:[ + {required:true,message:"请输入专区名称"}, + {pattern: /^[a-zA-Z0-9\u4e00-\u9fa5\\_.-]{1,31}$/, message: "长度1-30,支持中文,英文,数字,可包含下划线(_),中划线(-),英文句号(.)"} + ] })( - + )} {getFieldDecorator("key",{ rules:[ - { required: true,message:"请输入专区域名标识" }, + // { required: true,message:"请输入专区域名英文标识" }, { pattern: /^[a-zA-Z][a-zA-Z0-9_-]{0,18}[a-zA-Z]$/, message: "长度2-20,只能包含数字、字母、下划线、中划线,必须以字母开头结尾"}, { validator:checkId } ], validateTrigger:"onBlur", validateFirst: true, })( - + )} diff --git a/src/forge/Information/Pages/help.jsx b/src/forge/Information/Pages/help.jsx index 9d2ba6e18..823a6fdf0 100644 --- a/src/forge/Information/Pages/help.jsx +++ b/src/forge/Information/Pages/help.jsx @@ -66,7 +66,7 @@ function ProjectSource(props) { // 获取wiki内容 setLoading(true); getWiki({ - pageName: wiki.titleStr, + pageName: wiki.title_sub, ...wikiParams }).then(res=>{ setLoading(false); @@ -78,7 +78,7 @@ function ProjectSource(props) { message.error("加载失败") } }) - }, [wiki && wiki.titleStr]) + }, [wiki && wiki.title_sub]) useEffect(() => { if (scroller) { @@ -236,7 +236,7 @@ function ProjectSource(props) {
{wikiDetail.name}
{wikiDetail.commit &&
更新时间:{wikiDetail.commit.author.date || '刚刚'}
} - {adminUrl && } + {adminUrl && } {wikiDetail.md_content && } diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index 024f98b64..be7eebe8f 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -423,7 +423,7 @@ class Setting extends Component { {/* */} { - projectDetail && projectDetail.permission && (projectDetail.permission === "Admin" || projectDetail.permission === "Owner")? + projectDetail && projectDetail.permission && (projectDetail.permission === "Admin" || projectDetail.permission === "Owner" || projectDetail.permission ==="Manager")?
危险操作区
diff --git a/src/glcc/apply/editInfo.jsx b/src/glcc/apply/editInfo.jsx index 86ecbf46f..528f78fc4 100644 --- a/src/glcc/apply/editInfo.jsx +++ b/src/glcc/apply/editInfo.jsx @@ -1,5 +1,5 @@ import React , { useCallback, useEffect , useState } from 'react'; -import { Button, Form, Input, Select, Upload, message, Popconfirm, Checkbox } from 'antd'; +import { Button, Form, Input, Select, Upload, message, Popconfirm, Checkbox, Icon, Tooltip } from 'antd'; import {getUploadActionUrl} from 'educoder'; import {applyGlcc, findStudentTaskByTaskId, updateApplyGlcc} from '../api'; import TextArea from 'antd/lib/input/TextArea'; @@ -231,13 +231,22 @@ function EditRepoApplyInfo(props) { {cateList && cateList.map(item=> {return })} )} - {helper('GitLink地址', - '', - 'gitlinkUrl', - [{ required: true, message: "请输入GitLink项目地址" }, - { max: 252, message: '超出限制长度252位字符,请重新编辑' }], - {verify("gitlink")}}/> - )} + +
+ {helper('GitLink地址', + '', + 'gitlinkUrl', + [{ required: true, message: "请输入GitLink项目地址" }, + { max: 252, message: '超出限制长度252位字符,请重新编辑' }], + {verify("gitlink")}}/> + )} + + 指项目在GitLink的托管地址,详见迁移说明文档 +
} + > + + +
{getFieldDecorator("contactName", { rules: [{ required: true, message: "请输入项目联系人姓名" }, { max: 32, message: '超出限制长度32位字符,请重新编辑' }], validateFirst: true, initialValue: current_user.username })( diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx index fd70553c8..aaba59455 100644 --- a/src/glcc/apply/index.jsx +++ b/src/glcc/apply/index.jsx @@ -85,7 +85,7 @@ function Apply(props) {

申请说明

1、项目报名时间为{formatParsedResult(applyTime, "rangeDay")},请在报名截止时间(北京时间{formatParsedResult(applyTime, "end")})前提交报名信息。
2、本次GLCC夏令营建议使用GitLink为代码托管平台,学生基于GitLink上项目完成编程任务。同时也欢迎使用其他代码托管平台的项目参与活动。目前GLCC只对夏令营期间使用GitLink托管的项目提供部分奖励支持。
-
3、如果您的项目还未迁移到GitLink上,迁移事项请查看迁移说明文档。如在迁移过程中遇到问题,请加qq群: 1071514693 联系qq群管理员。
+
3、如果您的项目还未迁移到GitLink上,迁移事项请查看迁移说明文档。如在迁移过程中遇到问题,请加qq群: 1071514693 联系qq群管理员。
4、提交社区和题目信息后,欢迎与组委会联系沟通宣传推广和后续合作工作。联系人微信: _TigerWang(备注GitLink编程夏令营)
5、在项目报名期间({formatParsedResult(applyTime, "rangeDay")}),您可以随时进入当前页调整项目或课题报名信息
6、课题奖励默认由项目方支持,可提供现金或者实习机会等其他形式的奖励,请根据课题难度设定奖励内容。若您可能无法支撑本课题奖励,GLCC组委会将进行资助评审,择优资助。如未获得资助,将下线该课题
diff --git a/src/glcc/apply/index.scss b/src/glcc/apply/index.scss index 6a52017c5..1a7810d62 100644 --- a/src/glcc/apply/index.scss +++ b/src/glcc/apply/index.scss @@ -57,6 +57,17 @@ max-height: 100px; } } + + .hasQuestionBox{ + width: 50%; + display: inline-flex; + .question{ + color: $primary-color; + } + .ant-row.ant-form-item{ + width: 100%; + } + } } .introArea{ width: 100%; diff --git a/src/glcc/apply/taskApply.jsx b/src/glcc/apply/taskApply.jsx index 8fe90d38a..e828b09cf 100644 --- a/src/glcc/apply/taskApply.jsx +++ b/src/glcc/apply/taskApply.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import {Form, Input, Radio, Select } from 'antd'; +import {Form, Icon, Input, Radio, Select, Tooltip } from 'antd'; import TextArea from 'antd/lib/input/TextArea'; import { rewardMoney } from '../api'; const Option = Select.Option; @@ -36,13 +36,22 @@ function TaskApply(props) { { max: 32, message: '超出限制长度32位字符,请重新编辑' }], )} - {helper('课题链接', - '', - `taskUrl${taskKey}`, - [{ required: true, message: "请输入课题链接" }, - { max: 252, message: '超出限制长度252位字符,请重新编辑' }], - - )} +
+ {helper('课题链接', + '', + `taskUrl${taskKey}`, + [{ required: true, message: "请输入课题链接" }, + { max: 252, message: '超出限制长度252位字符,请重新编辑' }], + + )} + + 您可用issue的形式来发布课题,详见课题样例 +
} + > + + + + {helper('课题难度', '', `taskDifficulty${taskKey}`,