diff --git a/package-lock.json b/package-lock.json index 628e5a3b0..a032840a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3425,9 +3425,9 @@ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" }, "clipboard": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz", - "integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", + "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", "requires": { "good-listener": "^1.2.2", "select": "^1.1.2", @@ -7240,8 +7240,7 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "optional": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "aproba": { "version": "1.2.0", @@ -7262,14 +7261,12 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "optional": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7284,20 +7281,17 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "optional": true + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "optional": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "optional": true + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, "core-util-is": { "version": "1.0.2", @@ -7414,8 +7408,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "optional": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.5", @@ -7427,7 +7420,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7442,7 +7434,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7450,14 +7441,12 @@ "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "optional": true + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7476,7 +7465,6 @@ "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", - "optional": true, "requires": { "minimist": "^1.2.5" } @@ -7538,8 +7526,7 @@ "npm-normalize-package-bin": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "optional": true + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" }, "npm-packlist": { "version": "1.4.8", @@ -7567,8 +7554,7 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "optional": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "object-assign": { "version": "4.1.1", @@ -7580,7 +7566,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "optional": true, "requires": { "wrappy": "1" } @@ -7658,8 +7643,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "optional": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safer-buffer": { "version": "2.1.2", @@ -7695,7 +7679,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7715,7 +7698,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7759,14 +7741,12 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "optional": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "optional": true + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } }, diff --git a/package.json b/package.json index a78351cba..b2edcb1bb 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "case-sensitive-paths-webpack-plugin": "2.1.1", "chalk": "1.1.3", "classnames": "^2.2.5", - "clipboard": "^2.0.6", + "clipboard": "^2.0.8", "code-prettify": "^0.1.0", "codemirror": "^5.53.0", "connected-react-router": "4.4.1", diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index a3a86a8ee..de4566ebf 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -2474,7 +2474,7 @@ a:hover{ .color-grey-B3 { color: #B3B3B3 !important; } -` + .color-grey-B4 { color: #B4B4B4 !important; } diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 1b6e09a20..e3577f72d 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=1631692103587') format('woff2'), - url('iconfont.woff?t=1631692103587') format('woff'), - url('iconfont.ttf?t=1631692103587') format('truetype'); + src: url('iconfont.woff2?t=1632447048516') format('woff2'), + url('iconfont.woff?t=1632447048516') format('woff'), + url('iconfont.ttf?t=1632447048516') format('truetype'); } .iconfont { @@ -13,6 +13,18 @@ -moz-osx-font-smoothing: grayscale; } +.icon-wenjianicon:before { + content: "\e8dc"; +} + +.icon-a-yuanquan2x:before { + content: "\e8db"; +} + +.icon-xiangmubiaoqian:before { + content: "\e8da"; +} + .icon-icon:before { content: "\e8ce"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index fdaa5e328..a7af1d301 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -!function(c){var a,l,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,a){a.parentNode.insertBefore(c,a)};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()}a=function(){var c,a;(a=document.createElement("div")).innerHTML=z,z=null,(c=a.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",a=c,(c=document.body).firstChild?p(a,c.firstChild):c.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(l=function(){document.removeEventListener("DOMContentLoaded",l,!1),a()},document.addEventListener("DOMContentLoaded",l,!1)):document.attachEvent&&(h=a,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); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index eb088c35c..a7123711a 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,27 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "24567893", + "name": "文件icon", + "font_class": "wenjianicon", + "unicode": "e8dc", + "unicode_decimal": 59612 + }, + { + "icon_id": "24527422", + "name": "圆圈@2x", + "font_class": "a-yuanquan2x", + "unicode": "e8db", + "unicode_decimal": 59611 + }, + { + "icon_id": "24378423", + "name": "项目标签", + "font_class": "xiangmubiaoqian", + "unicode": "e8da", + "unicode_decimal": 59610 + }, { "icon_id": "24368060", "name": "icon", diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index d77665009..c7d91d7b4 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 a9ab654fb..006a519e5 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 4f43fc559..d846ded10 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/forge/Component/User.jsx b/src/forge/Component/User.jsx index bc652dcfb..3066518b8 100644 --- a/src/forge/Component/User.jsx +++ b/src/forge/Component/User.jsx @@ -15,6 +15,7 @@ export default ({ url , name , column , id , login })=>{ ${!column && ` & span{ margin-left:8px; + font-weight: bold; }` } `; diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index be568ca9f..69cd7a2e4 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -190,6 +190,7 @@ function CoderDepot(props){ setLastCommit(c && c.commit); setLastCommitAuthor(c && c.committer); setMainFlag(false); + setReadOnly(true); setReadOnly(!editReadme); setHide(true); } diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js index a715fe74e..6c9b03273 100644 --- a/src/forge/Main/CoderRootCommit.js +++ b/src/forge/Main/CoderRootCommit.js @@ -1,13 +1,17 @@ import React , { Component } from 'react'; -import { Spin , Pagination } from 'antd'; +import { Spin , Pagination, Timeline } from 'antd'; import { getImageUrl } from 'educoder'; import { truncateCommitId } from '../common/util'; import { AlignTop } from '../Component/layout'; import SelectBranch from '../Branch/Select'; import Nodata from '../Nodata'; +import Tree from './img/tree.png'; import axios from 'axios'; import {Link} from "react-router-dom"; +import CopyTool from '../Component/CopyTool'; + +import './tree/Index.scss' function returnbar(str){ if(str && str.length>0 && str.indexOf("%2F")>-1){ @@ -15,13 +19,14 @@ function returnbar(str){ } return str; } +//代码库--提交页面 class CoderRootCommit extends Component{ constructor(props){ super(props) this.state={ commitDatas:undefined, dataCount:undefined, - limit:20, + limit:10, page:1, isSpining:false, branchList:undefined @@ -63,7 +68,6 @@ class CoderRootCommit extends Component{ this.setState({ isSpining:true }) - console.log(returnbar(branch)); const { projectsId , owner } = this.props.match.params; const url = `/${owner}/${projectsId}/commits.json`; axios.get(url,{ @@ -107,6 +111,9 @@ class CoderRootCommit extends Component{ ChangePage=(page)=>{ const { branchName } = this.props.match.params; const { limit } = this.state; + this.setState({ + page: page + }) this.getCommitList(branchName , page , limit); } render(){ @@ -129,42 +136,50 @@ class CoderRootCommit extends Component{ > -
-
-
- {dataCount}次提交代码({branch}) -
-
-
- { - commitDatas && commitDatas.length > 0 && commitDatas.map((item,k)=>{ - return( -
- - {truncateCommitId(`${item.sha}`)} - {item.message} - -

- { - item.id ? - - {item.image_url?:""} - - : - - {item.image_url?:""} - - - } - -

+ + { + commitDatas && commitDatas.length > 0 && commitDatas.map((item,k)=>{ + return( + 最新:}> +
+
+ + {item.message} + +

+ { + item.id ? + + {item.image_url?:""} + + : + + {item.image_url?:""} + + + } +

+
+
+
+
+ + sha + {truncateCommitId(`${item.sha}`)} + + + +
+ +
+
- ) - }) - } - {commitDatas && commitDatas.length === 0 && } -
-
+ + ) + }) + } + {commitDatas && commitDatas.length === 0 && } + { dataCount > limit ?
diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js index b5d241968..b740ca7e2 100644 --- a/src/forge/Main/CoderRootIndex.js +++ b/src/forge/Main/CoderRootIndex.js @@ -108,7 +108,7 @@ class CoderRootIndex extends Component{ () => () } > - () } diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx index 0daa63193..192b80e3c 100644 --- a/src/forge/Main/Diff.jsx +++ b/src/forge/Main/Diff.jsx @@ -5,24 +5,42 @@ import { truncateCommitId } from '../common/util'; import { getImageUrl } from 'educoder'; import Files from '../Merge/Files'; +import Tree from "./img/tree.png"; import User from "../Component/User"; -import Keys from "../Component/Keys"; import axios from "axios"; const Infos = styled.div` - border: 1px solid #dddddd; + border: 1px solid #FAFCFF; margin-bottom:15px; & .commitinfos { background-color: #f1f8ff; - border-bottom: 1px solid #ddd; - padding: 20px; + border: 1px solid rgba(42, 97, 255, 0.23); + border-radius: 3px 3px 0px 0px; + padding: 10px 8px 10px 16px; + & .f-wrap-between{ + align-items: center; + } + & .task-hide{ + width: 65rem; + overflow:hidden; + white-space:normal; + word-break:break-all; + font-weight: bold; + color: #333333; + font-size: 16px; + } } & > .f-wrap-between { - padding: 10px 20px; + padding: 14px 8px 14px 16px; + border-radius: 3px 3px 0px 0px; + border: 1px solid #D0D0D0; + .df{ + align-items: center; + } } `; - +//提交详情页 export default ({ match , history }) => { const [data, setData] = useState({undefined}); const [commit, setCommit] = useState(undefined); @@ -30,7 +48,7 @@ export default ({ match , history }) => { const [committer, setCommitter] = useState(undefined); const [isSpin, setIsSpin] = useState(true); - const { sha , projectsId, owner } = match.params; + const { sha , projectsId, owner, branchName } = match.params; useEffect(() => { if (projectsId && owner && sha) { const url = `/${owner}/${projectsId}/commits/${sha}.json`; @@ -50,16 +68,20 @@ export default ({ match , history }) => { }); } }, [projectsId , owner, sha]); + return (
+
{commit && commit.message && -
{commit.message}
+
{commit.message}
} - + {branchName} +
+
@@ -68,17 +90,25 @@ export default ({ match , history }) => { url={(committer && getImageUrl(`/${committer.image_url}`))|| "https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3025493530,1989042357&fm=26&gp=0.jpg"} name={committer && committer.name} /> - {committer && committer.time_from_now &&
  • {committer.time_from_now}
  • } + {commit && commit.time_from_now &&
  • 提交于{commit.time_from_now}
  • }
  • { parents && parents.length > 0 && parents.map((item,key)=>{ return( - +
    + + sha + {truncateCommitId(item.sha)} +
    ) }) } - +
    + + sha + {truncateCommitId(sha)} +
  • diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index 6e7ae731b..6e0c300c4 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -402,6 +402,16 @@ cursor: pointer; background: #FAFBFC; 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; + } + } border: 1px solid #D0D0D0; font-size: 15px; font-weight: normal; diff --git a/src/forge/Main/list.scss b/src/forge/Main/list.scss index 72c3437e9..a6666ce17 100644 --- a/src/forge/Main/list.scss +++ b/src/forge/Main/list.scss @@ -718,12 +718,76 @@ a.color-grey-ccc:hover{ padding:0px 30px; min-height: 400px; } -.commitList > div{ - border-bottom: 1px solid #EEEEEE; - padding:16px 0px; -} -.commitList > div:last-child{ - border-bottom: none; + +.main{ + margin: 30px auto; + .ant-timeline{ + margin-top: 28px; + .commitList-item{ + position: relative; + padding: 20px 20px; + background: #FAFCFF; + border: 1px solid rgba(42, 97, 255, 0.23); + border-radius: 4px; + margin-left: 16px; + align-items: center; + &:after,&:before{ + content: ""; + position: absolute; + left: -10px; + top: 10px; + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + border-right: 10px solid rgba(42, 97, 255, 0.23); + } + &:after{ + left: -8px; + border-right: 10px solid #FAFCFF; + &:hover{ + border-right: 10px solid #EEF6FF; + } + } + &:hover{ + background: #EEF6FF; + border: 1px solid rgba(42, 97, 255, 0.58); + &:after{ + border-right: 10px solid #EEF6FF; + } + &:before{ + border-right: 10px solid rgba(42, 97, 255, 0.58); + } + } + .treecopy-cont{ + padding: 4px 15px; + } + .btn-83{ + margin-left: 20px; + } + } + .ant-timeline-item{ + padding: 8px 0 20px; + } + .ant-timeline-item-tail{ + height: calc(100% - 20px); + border-left: 2px solid #EEEEEE; + top: 12px; + &:after{ + content: ' '; + height: 0; + position: absolute; + width: 0; + border: 7px solid transparent; + border-top-color: #EEEEEE; + top: 100%; + left: 50%; + margin-left: -8px; + } + } + .ant-timeline-item-head-custom{ + top:20px; + padding: 0 1px; + } + } } diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index 83268b9e9..5e3ab9440 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -86,7 +86,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa :"" } - { + {/* { item.menu_name === "resources" &&
  • @@ -95,7 +95,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa {projectDetail && projectDetail.source_count ? {projectDetail.source_count} :""}
  • - } + } */} { item.menu_name === "versions" &&
  • diff --git a/src/forge/Main/tree/Index.scss b/src/forge/Main/tree/Index.scss index 964fee19e..30c2fce7b 100644 --- a/src/forge/Main/tree/Index.scss +++ b/src/forge/Main/tree/Index.scss @@ -34,48 +34,61 @@ margin-right: 5px; } } - .treecopy{ - flex:1; - display: flex; - justify-content: center; - &>div{ - height: 32px; - background: #FAFBFC; - border-radius: 4px; - border: 1px solid #D0D0D0; - position: relative; - z-index: 1; - display: flex; - align-items: center; - &>span{ - padding:0px 15px; - border-right: 1px solid rgba(153, 153, 153, 0.4); - height: 100%; - img{ - margin-right: 4px; - } - a{ - color: #466AFF; - &:hover{ - text-decoration: underline; - } - } - } - &>i{ - margin:0px 12px; - color: #333!important; - } - input{ - position: absolute; - z-index: 0; - opacity: 0; - top: 32px; - } - } - } .treeabout{ flex:1; text-align: right; } } +} +.treecopy{ + flex:1; + display: flex; + justify-content: center; + &>div{ + height: 32px; + background: #FAFBFC; + border-radius: 4px; + border: 1px solid #D0D0D0; + position: relative; + z-index: 1; + display: flex; + align-items: center; + &>span{ + padding:0px 15px; + border-right: 1px solid rgba(153, 153, 153, 0.4); + height: 100%; + img{ + margin-right: 4px; + } + a{ + color: #466AFF; + &:hover{ + text-decoration: underline; + } + } + } + &>i{ + margin:0px 12px; + color: #333!important; + } + input{ + position: absolute; + z-index: 0; + opacity: 0; + top: 32px; + } + } +} +.new-conmmit{ + width: 30px; + height: 18px; + line-height: 18px; + display: block; + background: #FF6832; + color: white; + font-size: 12px; + border-radius: 4px; +} +.icon-a-yuanquan2x{ + color: #466AFF; } \ No newline at end of file diff --git a/src/forge/Merge/Files.jsx b/src/forge/Merge/Files.jsx index 82a8638c6..64f09a787 100644 --- a/src/forge/Merge/Files.jsx +++ b/src/forge/Merge/Files.jsx @@ -1,11 +1,15 @@ import React ,{useEffect,useState } from 'react'; import { truncateCommitId } from '../common/util'; import { AlignCenter , FlexAJ } from '../Component/layout'; -import { Button } from 'antd'; +import { Button, Tooltip,Progress, Popover, Anchor } from 'antd'; import './merge.css'; +import './Index.scss'; + +const {Link} =Anchor; function Files({data,history,owner,projectsId}){ const [ files , setFiles ] = useState(data && data.files); + const [ copyfileTipTitle, setCopyfileTipTitle] = useState("复制文件路径"); useEffect(()=>{ if(data){ @@ -22,35 +26,82 @@ function Files({data,history,owner,projectsId}){ } } + function copyFileName(fileName){ + var copyCont = document.createElement('input'); + copyCont.defaultValue = fileName; + document.body.appendChild(copyCont); + copyCont.select(); // 选择对象 + document.execCommand("Copy"); // 执行浏览器复制命令 + copyCont.className = 'copyCont'; + copyCont.style.display='none'; + setCopyfileTipTitle("复制成功"); + } + + const folderOpen = ( + +
    + {files && files.length>1 && files.map((item, key) => { + return ( + {item.flag && showDown(item.flag, key, item.isBin);}}> + + + {/* {!item.isBin ? showDown(item.flag, key, item.isBin)}> : ""} */} + {item.name} + +
    + 0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}> + + {item.addition >0 && +{item.addition}} + {item.deletion >0 && -{item.deletion}} + +
    + } + /> + ) + })} +
    +
    + ) + return(
    - - - - 共有 {data && data.files_count} 个文件被更改,包括 + + + + + 共有 {data && data.files_count} 个文件 被更改,包括 { data && data.total_addition ? {data && data.total_addition} 次插入:"" } { data && data.total_addition && data.total_deletion ? " 和 ":""} { data && data.total_deletion ? {data && data.total_deletion} 次删除:""} - + + { files && files.length>0 && -
    +
    { files.map((item,key)=>{ return( -
    - showDown(item.flag,key,item.isBin)}> +
    + - {!item.isBin ? :""} - - {item.name} + {!item.isBin ? showDown(item.flag,key,item.isBin)}>:""} + showDown(item.flag,key,item.isBin)}>{item.name} + setCopyfileTipTitle("复制文件路径")} + > + copyFileName(item.name)}> + - - - +{item.addition} - -{item.deletion} - +
    + 0?item.addition+"处添加":""}${item.addition>0 && item.deletion>0 ?"和":""}${item.deletion>0?item.deletion+"处删除":""}`}> + + {item.addition+item.deletion}处 + + {history.push(`/${owner}/${projectsId}/tree/${truncateCommitId(item.sha)}/${item.name}`)}}>查看文件 +
    { item.sections && item.sections.length >= 1 && !item.flag && diff --git a/src/forge/Merge/Index.scss b/src/forge/Merge/Index.scss index 936b868f8..19f24c613 100644 --- a/src/forge/Merge/Index.scss +++ b/src/forge/Merge/Index.scss @@ -18,4 +18,78 @@ .pr_tags_closed{ border:1px solid #FA6400; color: #FA6400; +} + +.color-grey-3{ + font-weight: bold; +} +.invisable{ + display: none; +} +.fileList{ + .sc-bxivhb{ + width: 55rem; + } + .see-file{ + width: 15rem; + .ml10{ + display: inline-block; + width: 5rem; + cursor: default; + } + span{ + width: 7%; + } + } +} +.filesInfo{ + background: #FAFCFF; + border-color:rgba(42, 97, 255, 0.23); + .ant-progress-line { + width: 5rem; + } + .ant-progress-inner{ + background-color: #D14A4A; + } +} +.ant-popover-arrow,.ant-anchor-ink-ball { + display: none; +} +.ant-popover-inner { + margin-left: -21px; + background: #FFF; +} +.ant-anchor-link,.ant-popover-inner-content{ + padding: 0 0; +} +.ant-anchor-wrapper,.ant-anchor{ + margin-left: 0; + padding-left: 0; +} +.ant-anchor-link-active > .ant-anchor-link-title { + color: #466AFF; +} +.ant-popover-inner-content{ + color: #333333; + width: 75rem; + .folderList{ + max-height: 280px; + overflow:auto; + .files{ + border: 0px; + } + .filesInfo { + padding: 10px 18px 10px 15px; + height: 55px; + background: #FFF; + border-bottom: 1px solid #EEEEEE; + &:hover{ + background: #F3F4F6; + } + .color-green,.color-red{ + width: 3%; + text-align: right; + } + } + } } \ No newline at end of file diff --git a/src/forge/Merge/merge.css b/src/forge/Merge/merge.css index 6b50eeb10..088874c19 100644 --- a/src/forge/Merge/merge.css +++ b/src/forge/Merge/merge.css @@ -152,13 +152,23 @@ form .ant-cascader-picker, form .ant-select { margin-top: 15px; border-radius: 2px; } +.see-file-btn{ + color: #466AFF; + cursor: pointer; +} .filesInfo{ padding:10px 15px; background-color: #fafafa; } +.filesInfo .cursor-pointer{ + cursor: pointer; +} .filesContent{ border-top: 1px solid #ddd; } +.icon-fuzhiicon:hover{ + color: #466AFF; +} .linesContent{ display: flex; min-height: 30px; diff --git a/src/forge/Settings/Setting.js b/src/forge/Settings/Setting.js index 55c1efdda..c3150323f 100644 --- a/src/forge/Settings/Setting.js +++ b/src/forge/Settings/Setting.js @@ -16,7 +16,7 @@ const menu = [ {name:"合并请求",index:"pulls"}, {name:"Wiki",index:"wiki"}, {name:"工作流(beta版)",index:"devops"}, - {name:"资源库",index:"resources"}, + // {name:"资源库",index:"resources"}, {name:"里程碑",index:"versions"}, {name:"动态",index:"activity"}, ] diff --git a/src/forge/Team/Setting/TeamSettingCommon.jsx b/src/forge/Team/Setting/TeamSettingCommon.jsx index 499a00c20..1b3dc8422 100644 --- a/src/forge/Team/Setting/TeamSettingCommon.jsx +++ b/src/forge/Team/Setting/TeamSettingCommon.jsx @@ -122,7 +122,11 @@ export default Form.create()( validator:checkname } ], +<<<<<<< HEAD + ,true +======= ,true +>>>>>>> 465ae57b071299c682f2c8d57d3380aa647c7d23 )} {helper( "组织名称:", diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index 03bbbc42e..9c2c60b4b 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -91,11 +91,14 @@ ul,ol,dl{ } .commitDesc{ flex:1; - margin-left:20px; - font-size:16px; - color:#333; - line-height:26px; + line-height:20px; word-break: break-all; + width: 48rem; + overflow: hidden; + white-space: normal; + &:hover{ + text-decoration: underline; + } } .normalBox{ @@ -297,17 +300,31 @@ form{ border-radius: 5px; font-weight: 500; color: #333333!important; - &:hover,&:active{ + &:hover{ background: #F3F4F6; color: #333333!important; } + &:active{ + background: #D0D0D0; + color: #333333!important; + } +} +.shadow{ + &:hover{ + background: #F3F4F6; + } + &:active{ + background: #D0D0D0; + } } 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); } } \ No newline at end of file