- {OIdentifier}
+ {detail && detail.organization && detail.organization.nickname}
- {detail ? detail.name : "新建团队"}
+ {detail ? detail.nickname : "新建团队"}
{
detail &&
diff --git a/src/forge/Upload/Index.js b/src/forge/Upload/Index.js
index 5b09ca07..713803aa 100644
--- a/src/forge/Upload/Index.js
+++ b/src/forge/Upload/Index.js
@@ -1,7 +1,6 @@
import React, { Component } from "react";
import { Upload, Icon , Button } from 'antd';
import { getUploadActionUrl, appendFileSizeToUploadFileAll } from 'educoder';
-import { AlignCenter } from '../Component/layout';
import axios from 'axios';
const { Dragger } = Upload;
@@ -64,7 +63,6 @@ class Index extends Component {
changeIsComplete && changeIsComplete(true);
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList;
-
this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) });
this.fileIdList(fileList);
}
@@ -111,7 +109,7 @@ class Index extends Component {
:
{icon || }
- 拖动文件或点击此处上传
+ 拖动文件或点击此处上传
)
}
diff --git a/src/forge/Upload/untitled b/src/forge/Upload/untitled
deleted file mode 100644
index 2796e4d7..00000000
--- a/src/forge/Upload/untitled
+++ /dev/null
@@ -1,21 +0,0 @@
-
-1.请求URL: https://code.ihub.org.cn/api/v1/mirrors/create.json
-
-2.请求方式: POST
-
-3.参数:
-
-{
- "image_url": "xxx.git", #必填,且后缀必为.git,
- "language": "Ruby", #必填,如数据库不存在,则会创建新的记录
-}
-
-
-4. 返回值: {
- "status": 1,
- "message": "同步成功,项目ID===1806"
-}
-
-5. 返回值说明: 仅有当有返回值,且返回值的status 的值为1, 才是创建成功,其余均为创建失败
-
-
diff --git a/src/forge/Version/New.jsx b/src/forge/Version/New.jsx
deleted file mode 100644
index 0678a345..00000000
--- a/src/forge/Version/New.jsx
+++ /dev/null
@@ -1,278 +0,0 @@
-import React, { useState, useEffect, useCallback, forwardRef } from "react";
-import styled from "styled-components";
-import { AutoComplete, Select, Input, Checkbox, Button, Form } from "antd";
-
-import Editor from "../../modules/tpm/challengesnew/tpm-md-editor";
-import Upload from "../Upload/Index";
-import Attachments from "../Upload/attachment";
-import axios from "axios";
-import "./version.css";
-import UploadImg from "../Images/upload.png";
-import { getBranch } from '../GetData/getData';
-
-const { Option } = AutoComplete;
-
-export default Form.create()(
- forwardRef(
- (
- { form, projectDetail , match, showNotification, history },
- ref
- ) => {
- const { getFieldDecorator, validateFields, setFieldsValue } = form;
- const [tagList, setTagList] = useState(undefined);
- const [branchList, setBranchList] = useState(undefined);
- const [desc, setDesc] = useState(null);
- const [fileList, setFileList] = useState(undefined);
- const [attachment, setAttachment] = useState(undefined);
- const [options , setOptions] = useState(undefined);
-
-
- const repo_id = projectDetail && projectDetail.repo_id;
- const { projectsId, versionId , owner } = match.params;
- useEffect(()=>{
- getBranchs(projectsId,owner);
- },[projectsId])
-
- async function getBranchs(id,owner){
- let result = await getBranch(id,owner);
- setBranchList(result);
- }
-
- const Span = styled.span`
- margin: 0px 15px;
- color: #bbb;
- line-height: 35px;
- `;
-
-
- useEffect(() => {
- if (versionId) {
- const url = `/${owner}/${projectsId}/releases/${versionId}/edit.json`;
- axios.get(url).then(result => {
- if (result) {
- setFieldsValue(result.data);
- setDesc(result.data.body);
- setAttachment(result.data.attachments);
- }
- });
- }
- }, [versionId]);
-
- useEffect(() => {
- if (projectsId) {
- const url = `/${owner}/${projectsId}/tags.json`;
- axios
- .get(url,{params:{
- limit:1000
- }})
- .then(result => {
- if (result) {
- setTagList(result.data);
- setOptions(renderTagList(result.data));
- }
- })
- .catch(error => {
- console.log(error);
- });
- }
- }, [projectsId]);
-
- function renderTagList(list) {
- if (list) {
- let array = list.map((item, key) => {
- return (
-
- );
- });
- return array || undefined;
- }
- }
- function submit() {
- validateFields((err, value) => {
- if(err)return;
- if (versionId) {
- let url = `/${owner}/${projectsId}/releases/${versionId}.json`;
- axios
- .put(url, {
- ...value,
- body: desc,
- attachment_ids: fileList
- })
- .then(result => {
- if (result) {
- showNotification("版本修改成功!");
- history.push(`/${owner}/${projectsId}/releases`);
- }
- });
- } else {
- let url = `/${owner}/${projectsId}/releases.json`;
- axios.post(url, {
- ...value,
- body: desc,
- attachment_ids: fileList
- })
- .then(result => {
- if (result) {
- showNotification("版本发布成功!");
- history.push(`/${owner}/${projectsId}/releases`);
- }
- });
- }
- });
- }
-
- const helper = useCallback(
- (label, name, rules, widget, isRequired = true) => (
-
- {label}
-
- {getFieldDecorator(name, { rules, validateFirst: true })(widget)}
-
-
- ),
- []
- );
- // 输入标签名
- function changeAuto(value){
- let l = tagList.filter(item=>item.name.indexOf(value) > -1);
- setOptions(renderTagList(l));
- }
- return (
-
-
-
-
-
标签命名建议
-
- 通常的做法是在版本名称前加上字母 v 前缀, v1.0 或者 v2.3.4。
-
-
- 如果标签不适合在生产环境下使用,请在版本名称后添加预发行版本。例如:v0.2-alpha
- 或者 v5.9-beta.3。
-
-
-
-
语义化版本
-
- 如果你是第一次发布版本,我们强烈建议你阅读语义化版本。
-
-
-
-
附件大小说明
-
- 单个附件不能超过 100M(GVP 项目200M),每个仓库总附件不可超过
- 1G(推荐项目不可超过 5G;GVP 项目不可超过
- 20G)。附件总容量统计包括仓库附件和发行版附件。
-
-
-
-
- );
- }
- )
-);
diff --git a/src/forge/Version/version.css b/src/forge/Version/version.css
deleted file mode 100644
index ddfbe7d6..00000000
--- a/src/forge/Version/version.css
+++ /dev/null
@@ -1,205 +0,0 @@
-.topWrapper {
- padding: 20px 0;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- border-bottom: 1px solid #EEEEEE;
- align-items: center;
-}
-.topWrapper_btn_new {
- background: #fff;
- color: #5091FF!important;
- padding:0px 12px;
- text-align: center;
- height: 32px;
- line-height: 32px;
- border-radius: 4px;
- border:1px solid #5091FF;
-}
-.versionInfo{
- display: flex;
- width: 100%;
-}
-.versionInfo_left{
- display: flex;
- width: 30%;
- padding-top: 20px;
- flex-direction: column;
- align-items: flex-end;
- padding-right: 15px;
-}
-.versionInfo_right{
- flex: 1;
- padding: 20px 0px 20px 15px;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- border-left: 1px solid #eee;
-}
-.versionTag{
- display: inline;
- border-radius: 2px;
- padding:2px 12px;
- font-size: 12px;
- color: #fff;
-}
-.versionTag.yellow{
- background-color: #FBBC06;
-}
-.versionTag.green{
- background-color: #20BA45;
-}
-.versionTag.orange{
- background-color: #F2711D;
-}
-.versionName{
- font-size: 16px;
- color: #333;
- margin-bottom: 10px;
- display: flex;
- align-items: flex-end;
- position: relative;
-}
-.versionName::before{
- position: absolute;
- left: -19px;
- top:8px;
- content: '';
- width: 8px;
- height: 8px;
- background-color: #5091FF;
- border-radius: 50%;
-}
-
-
-.versionmilepostleft{
- padding: 15px;
- margin-right: 50px;
- width: 80%;
- }
-.topWrapper_btn_close {
- background: #504b4b;
- color: #FFFFFF!important;
- padding:0px 12px;
- text-align: center;
- height: 32px;
- line-height: 32px;
- border-radius: 4px;
- }
-
- .topWrapper_btn_delete {
- background: #da1010;
- color: #FFFFFF!important;
- padding:0px 12px;
- text-align: center;
- height: 32px;
- line-height: 32px;
- border-radius: 4px;
- }
-
- .versionrighe{
- flex: 2;
- }
- .versionleft{
- flex: 1;
- text-align: right;
- display: flex;
- justify-content: right;
- }
-
- /* .version_line{
- display: flex;
- height: 30px;
- margin: auto;
- border-left:1px solid #eee;
- } */
- .version_line_one{
- display: flex;
- height: 45px;
- margin: auto;
- border-left:1px solid #eee;
- }
-
- .version_line_tpw{
- display: flex;
- height: 80px;
- margin: auto;
- border-left:1px solid #eee;
- }
-
- .versiondiv{
- display: flex;
- }
- .verwinth{
- width: 80%;
- }
-
- /*开启中 关闭中*/
-.opendversionetail{
- display: inline-block;
- background: #21ba45;
- color: #ffffff!important;
- padding:0px 5px;
- text-align: center;
- height: 25px;
- /*width: 110px;*/
- border-radius: 4px;
- line-height: 25px;
-}
-.closedversionetail{
- display: inline-block;
- background: #e60b0b;
- color: #ffffff!important;
- padding:0px 5px;
- text-align: center;
- height: 25px;
- /*width: 110px;*/
- border-radius: 4px;
- line-height: 25px;
-}
-.versionrectangle {
- width: 8px;
- height: 8px;
- border-radius: 100%;
- margin-top: 15px;
- margin-left: -4px;
- margin-bottom: 10px;
- background: rgb(83, 81, 81);
- }
-.ver-middle{
- vertical-align: middle;
-}
-/* new */
-.versionForm{
- flex:1;
- padding-right: 30px;
- box-sizing: border-box;
-}
-.versionTips{
- width:30%;
- padding-left: 15px;
- box-sizing: border-box;
-}
-.infosTip{
- padding:20px;
- background-color: #F1F8FF;
- margin-bottom: 22px;
- color: #333;
-}
-.versionStyle{
- height: 200px!important;
- border: 1px dashed rgba(80,145,255,1)!important;
-}
-.set-ant-row .ant-row{
- display: flex;
- height: 20px;
- align-items: center;
-}
-.itemInline{
- display: flex;
- align-item: center;
- margin-bottom: 5px;
-}
-.itemInline .ant-row{
- margin-bottom: 0px;
-}
\ No newline at end of file
diff --git a/src/forge/Version/version.js b/src/forge/Version/version.js
deleted file mode 100644
index 5049b31d..00000000
--- a/src/forge/Version/version.js
+++ /dev/null
@@ -1,128 +0,0 @@
-import React, { Component } from "react";
-import { Link } from 'react-router-dom';
-import { Spin } from 'antd';
-import NoneData from '../Nodata';
-import './version.css';
-import axios from 'axios';
-import RenderHtml from '../../components/render-html';
-
-/**
- * issue_chosen:下拉的筛选列表,
- * data:列表接口返回的所有数据,
- * issues:列表数组,
- * isSpin:加载中,
- */
-class version extends Component {
- constructor(props) {
- super(props);
- this.state = {
- issue_chosen: undefined,
- data: undefined,
- releases:undefined,
- issues: undefined,
- isSpin: true,
- search: undefined,
- search_count: undefined,
- }
- }
-
- componentDidMount = () => {
- this.getIssueList();
- }
- // 获取列表数据
- getIssueList = () => {
- const { projectsId, owner } = this.props.match.params;
- const url = `/${owner}/${projectsId}/releases.json`;
- axios.get(url).then((result) => {
- if (result) {
- this.setState({
- data: result.data,
- releases:result.data.releases,
- issues: result.data.issues,
- isSpin: false
- })
- }
- }).catch((error) => {
- console.log(error);
- })
- }
-
- // 显示版本描述
- showBody=(key,flag)=>{
- let { releases } = this.state;
- releases[key].bodyshow = !flag;
- this.setState({
- releases
- })
- }
-
- renderList = (releases) => {
- const { projectsId , owner } = this.props.match.params;
- const { isManager , isDeveloper } = this.props;
- const type = this.props.projectDetail && this.props.projectDetail.type;
-
- if (releases && releases.length > 0) {
- return (
- releases.map((item, key) => {
- return (
-
-
- {item.draft}
- {item.created_at}
-
-
- {item.tag_name}
-
-
-
-
- {item.name}
- {
- (isManager || isDeveloper) && type !==2 &&
- (编辑)
- }
-
-
- this.showBody(key,item.bodyshow)}>
- {item.user_name}:发布了这个版本,并在发布后提交给{item.target_commitish}
-
- {
- item.bodyshow &&
- }
-
-
- TAR
- ZIP
-
-
-
- )
- })
- )
- } else if (releases && releases.length === 0) {
- return (
)
- }
- }
-
- render() {
- const { projectsId ,owner } = this.props.match.params;
- const { data , releases , isSpin } = this.state;
- const type = this.props.projectDetail && this.props.projectDetail.type;
- return (
-
-
- 版本发布
- {
- data && data.user_permission && type !== 2 ?
- + 发布新版
- : ''
- }
-
-
-
{this.renderList(releases)}
-
-
- )
- }
-}
-export default version;
\ No newline at end of file
diff --git a/src/forge/common/util.js b/src/forge/common/util.js
index 4f8f0bf3..1b35ea23 100644
--- a/src/forge/common/util.js
+++ b/src/forge/common/util.js
@@ -6,3 +6,11 @@ export function truncateCommitId(str) {
return str
}
}
+
+// 秒数转2021-9-29 01:01
+export function timeFormat(SecondsStr){
+ const time = new Date(SecondsStr*1000);
+ const hour = time.getHours()<10?"0".concat(time.getHours()):time.getHours();
+ const minutes = time.getMinutes()<10?"0".concat(time.getMinutes()):time.getMinutes();
+ return time.getFullYear()+"-"+(time.getMonth()+1)+"-"+time.getDate()+" "+hour+":"+minutes;
+}
\ No newline at end of file
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss
index d9a5b071..5926c734 100644
--- a/src/forge/css/index.scss
+++ b/src/forge/css/index.scss
@@ -88,14 +88,23 @@ ul,ol,dl{
display: flex;
flex-wrap: wrap;
align-items: center;
+ &>span, & a:link, a:visited{
+ color: #333;
+ }
+ &>span{
+ cursor: default;
+ }
}
.commitDesc{
flex:1;
- margin-left:20px;
- font-size:16px;
- color:#333;
- line-height:26px;
+ line-height:20px;
word-break: break-all;
+ width: 49rem;
+ overflow: hidden;
+ white-space: normal;
+ &:hover{
+ text-decoration: underline;
+ }
}
.normalBox{
@@ -143,7 +152,7 @@ form.ant-form{
}
form{
.ant-row.ant-form-item{
- margin-bottom: 15px;
+ margin-bottom: 20px;
}
}
@media screen and (max-width: 1000px){
@@ -285,4 +294,50 @@ form{
border-bottom: none;
}
}
+}
+.btn-83{
+ width: 83px;
+ height: 32px;
+ line-height: 30px;
+ text-align: center;
+ background: #FAFBFC;
+ border: 1px solid #D0D0D0;
+ display: inline-block;
+ border-radius: 5px;
+ font-weight: 500;
+ color: #333333!important;
+ margin-right: 15px;
+ &:hover{
+ background: #F3F4F6;
+ color: #333333!important;
+ }
+ &:active{
+ background: #D0D0D0;
+ color: #333333!important;
+ }
+}
+.shadow:hover{
+ background: #eeeff1;
+ border-bottom-left-radius: 4px;
+ border-top-left-radius: 4px;
+}
+a.hover:hover{
+ text-decoration: underline;
+}
+button.ant-btn-primary.btnblue{
+ background-color:rgba(70, 106, 255, 1);
+ border-color:rgba(70, 106, 255, 1);
+ &:hover{
+ background-color:rgba(70, 106, 255, 0.85);
+ border-color:rgba(70, 106, 255, 0.85);
+ }
+}
+button.btngrey{
+ background-color:#FFFFFF;
+ border-color:#D0D0D0;
+ color: #666666;
+ &:hover,&:focus{
+ border-color:rgba(153, 153, 153, 0.5);
+ color: #666666;
+ }
}
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
index e58df61f..4c75d804 100644
--- a/src/index.css
+++ b/src/index.css
@@ -30,11 +30,11 @@
.ant-upload-list-item-info .anticon-loading,
.ant-upload-list-item-info .anticon-paper-clip {
- color: #29bd8b !important;
+ color: rgba(102, 102, 102, 1) !important;
}
.anticon anticon-paper-clip {
- color: #29bd8b !important;
+ color: rgba(102, 102, 102, 1) !important;
}
.MuiModal-root-15 {
diff --git a/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
index 4f1e6d81..d6df12c4 100644
--- a/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
+++ b/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
@@ -53,8 +53,6 @@ class CompetitionContentspdfpeopledata extends Component {
let url = `/users/accounts/${id}.json`;
axios.get(url).then((result) => {
if (result.data) {
- console.log("GetuseridApi");
- console.log(result.data);
this.setState({
userdata:result.data
})
diff --git a/src/modules/courses/css/Courses.css b/src/modules/courses/css/Courses.css
index 73d320ed..cf5f1783 100644
--- a/src/modules/courses/css/Courses.css
+++ b/src/modules/courses/css/Courses.css
@@ -938,7 +938,7 @@ body #root {
}
.ant-input:focus {
- border: 1px solid #d9d9d9 !important;
+ border: 1px solid rgba(70, 106, 255, 1) !important;
}
/* 公用的文字按钮:蓝、白、灰 */
@@ -1423,7 +1423,7 @@ samp {
}
.newcourses .ant-select-selection--single:hover {
- border: 1px solid #d9d9d9 !important;
+ border: 1px solid rgba(70, 106, 255, 1) !important;
}
.pd20 {
@@ -1528,9 +1528,6 @@ samp {
display: none;
}
-.exerciselist .ant-input {
- border: 1px solid #d9d9d9 !important;
-}
.exercisetime .ant-form-explain {
margin-left: 107px;
@@ -1689,18 +1686,12 @@ samp {
height: 40px;
}
-.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {
- border: 1px solid #d9d9d9 !important;
-}
.ant-input-affix-wrapper .ant-input-prefix,
.ant-input-affix-wrapper .ant-input-suffix {
background: #fafafa !important;
}
-.ant-input:hover {
- border: 1px solid #d9d9d9 !important;
-}
.ant-input:focus {
box-shadow: none !important;
diff --git a/src/modules/courses/publicNav/nav.css b/src/modules/courses/publicNav/nav.css
index b6d8c7aa..1d6edf78 100644
--- a/src/modules/courses/publicNav/nav.css
+++ b/src/modules/courses/publicNav/nav.css
@@ -11,9 +11,6 @@
.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled){
border:1px solid #d9d9d9!important;
}
-.ant-input:hover{
- border:1px solid #d9d9d9!important;
-}
.ant-input:focus{
box-shadow:none!important;
background-color: #fff!important;
diff --git a/src/modules/tpm/TPMIndex.css b/src/modules/tpm/TPMIndex.css
index 859ddcf9..bdd6d36a 100644
--- a/src/modules/tpm/TPMIndex.css
+++ b/src/modules/tpm/TPMIndex.css
@@ -163,7 +163,6 @@ body>.-task-title {
outline: 0;
-webkit-box-shadow: 0 0 0 2px transparent;
box-shadow: 0 0 0 2px transparent;
- border: 1px solid #d9d9d9;
}
.HeaderSearch .ant-input-search .ant-input::-webkit-input-placeholder {