From 411b4e9de6728e6578c430009c3639c8adb9a744 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 12 Aug 2021 11:45:56 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=BA=93=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E6=95=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/css/edu-common.css | 8 --
public/css/edu-main.css | 4 -
public/css/edu-purge.css | 27 ++---
public/css/iconfont.js | 2 +-
src/college/colleagecss/colleage.css | 2 +-
src/common/UrlTool.js | 17 +++
src/common/educoder.js | 2 +-
src/forge/Branch/Select.jsx | 106 +++---------------
src/forge/Branch/SelectOverlay.jsx | 84 ++++++++++++++
src/forge/Branch/branch.scss | 66 ++++++-----
src/forge/Component/Releases.jsx | 15 +--
src/forge/Main/CoderDepot.jsx | 4 +-
src/forge/Main/CoderDepotCatalogue.jsx | 6 +-
src/forge/Main/CoderDepotReadme.jsx | 21 ++--
src/forge/Main/CoderRootBranch.js | 2 +-
src/forge/Main/CoderRootFileDetail.js | 2 +-
src/forge/Main/Detail.js | 3 +-
src/forge/Main/Index.js | 2 +-
src/forge/Main/Index.scss | 52 ++++-----
src/forge/Main/IndexItem.js | 2 +-
src/forge/Main/{list.css => list.scss} | 84 ++++++++++----
src/forge/Main/sub/DetailBanner.jsx | 7 +-
src/forge/Main/sub/Invite.jsx | 2 +-
src/forge/Main/sub/ReadmeCatelogue.jsx | 57 ++++++++++
src/forge/Main/sub/sub.scss | 46 +++++++-
src/forge/Team/Setting/TeamSettingCommon.jsx | 12 +-
src/forge/css/index.scss | 5 +-
.../tpm/challengesnew/tpm-md-editor.js | 12 +-
28 files changed, 401 insertions(+), 251 deletions(-)
create mode 100644 src/forge/Branch/SelectOverlay.jsx
rename src/forge/Main/{list.css => list.scss} (90%)
create mode 100644 src/forge/Main/sub/ReadmeCatelogue.jsx
diff --git a/public/css/edu-common.css b/public/css/edu-common.css
index 96a8277df..56790f055 100755
--- a/public/css/edu-common.css
+++ b/public/css/edu-common.css
@@ -114,14 +114,6 @@ a:visited {
color: #898989;
}
-a:hover {
- color: #FF7500;
-}
-
-a:hover.fa {
- color: #FF7500;
-}
-
input,
textarea,
select {
diff --git a/public/css/edu-main.css b/public/css/edu-main.css
index 3cbe5fcbb..1d9959033 100644
--- a/public/css/edu-main.css
+++ b/public/css/edu-main.css
@@ -97,10 +97,6 @@ a:visited {
color: #05101a;
}
-a:hover {
- color: #459be5;
-}
-
ol,
ul,
li {
diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css
index 4dfc7bb88..3e3750775 100644
--- a/public/css/edu-purge.css
+++ b/public/css/edu-purge.css
@@ -1363,6 +1363,10 @@ a:visited {
color: #05101a;
}
+a:hover {
+ color: #2A61FF!important;
+}
+
ol,
ul,
li {
@@ -1469,7 +1473,7 @@ a.edu-txt-w80,
/*隐藏*/
.none {
- display: none
+ display: none!important;
}
.block {
@@ -2467,19 +2471,16 @@ a.hoverLine:hover{
a.color-grey-name:hover,
a.color-dark:hover,
a.color-grey-6:hover,
-a.color-grey-3:hover {
- color: #4cacff !important;
-}
-
-a.color-grey-9:hover,
-a.color-grey-8:hover,
-a.color-grey-c:hover {
- color: #111C24 !important;
+a.color-grey-3:hover,a.color-ooo:hover {
+ color: #2A61FF !important;
}
/*蓝色*/
-.color-blue, .color-green-file{
- color: #4CACFF !important;
+.color-blue {
+ color: #2A61FF !important;
+}
+.color-blue-file {
+ color: #0054CC!important;
}
/* 绿色 */
/*主*/
@@ -2487,10 +2488,6 @@ a.color-grey-c:hover {
color: #4CACFF !important;
}
-a.color-blue:hover,
-a.color-blue_4C:hover {
- color: #459BE6 !important;
-}
/*橙色*/
.color-orange {
diff --git a/public/css/iconfont.js b/public/css/iconfont.js
index 2aaace214..e50f44e1a 100644
--- a/public/css/iconfont.js
+++ b/public/css/iconfont.js
@@ -1 +1 @@
-!function(c){var l,a,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},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,m(),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=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},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,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window);
diff --git a/src/college/colleagecss/colleage.css b/src/college/colleagecss/colleage.css
index 9220b8acc..65f32322a 100644
--- a/src/college/colleagecss/colleage.css
+++ b/src/college/colleagecss/colleage.css
@@ -218,7 +218,7 @@ a:hover {
}
.color-blue {
- color: #4CACFF;
+ color: #2A61FF;
}
.color-huang {
diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js
index 07e141ebf..f1800a75d 100644
--- a/src/common/UrlTool.js
+++ b/src/common/UrlTool.js
@@ -18,6 +18,23 @@ export function getImageUrl(path) {
return `${path}`;
}
+export function numFormat(num, digits){
+ let d = digits || 1;
+ var si = [
+ { value: 1, symbol: "" },
+ { value: 1E3, symbol: "k" },
+ { value: 1E4, symbol: "W" }
+ ];
+ var rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
+ var i;
+ for (i = si.length - 1; i > 0; i--) {
+ if (num >= si[i].value) {
+ break;
+ }
+ }
+ return (num / si[i].value).toFixed(d).replace(rx, "$1") + si[i].symbol;
+}
+
export function getImage(path) {
// https://www.educoder.net
// https://testbdweb.trustie.net
diff --git a/src/common/educoder.js b/src/common/educoder.js
index c6eaf176d..1a063d823 100644
--- a/src/common/educoder.js
+++ b/src/common/educoder.js
@@ -3,7 +3,7 @@
// export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil';
export {
- getUploadLogoActionUrl as getUploadLogoActionUrl,
+ getUploadLogoActionUrl as getUploadLogoActionUrl,numFormat as numFormat,
getImageUrl as getImageUrl,getImage as getImage, getmyUrl as getmyUrl, getRandomNumber as getRandomNumber, getUrl as getUrl, publicSearchs as publicSearchs, getRandomcode as getRandomcode, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
, getUploadActionUrl as getUploadActionUrl, getUploadActionUrltwo as getUploadActionUrltwo, getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth
, getTaskUrlById as getTaskUrlById, TEST_HOST, htmlEncode as htmlEncode, getupload_git_file as getupload_git_file, getcdnImageUrl as getcdnImageUrl
diff --git a/src/forge/Branch/Select.jsx b/src/forge/Branch/Select.jsx
index fedd288c1..a44584c4a 100644
--- a/src/forge/Branch/Select.jsx
+++ b/src/forge/Branch/Select.jsx
@@ -1,116 +1,36 @@
import React , { useState , useEffect } from 'react';
-import { Popover , Input , Spin } from 'antd';
+import { Popover , Dropdown , Input , Spin } from 'antd';
import './branch.scss';
import { getBranch , getTag } from '../GetData/getData';
+import SelectOverlay from './SelectOverlay';
export default (({ projectsId , branch , owner , changeBranch , branchList , tagflag = true })=>{
const [ showValue , setShowValue ] = useState(branch);
- const [ inputValue , setInputValue] = useState(undefined);
- const [ nav , setNav ] = useState(0);
- const [ isSpin , setIsSpin ] = useState(true);
- const [ flag , setFlag ] = useState(false);
-
- const [ data , setData ] = useState(undefined);
- const [ datas , setDatas ] = useState(undefined);
useEffect(()=>{
setShowValue(branch);
},[branch])
- useEffect(()=>{
- document.body.addEventListener('click', e => {
- let name = e.target.className;
- let turn = name === "ant-input OptionsInput" || name === "navli active"|| name === "navli" || name === "padding10 bor-bottom-greyE";
- if(turn){
- return;
- }else{
- setFlag(false);
- }
- })
- })
-
- useEffect(()=>{
- if(branchList){
- setData(branchList);
- setDatas(branchList);
- setIsSpin(false);
- }
- },[branchList])
-
-
- async function getBranchs(id,owner){
- let result = await getBranch(id,owner);
- setData(result);
- setDatas(result);
- setIsSpin(false);
- }
- async function getTags(id,owner){
- let result = await getTag(id,owner);
- setData(result);
- setDatas(result);
- setIsSpin(false);
- }
-
- function changeInputValue(e){
- setInputValue(e.target.value);
- let filter = e.target.value ? data && data.length>0 && data.filter(item=>item.name.indexOf(e.target.value)>-1) : data;
- setDatas(filter);
- }
-
- function changeNav(nav){
- setNav(nav);
- setIsSpin(true);
- if(nav === 0){
- getBranchs(projectsId,owner);
- }else{
- getTags(projectsId,owner);
- }
- }
- function chooseitem(value){
- // setShowValue(value);
- changeBranch(value);
- }
-
-
const menu = (
-
-
-
-
- - changeNav(0)}>分支列表
- { tagflag && - changeNav(1)}>标签列表
}
-
-
-
-
-
-
+
);
return(
- setFlag(!flag)} overlayClassName="branch-tagBox-list">
+
-
+
)
})
\ No newline at end of file
diff --git a/src/forge/Branch/SelectOverlay.jsx b/src/forge/Branch/SelectOverlay.jsx
new file mode 100644
index 000000000..d536d1c99
--- /dev/null
+++ b/src/forge/Branch/SelectOverlay.jsx
@@ -0,0 +1,84 @@
+import React , { useState , useEffect } from 'react';
+import { Input , Spin , Menu } from 'antd';
+import { getBranch , getTag } from '../GetData/getData';
+
+function SelectOverlay({ changeBranch , tagflag , branchList , projectsId , owner }) {
+ const [ inputValue , setInputValue] = useState(undefined);
+ const [ nav , setNav ] = useState(0);
+ const [ isSpin , setIsSpin ] = useState(true);
+
+ const [ data , setData ] = useState(undefined);
+ const [ datas , setDatas ] = useState(undefined);
+ const [ keys ,setKeys] = useState("branch");
+
+ useEffect(()=>{
+ if(branchList){
+ setData(branchList);
+ setDatas(branchList);
+ setIsSpin(false);
+ }
+ },[branchList])
+
+ async function getBranchs(id,owner){
+ let result = await getBranch(id,owner);
+ setData(result);
+ setDatas(result);
+ setIsSpin(false);
+ }
+ async function getTags(id,owner){
+ let result = await getTag(id,owner);
+ setData(result);
+ setDatas(result);
+ setIsSpin(false);
+ }
+ function chooseitem(value){
+ changeBranch(value);
+ }
+ function changeInputValue(e){
+ setInputValue(e.target.value);
+ let filter = e.target.value ? data && data.length>0 && data.filter(item=>item.name.indexOf(e.target.value)>-1) : data;
+ setDatas(filter);
+ }
+
+ function changeNav(e){
+ setKeys(e.key);
+ setIsSpin(true);
+ if(e.key === "branch"){
+ getBranchs(projectsId,owner);
+ }else{
+ getTags(projectsId,owner);
+ }
+ }
+
+ return(
+
+
+ }
+ placeholder="请输入分支或标签名称搜索"
+ autocomplete="off" className="OptionsInput"
+ value={inputValue}
+ onChange={changeInputValue}
+ />
+
+
+
+
+
+
+ )
+}
+export default SelectOverlay;
\ No newline at end of file
diff --git a/src/forge/Branch/branch.scss b/src/forge/Branch/branch.scss
index 0c7e136a8..dd9c7b14e 100644
--- a/src/forge/Branch/branch.scss
+++ b/src/forge/Branch/branch.scss
@@ -27,10 +27,11 @@
overflow-y: auto;
}
.OptionsUl li{
- height: 35px;
- line-height: 35px;
+ height: 30px;
+ line-height: 30px;
cursor: pointer;
- padding:0px 10px;
+ padding:0px 20px;
+ margin:5px 0px;
}
.OptionsUl li:hover{
background-color: #F0F0F0;
@@ -45,38 +46,49 @@
width: 100%;
}
.branch-tagBox{
- border:1px solid #eee;
+ border:1px solid #D0D0D0;
border-radius: 3px;
height: 40px;
display: flex;
align-items: center;
cursor: pointer;
- min-width: 140px;
+ min-width: 104px;
}
-.branch-tagBox-list .ant-popover-arrow{
- display: none;
+.branch-tagBox:hover{
+ background-color: #F3F4F6;
}
-.branch-tagBox-list.ant-popover.ant-popover-placement-bottom{
- padding-top:0px;
+.branch-tagBox-list{
+ background: #FFFFFF;
+ box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
+ border-radius: 4px;
+ .ant-popover-arrow{
+ display: none;
+ }
+ &.ant-popover.ant-popover-placement-bottom{
+ padding-top:0px;
+ }
+ .branch-tagBox .ant-dropdown-link{
+ display: block;
+ flex:1;
+ max-width: 105px;
+ }
+ .ant-popover-inner-content{
+ padding:0px;
+ }
}
-.branch-tagBox .ant-dropdown-link{
- display: block;
- flex:1;
-}
-.branch-tagBox-list .ant-popover-inner-content{
- padding:0px;
-}
-.navUl{
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 5px;
-}
-.navUl li{
- cursor: pointer;
-}
-.navUl li.active{
- color:#5091FF;
+.overlayBranch{
+ width: 325px;
+ .navUl{
+ margin-top: 8px;
+ height: 30px;
+ line-height: 30px;
+ li{
+ height: 30px;
+ line-height: 30px;
+ padding:0px 5px;
+ margin-left: 20px!important;
+ }
+ }
}
.listTips{
padding:20px 0px;
diff --git a/src/forge/Component/Releases.jsx b/src/forge/Component/Releases.jsx
index bf8caebd4..ae7948067 100644
--- a/src/forge/Component/Releases.jsx
+++ b/src/forge/Component/Releases.jsx
@@ -7,14 +7,12 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}
return(
- 发行版
+ 发行版
{ releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}}
- { (releaseVersions && releaseVersions.total_count > 0) || projectType ===2 ?
- 全部
- :
- baseOperate && 新建
- }
+ {/* {
+ baseOperate && projectType !==2 && 新建
+ } */}
{
releaseVersions && releaseVersions.total_count>0 ?
@@ -32,7 +30,10 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType}
)
})
- :""
+ :
+
+ 您暂未发布任何版本{baseOperate && projectType !==2 && 创建新版本}
+
}
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx
index e2dbc49d1..6769528a6 100644
--- a/src/forge/Main/CoderDepot.jsx
+++ b/src/forge/Main/CoderDepot.jsx
@@ -378,7 +378,7 @@ function CoderDepot(props){
}
{ fileOperate &&
-
+
}
@@ -492,7 +492,7 @@ function CoderDepot(props){
inviteCode &&
}
{
diff --git a/src/forge/Main/CoderDepotCatalogue.jsx b/src/forge/Main/CoderDepotCatalogue.jsx
index 3aa5ccc82..ad2847693 100644
--- a/src/forge/Main/CoderDepotCatalogue.jsx
+++ b/src/forge/Main/CoderDepotCatalogue.jsx
@@ -4,8 +4,8 @@ import { truncateCommitId } from '../common/util';
const typeIco = {
"submodule":"icon-file-submodule font-17",
- "file":'icon-wenjia font-15',
- "dir":"icon-wenjianjia1 font-15"
+ "file":'icon-wenjian5 font-15',
+ "dir":"icon-wenjianjia3 font-15"
}
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
@@ -13,7 +13,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}>
- {item.name}
+ {item.name}
diff --git a/src/forge/Main/CoderDepotReadme.jsx b/src/forge/Main/CoderDepotReadme.jsx
index 1c54663d4..526e28d59 100644
--- a/src/forge/Main/CoderDepotReadme.jsx
+++ b/src/forge/Main/CoderDepotReadme.jsx
@@ -3,6 +3,8 @@ import RenderHtml from '../../components/render-html';
import { AlignCenter } from '../Component/layout';
import { Dropdown , Menu , Spin } from 'antd';
import { Link } from 'react-router-dom';
+
+import ReadmeCatelogue from './sub/ReadmeCatelogue';
const $ = window.$;
function CoderDepotReadme({ operate , history , readme , ChangeFile }){
@@ -23,34 +25,25 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
const anchor = el.id;
const level = el.tagName.replace("H", "");
const href = `#${anchor}`;
- return { href:`${path}${href}`,text:el.textContent , level:level }
+ return { href:`${href}`,text:el.textContent , level:level }
});
setMenuList(items);
},[content])
function menu(){
if(menuList && menuList.length > 0){
- let hash = history.location.hash;
return(
-
+
)
}else{
return
}
}
return(
-
+
-
+
目录
@@ -61,7 +54,7 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
{
operate ?
ChangeFile(readme && readme.path, false)}>
-
+
:""
}
diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js
index 3f71d6920..4982414a2 100644
--- a/src/forge/Main/CoderRootBranch.js
+++ b/src/forge/Main/CoderRootBranch.js
@@ -4,7 +4,7 @@ import { Dropdown , Menu , Icon , Tooltip , Spin } from 'antd';
import { truncateCommitId } from '../common/util';
import { getBranch } from '../GetData/getData';
import Nodata from '../Nodata';
-import './list.css';
+import './list.scss';
function turnbar(str){
if(str && str.length>0 && str.indexOf("/")>-1){
diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js
index fb17098bc..d5a9670c6 100644
--- a/src/forge/Main/CoderRootFileDetail.js
+++ b/src/forge/Main/CoderRootFileDetail.js
@@ -1,6 +1,6 @@
import React, { Component } from "react";
import { Popconfirm , Select } from "antd";
-import "./list.css";
+import "./list.scss";
import axios from "axios";
import Meditor from "../Newfile/m_editor";
import RenderHtml from "../../components/render-html";
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index b3262f880..0ddc57067 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -3,8 +3,9 @@ import { Spin, Tooltip, Button } from 'antd';
import { Link, Route, Switch } from 'react-router-dom';
import { Content, AlignTop } from '../Component/layout';
import DetailBanner from './sub/DetailBanner';
+import { numFormat } from 'educoder';
import '../css/index.scss'
-import './list.css';
+import './list.scss';
import Loadable from 'react-loadable';
import Loading from '../../Loading';
diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js
index a08c3d3bc..afe108172 100644
--- a/src/forge/Main/Index.js
+++ b/src/forge/Main/Index.js
@@ -5,7 +5,7 @@ import { getImageUrl } from 'educoder';
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import '../css/index.scss'
-import './list.css';
+import './list.scss';
import './Index.scss';
import ListItem from './IndexItem'
import axios from 'axios';
diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss
index cb05f1cf2..c97185e75 100644
--- a/src/forge/Main/Index.scss
+++ b/src/forge/Main/Index.scss
@@ -129,13 +129,14 @@
}
.infoCount{
display: inline-block;
- padding:0px 5px;
- height: 16px;
- line-height: 16px;
- background-color: #eee;
- color:#999;
+ width: 24px;
+ text-align: center;
+ height: 24px;
+ line-height: 24px;
+ background-color:rgba(153, 153, 153, 0.13);;
+ color:#666;
border-radius: 12px;
- margin-left: 10px;
+ margin-left: 6px;
font-size: 12px;
}
.attrPerson{
@@ -195,16 +196,14 @@
}
.listtable{
margin-top: 20px;
- border:1px solid #d9d9d9;
- border-radius: 4px;
.listtablehead{
display: flex;
justify-content: space-between;
align-items: flex-start;
border-bottom: 1px solid #d9d9d9;
- padding:7px 20px;
+ padding:13px 20px;
border-radius: 4px 4px 0px 0px;
- background-color: #FAFBFC;
+ border: 1px solid rgba(42, 97, 255, 0.23);
.ellipsistxt{
margin-top: 6px;
#ptxt{
@@ -239,20 +238,25 @@
margin-left: 8px;
cursor: pointer;
border-radius: 2px;
- background-color: #c1c1c1;
+ height: 16px;
+ background: rgba(153, 153, 153, 0.2);
+ border-radius: 2px;
padding:0px 4px;
height: 14px;
line-height: 14px;
margin-top: 9px;
i{
font-size: 15px!important;
- color: #fff;
+ color: #333;
height: 14px;
line-height: 14px;
}
}
}
.listtablebody{
+ border-radius:0px 0px 4px 4px ;
+ border: 1px solid #D0D0D0;
+ border-top: none;
li.listtablepath{
a{color: #40a9ff;}
p{
@@ -260,12 +264,15 @@
}
}
& > li{
- height: 42px;
+ height: 44px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #d9d9d9;
padding:0px 20px 0px 24px;
+ &:hover{
+ background-color: #F3F4F6;
+ }
& > span:first-child{
width: 30%;
overflow: hidden;
@@ -327,25 +334,6 @@
}
}
-.menuslist{
- max-height: 200px;
- overflow-y: auto;
- padding:10px 15px;
- border-radius: 4px;
- .ant-dropdown-menu-item{
- border-radius: 8px;
- text-align: left!important;
- a{
- width: 350px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- .ant-dropdown-menu-item.active{
- background-color: #e6f7ff;
- }
-}
.catelogue{
border:1px solid rgb(211, 211, 211);
font-size: 15px;
diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js
index 2265ac20d..d2b2c0975 100644
--- a/src/forge/Main/IndexItem.js
+++ b/src/forge/Main/IndexItem.js
@@ -5,7 +5,7 @@ import { AlignCenter } from '../Component/layout';
import { Link } from 'react-router-dom';
import '../css/index.scss';
import Nodata from '../Nodata';
-import './list.css';
+import './list.scss';
import img_parise from '../Images/parise.png';
class IndexItem extends Component {
diff --git a/src/forge/Main/list.css b/src/forge/Main/list.scss
similarity index 90%
rename from src/forge/Main/list.css
rename to src/forge/Main/list.scss
index 43df25ca3..5eaa7992b 100644
--- a/src/forge/Main/list.css
+++ b/src/forge/Main/list.scss
@@ -218,9 +218,9 @@
}
/* -----------详情------------ */
.detailHeader-wrapper{
- background-color:#FAFBFC;
- /* background: url(../Images/forgeBanner.jpg) no-repeat center; */
- /* background-size:cover; */
+ background-color:#FBFCFF;
+ border-bottom:1px solid #e2e2e2;
+ /* box-shadow: 0px 2px 11px 0px#D0D0D0; */
}
.headerMenu-wrapper{
font-size: 16px;
@@ -232,7 +232,7 @@
text-align: center;
height: 40px;
line-height: 28px;
- margin-right: 40px;
+ padding:0px 20px;
}
.headerMenu-wrapper li a{
color: #666;
@@ -241,34 +241,44 @@
margin-right: 8px;
}
.headerMenu-wrapper li a > span.num{
- height: 28px;
- line-height: 29px;
- margin-left: 8px;
+ line-height: 24px;
+ margin-left: 5px;
+ margin-top: 2px;
font-size: 12px;
- color: #2878FF;
float: right;
+ color: #666!important;
+ background-color: rgba(153, 153, 153, 0.13);;
+ border-radius: 50%;
+ width: 24px;
+ height: 24px;
+}
+.headerMenu-wrapper li.active a,.headerMenu-wrapper li.active a i{
+ color: #2A61FF!important;
}
.headerMenu-wrapper li.active::after{
position: absolute;
bottom:0px;
height:2px;
- background-color: #5091FF;
+ background-color: #2A61FF;
content:'';
left: 0px;
width:100%;
}
.detail_tag_btn{
- height:26px;
- line-height: 26px;
+ height:34px;
+ line-height: 32px;
border-radius:5px;
- border:1px solid #f1f1f1;
+ border:1px solid #D0D0D0;
display: flex;
align-items: center;
margin-left: 30px;
padding:0px;
- background-color: transparent;
+ background-color:#FAFBFC;
box-shadow: none;
}
+.detail_tag_btn:hover{
+ background-color: #F3F4F6;
+}
.ant-tooltip {
max-width: fit-content!important;
}
@@ -280,11 +290,12 @@
margin-right: 10px;
}
.detail_tag_btn_count{
- padding:0px 10px;
+ width: 42px;
+ text-align: center;
background: #fff;
border-radius: 0px 4px 4px 0px;
- font-size: 12px;
height:100%;
+ border-left: 1px solid #D0D0D0;
}
.files-md{
padding:20px;
@@ -499,7 +510,7 @@
}
.addFile a{
display: block;
- background-color: rgb(76, 172, 255,0.8);
+ background-color: rgba(76, 172, 255,0.8);
color: #fff;
cursor: pointer;
height: 32px;
@@ -514,7 +525,7 @@
border-left: 1px solid rgba(247, 247, 247, 0.3);
}
.addFile a:active{
- background-color: rgb(76, 172, 255,1);
+ background-color: rgba(76, 172, 255,1);
}
@@ -567,14 +578,28 @@
border-bottom: 1px solid #d9d9d9;
border-radius: 4px 4px 0px 0px;
}
+.readBox{
+ border:none;
+ &.commonBox .commonBox-info{
+ border:1px solid #D0D0D0;
+ border-top: none;
+ border-radius: 0px 0px 4px 4px;
+ padding:20px 38px;
+ }
+}
.commonBox .commonBox-title.boxTitle{
display: flex;
justify-content: space-between;
+ height: 65px;
+ line-height: 65px;
+ background: #FAFCFF;
+ border-radius: 4px 4px 0px 0px;
+ border: 1px solid rgba(42, 97, 255, 0.23);
}
.synchronism{
display: block;
- height: 26px;
- line-height: 26px;
+ height: 34px;
+ line-height: 34px;
padding:0px 15px;
color: #fff!important;
background-color: #28BD6C;
@@ -583,10 +608,16 @@
.files_info{
cursor: pointer;
}
-.commonBox .commonBox-info{
- padding:20px 15px;
+.commonBox {
+ .commonBox-info{
+ padding:20px 15px;
+ }
+}
+.commonBox-title-read{
+ vertical-align: middle;
+ color: #666;
+ font-size: 14px;
}
-.commonBox-title-read{vertical-align: middle;color: #666;}
@media screen and (max-width: 370px){
.p-r-tags,.p-r-btn{
@@ -732,4 +763,13 @@ a.color-grey-ccc:hover{
text-align: center;
display: flex;
justify-content: center;
+}
+.depotNum{
+ color: #666!important;
+ span:last-child{
+ color: #333;
+ }
+ &:hover span:last-child{
+ color: #2A61FF;
+ }
}
\ No newline at end of file
diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx
index abce4003a..cdfd253d7 100644
--- a/src/forge/Main/sub/DetailBanner.jsx
+++ b/src/forge/Main/sub/DetailBanner.jsx
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react';
import { Skeleton , Tooltip} from 'antd';
import { Link } from 'react-router-dom';
+import { numFormat } from 'educoder';
function DetailBanner({ history,list , owner , projectsId , isManager , url , pathname , state , urlFlag , projectDetail , platform ,open_devops }){
const [ menuName , setMenuName ] = useState(undefined);
@@ -50,7 +51,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
易修
- {projectDetail && projectDetail.issues_count ? {projectDetail.issues_count} : ""}
+ {projectDetail && projectDetail.issues_count ? {numFormat(projectDetail.issues_count)} : ""}
@@ -61,7 +62,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
合并请求
- {projectDetail && projectDetail.pull_requests_count ? {projectDetail.pull_requests_count} : ""}
+ {projectDetail && projectDetail.pull_requests_count ? {numFormat(projectDetail.pull_requests_count)} : ""}
:""
}
@@ -101,7 +102,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
里程碑
- {projectDetail && projectDetail.versions_count ? {projectDetail.versions_count} :""}
+ {projectDetail && projectDetail.versions_count ? {numFormat(projectDetail.versions_count)} :""}
}
diff --git a/src/forge/Main/sub/Invite.jsx b/src/forge/Main/sub/Invite.jsx
index 61fb40cfc..201cee6dd 100644
--- a/src/forge/Main/sub/Invite.jsx
+++ b/src/forge/Main/sub/Invite.jsx
@@ -6,7 +6,7 @@ function Invite({code,className}) {
return(
-
邀请码
+
邀请码
可以通过邀请码邀请成员加入项目
点击复制邀请码。} className="ml8 font-16" inputId="devitecode"/>
diff --git a/src/forge/Main/sub/ReadmeCatelogue.jsx b/src/forge/Main/sub/ReadmeCatelogue.jsx
new file mode 100644
index 000000000..64eb90bab
--- /dev/null
+++ b/src/forge/Main/sub/ReadmeCatelogue.jsx
@@ -0,0 +1,57 @@
+import React , {useState } from 'react';
+import { Anchor , Input } from 'antd';
+import './sub.scss';
+
+const { Link } = Anchor;
+const { Search } = Input;
+
+function ReadmeCatelogue({ menuList }) {
+ const [ goHref , setGoHref ] = useState("");
+ const [ value , setValue ] = useState("");
+ const [ menu , setMenu] = useState(menuList);
+
+
+ function onChange(link){
+ setGoHref(link);
+ };
+
+ function changeValue(e) {
+ setValue(e.target.value);
+ if(e.target.value){
+ let m = menu.filter(i=>i.text.indexOf(e.target.value)>-1);
+ setMenu(m);
+ }else{
+ setMenu(menuList);
+ }
+ }
+ return(
+
+
+ }/>
+
+ {
+ menu && menu.length>0?
+
+
+ {
+ menu.map((item,key)=>{
+ return(
+
+
+
+ )
+ })
+ }
+
+
+ :""
+ }
+
+
+ )
+}
+export default ReadmeCatelogue;
\ No newline at end of file
diff --git a/src/forge/Main/sub/sub.scss b/src/forge/Main/sub/sub.scss
index aa8739710..d4db6208c 100644
--- a/src/forge/Main/sub/sub.scss
+++ b/src/forge/Main/sub/sub.scss
@@ -24,7 +24,47 @@
}
}
-.detailsCode{
- display: flex;
- justify-content: space-between;
+.menuslist{
+ z-index: 100;
+ width: 297px;
+ background: #FFFFFF;
+ box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
+ border-radius: 4px;
+ .searchBox{
+ padding:15px;
+ border-bottom: 1px solid #eee;
+ }
+ .anchorBox{
+ max-height: 255px;
+ overflow-y: auto;
+ }
+ .ant-anchor-wrapper{
+ margin-left: 0px;
+ padding:5px 15px;
+ .items{
+ border-radius: 4px;
+ margin-bottom: 5px;
+ cursor: pointer;
+ .ant-anchor-link-title{
+ color: #333333!important;
+ }
+ &:hover{
+ background-color: #F3F4F6;
+ }
+ &.active{
+ background-color: #2A61FF;
+ .ant-anchor-link-title{
+ color: #fff!important;
+ }
+ }
+ }
+ .ant-anchor-link{
+ padding:0px;
+ height: 30px;
+ line-height: 30px;
+ }
+ .ant-anchor-ink::before{
+ background-color: #fff;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/forge/Team/Setting/TeamSettingCommon.jsx b/src/forge/Team/Setting/TeamSettingCommon.jsx
index 5bab8f53f..499a00c20 100644
--- a/src/forge/Team/Setting/TeamSettingCommon.jsx
+++ b/src/forge/Team/Setting/TeamSettingCommon.jsx
@@ -1,5 +1,5 @@
import React, { forwardRef , useCallback , useEffect, useState } from 'react';
-import { Form , Input , Radio ,Checkbox , Divider , Button } from 'antd';
+import { Form , Input , Radio ,Checkbox , Divider , Button , InputNumber } from 'antd';
import { WhiteBack , FlexAJ } from '../../Component/layout';
import Title from '../../Component/Title';
import styled from 'styled-components';
@@ -31,7 +31,8 @@ export default Form.create()(
useEffect(()=>{
if(organizeDetail){
setFieldsValue({
- ...organizeDetail
+ ...organizeDetail,
+ max_repo_creation:organizeDetail.max_repo_creation===-1 ? "":organizeDetail.max_repo_creation
})
setImage(organizeDetail.avatar_url);
setDescNum(organizeDetail.description ? organizeDetail.description.length : 0);
@@ -39,10 +40,10 @@ export default Form.create()(
},[organizeDetail])
const helper = useCallback(
- (label, name, rules, widget , isRequired , flag ) => (
+ (label, name, rules, widget , isRequired , flag , help ) => (
{label}
-
+
{getFieldDecorator(name, { rules, validateFirst: true , valuePropName:flag ? "checked":"value" })(widget)}
@@ -175,7 +176,8 @@ export default Form.create()(
'最大仓库数:',
"max_repo_creation",
[],
-
+ ,false,false,
+ "当输入栏为空时,默认数量无限制"
)}
选择头像:
diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss
index 00e46b6f8..0264c73ce 100644
--- a/src/forge/css/index.scss
+++ b/src/forge/css/index.scss
@@ -11,7 +11,10 @@ ul,ol,dl{
font-size: 22px;
font-weight: normal;
line-height: 30px;
- max-width: 850px;
+ max-width: 700px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
.projectN{
word-break: break-all;
}
diff --git a/src/modules/tpm/challengesnew/tpm-md-editor.js b/src/modules/tpm/challengesnew/tpm-md-editor.js
index ad25fa9c4..01a9a3759 100644
--- a/src/modules/tpm/challengesnew/tpm-md-editor.js
+++ b/src/modules/tpm/challengesnew/tpm-md-editor.js
@@ -8,7 +8,7 @@ import './css/TPMchallengesnew.css';
import 'codemirror/lib/codemirror.css';
const $ = window.$
-const mdIcons = ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear"];
+const mdIcons = ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear","fullScreen"];
const NULL_CH = '▁';
@@ -134,6 +134,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
},
toolbarIconsClass: {
"line-break": "fa-minus",
+ "fullScreen":"iconfont icon-fangdaicon font-14"
},
toolbarCustomIcons: {
"inline-latex": "",
@@ -150,6 +151,10 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
}
cm.replaceSelection(NULL_CH)
},
+ "fullScreen":function(cm,icon,cursor,selection){
+ icon.addClass("none");
+ console.log(cm,icon)
+ },
"inline-latex": function (cm, icon, cursor, selection) {
cm.replaceSelection("$$" + selection + "$$");
cm.setCursor(cursor.line, cursor.ch + 2);
@@ -164,7 +169,8 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
lang: {
toolbar: {
"latex": "多行公式",
- "line-break": "换行"
+ "line-break": "换行",
+ "fullScreen":"开启全屏"
}
},
onload: function () {
@@ -229,7 +235,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
if (resizeBarEl.current) {
let el = resizeBarEl.current
let dragging = false
- let startY = 0
+ let startY = 0
function onMouseDown(e) {
dragging = true
startY = e.pageY