-
{nav === 0 ?"分支":"标签"}:
+ {/* {nav === 0 ?"分支":"标签"} */}
+
{showValue}
diff --git a/src/forge/Branch/branch.css b/src/forge/Branch/branch.css
index ff65db541..962b01970 100644
--- a/src/forge/Branch/branch.css
+++ b/src/forge/Branch/branch.css
@@ -51,7 +51,7 @@
display: flex;
align-items: center;
cursor: pointer;
- min-width: 240px;
+ min-width: 140px;
}
.branch-tagBox-list .ant-popover-arrow{
display: none;
diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss
index 6dbe53b82..e0ae45eed 100644
--- a/src/forge/Component/Component.scss
+++ b/src/forge/Component/Component.scss
@@ -135,4 +135,18 @@ li.ant-menu-item{
.handleBox{
right:0px;
}
+}
+.ant-drawer{
+ z-index: 10000!important;
+}
+.ant-drawer-body{
+ padding:0px!important;
+ .drawerHead{
+ background-color: #333;
+ color: #fff;
+ padding:15px 20px;
+ }
+ .ant-tree{
+ margin:0px 20px!important;
+ }
}
\ No newline at end of file
diff --git a/src/forge/Component/Contributors.jsx b/src/forge/Component/Contributors.jsx
new file mode 100644
index 000000000..74a7d6bae
--- /dev/null
+++ b/src/forge/Component/Contributors.jsx
@@ -0,0 +1,27 @@
+import React from 'react';
+import { AlignCenter , FlexAJ } from '../Component/layout';
+import { Link } from 'react-router-dom';
+import { getImageUrl } from 'educoder';
+
+function Contributors({contributors}){
+ return(
+
+
+ 贡献者{ contributors && contributors.total_count > 0 && {contributors.total_count}}
+ 全部
+
+
+ {
+ contributors && contributors.total_count > 0 ?
+ contributors.list.map((item,key)=>{
+ return(
+
})
+ )
+ })
+ :""
+ }
+
+
+ )
+}
+export default Contributors;
\ No newline at end of file
diff --git a/src/forge/Component/DrawerPanel.jsx b/src/forge/Component/DrawerPanel.jsx
new file mode 100644
index 000000000..167b0cd38
--- /dev/null
+++ b/src/forge/Component/DrawerPanel.jsx
@@ -0,0 +1,94 @@
+import React, { useEffect, useState } from 'react';
+import { Drawer , Tree , Spin } from 'antd';
+import './Component.scss';
+import axios from 'axios';
+const { TreeNode , DirectoryTree } = Tree;
+
+function DrawerPanel({visible,onClose,branch,owner,projectsId,history, name}){
+ const [ treeData , setTreeData ] = useState(undefined);
+ const [ isSpin , setIsSpin ] = useState(true);
+ const [first , setFirst ] = useState(true);
+ useEffect(()=>{
+ if(visible && first){
+ getMenulist();
+ setFirst(false);
+ }
+ },[visible])
+
+ function getMenulist(){
+ const url = `/${owner}/${projectsId}/entries.json`;
+ axios.get(url,{ params: { ref: branch } }).then(result=>{
+ if(result){
+ setTreeData(result.data.entries);
+ }
+ setIsSpin(false);
+ }).catch(error=>{})
+ }
+
+ function renderTreeNodes(data) {
+ return data && data.length > 0 && data.map((item) => {
+ return (
+
+ {renderTreeNodes(item.children)}
+
+ );
+ });
+ }
+
+ function onLoadData(tr){
+ return new Promise((resolve) => {
+ if (tr.props.children) {
+ resolve();
+ return;
+ }
+ let en = [];
+ const url = `/${owner}/${projectsId}/sub_entries.json`;
+ axios.get(url, {
+ params:{
+ filepath:tr.props.dataRef.path,
+ ref:branch,
+ type:"dir"
+ }
+ }).then((result) => {
+ if(result){
+ en = result.data.entries;
+ }
+ }).catch(error=>{})
+ setTimeout(() => {
+ tr.props.dataRef.children = en;
+ setTreeData([...treeData]);
+ resolve();
+ }, 2000);
+ });
+ }
+
+ function selectTree(keys,event){
+ let dataref = event.node.props.dataRef;
+ if(dataref.type==="file"){
+ onClose();
+ history.push(`/projects/${owner}/${projectsId}/tree/${branch}/${dataref.path}`);
+ }
+ }
+
+ return(
+
+
+
+
+ {treeData && renderTreeNodes(treeData)}
+
+
+
+ )
+}
+export default DrawerPanel;
diff --git a/src/forge/Component/LanguagePower.jsx b/src/forge/Component/LanguagePower.jsx
new file mode 100644
index 000000000..55169f7eb
--- /dev/null
+++ b/src/forge/Component/LanguagePower.jsx
@@ -0,0 +1,54 @@
+import React, { useEffect, useState } from 'react';
+import { FlexAJ } from '../Component/layout';
+
+function LanguagePower({languages}){
+ const [ array , setArray ] = useState(undefined);
+
+ useEffect(()=>{
+ if(languages){
+ let arr = [];
+ Object.keys(languages).map((item,key)=>{
+ arr.push({name:item,percent:languages[item],color:getColor()});
+ })
+ setArray(arr);
+ }
+ },[languages])
+
+ function getColor(){
+ let str = "#";
+ let arr = ["1","2","3","4","4","5","6","7","8","9","a","b","c","d","e","f"];
+ for(var i=0;i<6;i++){
+ let num = parseInt(Math.random() * 16);
+ str+=arr[num];
+ }
+ return str;
+ }
+ return(
+
+
语言能力
+
+ {
+ array && array.map((item,key)=>{
+ return(
+
+ )
+ })
+ }
+
+ {
+ array && array.length > 0 &&
+
+ {
+ array.map((item,key)=>{
+ return(
+ {item.name}{item.percent}
+ )
+ })
+ }
+
+ }
+
+
+ )
+}
+export default LanguagePower;
\ No newline at end of file
diff --git a/src/forge/Component/Releases.jsx b/src/forge/Component/Releases.jsx
new file mode 100644
index 000000000..b3b0a774a
--- /dev/null
+++ b/src/forge/Component/Releases.jsx
@@ -0,0 +1,38 @@
+import React from 'react';
+import { AlignCenter , AlignTop , FlexAJ } from '../Component/layout';
+import { Link } from 'react-router-dom';
+
+function Releases({owner,projectsId,releaseVersions}){
+
+ return(
+
+
+ 发行版
+ { releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}}
+
+ { releaseVersions && releaseVersions.total_count > 0 ?
+ 全部
+ :
+ 新建
+ }
+
+ {
+ releaseVersions && releaseVersions.total_count>0 ?
+ releaseVersions.list.map((item,key)=>{
+ return(
+
+
+
+
{item.name}
+
{item.created_at}
+
+
+ )
+ })
+ :""
+ }
+
+
+ )
+}
+export default Releases;
\ No newline at end of file
diff --git a/src/forge/Component/layout.jsx b/src/forge/Component/layout.jsx
index 443e9b36a..7d6a98167 100644
--- a/src/forge/Component/layout.jsx
+++ b/src/forge/Component/layout.jsx
@@ -24,18 +24,32 @@ export const AlignCenter = styled.div`{
display:flex;
align-items: center;
}`
+export const AlignTop = styled.div`{
+ display:flex;
+ align-items: flex-start;
+}`
// 左右结构
export const Box = styled.div`{
display:flex;
align-item:flex-start;
}`
+export const LongWidth = styled.div`{
+ flex:1;
+ border-radius:5px;
+ margin-bottom:30px;
+}`
export const Long = styled.div`{
- width:72%;
+ width:78%;
+ border-radius:5px;
+ margin-bottom:30px;
+}`
+export const ShortWidth = styled.div`{
+ width:300px;
border-radius:5px;
margin-bottom:30px;
}`
export const Short = styled.div`{
- width:28%;
+ flex:1;
border-radius:5px;
margin-bottom:30px;
}`
diff --git a/src/forge/DevOps/Dispose/List.jsx b/src/forge/DevOps/Dispose/List.jsx
index b6b83b56c..72a267853 100644
--- a/src/forge/DevOps/Dispose/List.jsx
+++ b/src/forge/DevOps/Dispose/List.jsx
@@ -66,7 +66,7 @@ function List({ list, operate , projectsId , owner , showModal , deleteFunc }){
ellipsis:true,
render:(value,item)=>{
return(
-
{value}
+
{value}
)
}
},
diff --git a/src/forge/GetData/getData.jsx b/src/forge/GetData/getData.jsx
index 3e2f2224d..115a15a11 100644
--- a/src/forge/GetData/getData.jsx
+++ b/src/forge/GetData/getData.jsx
@@ -10,4 +10,8 @@ export const getTag = async (id,owner)=>{
// 获取hooks(仓库设置-管理web钩子)列表
export const getHooks = async (id,params)=>{
return (await axios.get(`/projects/${id}/hooks.json`,{params})).data;
+}
+// 获取子目录列表
+export const getSubEntries = async (owner,projectsId,params)=>{
+ return (await axios.get(`/${owner}/${projectsId}/sub_entries.json`,{params})).data;
}
\ No newline at end of file
diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx
new file mode 100644
index 000000000..e002ddc98
--- /dev/null
+++ b/src/forge/Main/CoderDepot.jsx
@@ -0,0 +1,375 @@
+import React , { useEffect , useState } from 'react';
+import { WhiteBack , Box , LongWidth , ShortWidth , Gap , AlignCenter , FlexAJ } from '../Component/layout';
+import { Dropdown , Menu , Divider , Spin } from 'antd';
+import { getImageUrl } from "educoder";
+import { Link } from 'react-router-dom';
+
+import SelectBranch from '../Branch/Select';
+import User from '../Component/User';
+import axios from 'axios';
+import Path from './CoderDepotPath';
+import Catalogue from './CoderDepotCatalogue';
+import ReadMe from './CoderDepotReadme';
+import CoderRootFileDetail from './CoderRootFileDetail';
+import './Index.scss';
+import Releases from '../Component/Releases';
+import Contributors from '../Component/Contributors';
+import LanguagePower from '../Component/LanguagePower';
+import DrawerPanel from '../Component/DrawerPanel';
+import Nodata from '../Nodata';
+
+
+function CoderDepot(props){
+ const [ projectDetail , setProjectDetail ]= useState(undefined);
+ const [ treeValue , setTreeValue ] = useState(undefined);
+ const [ treeValuePath , setTreeValuePath ] = useState(undefined);
+ const [ lastCommit,setLastCommit ] = useState(undefined);
+ const [ lastCommitAuthor,setLastCommitAuthor ] = useState(undefined);
+ const [ type ,setType ] = useState('dir');
+ const [ hide , setHide ] = useState(true);
+ const [ hideBtn , setHideBtn ] = useState(false);
+ const [ commitCount ,setCommitCount ] = useState(0);
+ const [ dirInfo ,setDirInfo ] = useState(undefined);//文件夹目录列表
+ const [ fileInfo ,setFileInfo ] = useState(undefined);//文件内容信息
+ const [ zip_url , setZip_url ] = useState(undefined);
+ const [ tar_url , setTar_url ] = useState(undefined);
+ const [ readOnly , setReadOnly] = useState(true);
+ const [ isSpin , setIsSpin] = useState(true);
+ const [ visible ,setVisible ] = useState(false);
+
+ const owner = props.match.params.owner;
+ const projectsId = props.match.params.projectsId;
+ const branchName = props.match.params.branchName;
+ let pathname = props.history.location.pathname;
+
+ useEffect(()=>{
+ if(props.projectDetail){
+ setProjectDetail(props.projectDetail);
+ }
+ },[props])
+
+ useEffect(()=>{
+ if(treeValue){
+ setTreeValuePath(treeValue.split('/'));
+ }else{
+ setTreeValuePath(undefined);
+ }
+ },[treeValue])
+
+ useEffect(()=>{
+ if (pathname){
+ if(pathname.indexOf(`/projects/${owner}/${projectsId}`) > -1 && pathname.indexOf(`/tree/${branchName}/`) > -1) {
+ let url = pathname.split(`/tree/${branchName}/`)[1];
+ setTreeValue(url);
+ getFileInfo(url,branchName);
+ }else{
+ setTreeValue(undefined);
+ getDirInfo(branchName ||(projectDetail && projectDetail.default_branch));
+ }
+ }
+ },[pathname])
+
+ // 获取主目录列表
+ function getDirInfo(branch){
+ setIsSpin(true);
+ const url = `/${owner}/${projectsId}/entries.json`;
+ axios.get(url, {
+ params: { ref: branch }
+ }).then((result) => {
+ if (result) {
+ setCommitCount(result.data.commits_count);
+ setDirInfo(result.data.entries);
+ setFileInfo(undefined);
+ setTar_url(result.data.tar_url);
+ setZip_url(result.data.zip_url);
+ let c = result.data.last_commit
+ setLastCommit(c && c.commit);
+ setLastCommitAuthor(c && (c.author || (c.commit && c.commit.author)));
+ }
+ setTimeout(function(){setIsSpin(false);},500);
+ }).catch(error=>{setIsSpin(false);})
+ }
+
+ useEffect(()=>{
+ if(projectDetail && lastCommit)
+ {
+ let ele = document.getElementById("ptxt");
+ if(ele){
+ let h = ele.offsetHeight;
+ if( h > 18 ) setHideBtn(true)
+ }
+ }
+ },[projectDetail,lastCommit])
+ // 获取子目录列表
+ function getFileInfo(path, ref){
+ setIsSpin(true);
+ const url = `/${owner}/${projectsId}/sub_entries.json`;
+ axios.get(url, {
+ params:{
+ filepath:path,
+ ref:ref || branchName,
+ type
+ }
+ }).then((result) => {
+ if (result) {
+ let en = result.data.entries;
+ if(en.type){
+ setDirInfo(undefined);
+ setFileInfo(en);
+ setType(en.type);
+ }else{
+ setFileInfo(undefined);
+ setDirInfo(en);
+ setType("dir");
+ }
+ let c = result.data.last_commit
+ setLastCommit(c && c.commit);
+ setLastCommitAuthor(c && (c.author || (c.commit && c.commit.author)));
+ }
+ setTimeout(function(){setIsSpin(false);},500)
+ }).catch(error=>{setIsSpin(false);})
+ }
+
+ // 切换分支或者标签
+ function changeBranch(value){
+ let url = `/projects/${owner}/${projectsId}${value && `/tree/${value}`}${treeValue ? `/${treeValue}`:""}`;
+ props.history.push(url);
+ }
+
+ // 文件相关的下拉项
+ const fileMenu =(
+
+ )
+
+ function getPathUrl(array,index){
+ if(array && array.length>0 && index){
+ let str = "";
+ for(let i=0;i
+ ZIP
+ TAR.GZ
+
+ )
+ return(
+
+
+ {
+ dirInfo &&
+
+ setVisible(false)}
+ />
+ setVisible(true)}>
+
+ }
+
+ {
+ projectDetail &&
+
+
+
+
+
+
+ {
+ props && props.platform ?
+
+ :
+ 分支:{branchName || (projectDetail && projectDetail.default_branch)}
+ }
+
+
+
+
+ {projectDetail && projectDetail.branches && projectDetail.branches.total_count}个分支
+
+
+
+
+
+ {projectDetail && projectDetail.tags && projectDetail.tags.total_count}个标签
+
+
+
+
+
+ + 合并请求
+ + 任务
+
+ { type === "dir" && 文件}
+ 下载
+
+
+ {
+ dirInfo || fileInfo ?
+
+ {
+ lastCommit &&
+
+
+
{lastCommit && lastCommit.message}
+ { hideBtn &&
changeHide(hide)}> }
+
+
{lastCommit && lastCommit.time_from_now}
+ { commitCount ?
{commitCount}次提交:"" }
+
+ }
+
+ {
+ treeValuePath && treeValuePath.length > 0 &&
+
+ }
+ {
+ dirInfo && dirInfo.length > 0 &&
+ dirInfo.map((item,key)=>{
+ return(
+
+ )
+ })
+ }
+ {
+ fileInfo &&
+
+ }
+
+
+ :
+ }
+ {/* readme文件显示(显示文件详情时不显示readme文件) */}
+ { dirInfo &&
}
+
+
+ {
+ !fileInfo &&
+
+
+
+
简介
+
{projectDetail && projectDetail.content}
+ {
+ projectDetail && projectDetail.website &&
+
+
+ {projectDetail.website}
+
+ }
+
+
+ README.md
+
+
+
+ {projectDetail && projectDetail.size}
+
+ {
+ projectDetail && projectDetail.license_name &&
+
+
+ {projectDetail.license_name}
+
+ }
+
+ {/* 发布 */}
+ {
+ projectDetail && projectDetail.release_versions &&
+
+
+
+
+ }
+ {/* 贡献者 */}
+ {
+ projectDetail && projectDetail.contributors &&
+
+
+
+
+ }
+ {/* 语言 */}
+ { projectDetail && projectDetail.languages &&
+
+
+
+
+ }
+
+
+ }
+
+ }
+
+
+
+ )
+}
+export default CoderDepot;
\ No newline at end of file
diff --git a/src/forge/Main/CoderDepotCatalogue.jsx b/src/forge/Main/CoderDepotCatalogue.jsx
new file mode 100644
index 000000000..f374da15c
--- /dev/null
+++ b/src/forge/Main/CoderDepotCatalogue.jsx
@@ -0,0 +1,22 @@
+import React from 'react';
+import { Link } from 'react-router-dom';
+import { truncateCommitId } from '../common/util';
+
+function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
+ return(
+
+
+ goToSubRoot(item.path,item.type,item.name)}>
+ {item.name}
+
+
+
+
+ {item.commit && item.commit.message}
+
+
+ {item.commit && item.commit.time_from_now}
+
+ )
+}
+export default CoderDepotCatalogue;
\ No newline at end of file
diff --git a/src/forge/Main/CoderDepotPath.jsx b/src/forge/Main/CoderDepotPath.jsx
new file mode 100644
index 000000000..ad4bb1096
--- /dev/null
+++ b/src/forge/Main/CoderDepotPath.jsx
@@ -0,0 +1,30 @@
+import React from 'react';
+
+
+function CoderDepotPath({treeValuePath , returnUlr , returnMain , getPathUrl , identifier}){
+ return(
+
+
+
+ {identifier}
+
+ {treeValuePath.map((item, key) => {
+ return (
+
+ {
+ key === treeValuePath.length-1 ?
+ {item}
+ :
+ returnUlr(`${getPathUrl(treeValuePath,key+1)}`)} className="color-blue subFileName">{item}
+ }
+
+ );
+ })}
+
+
+ )
+}
+export default CoderDepotPath;
\ No newline at end of file
diff --git a/src/forge/Main/CoderDepotReadme.jsx b/src/forge/Main/CoderDepotReadme.jsx
new file mode 100644
index 000000000..c46747404
--- /dev/null
+++ b/src/forge/Main/CoderDepotReadme.jsx
@@ -0,0 +1,26 @@
+import React from 'react';
+import RenderHtml from '../../components/render-html';
+
+function CoderDepotReadme({ operate , history , readme , ChangeFile }){
+ return(
+
+ )
+}
+export default CoderDepotReadme;
\ No newline at end of file
diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js
index ace3aa581..94411defa 100644
--- a/src/forge/Main/CoderRootBranch.js
+++ b/src/forge/Main/CoderRootBranch.js
@@ -32,7 +32,7 @@ export default ((props)=>{
return(
-
{item.name}
+
{item.name}
{item.last_commit && truncateCommitId(item.last_commit.sha)}
{item.last_commit && item.last_commit.message}
diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js
index c9665c77a..f87a85398 100644
--- a/src/forge/Main/CoderRootCommit.js
+++ b/src/forge/Main/CoderRootCommit.js
@@ -107,7 +107,7 @@ class CoderRootCommit extends Component{
let branch = branchName || defaultBranch;
return(
-
+
{
diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js
index eacf623b3..a800e76c3 100644
--- a/src/forge/Main/CoderRootFileDetail.js
+++ b/src/forge/Main/CoderRootFileDetail.js
@@ -172,7 +172,7 @@ class CoderRootFileDetail extends Component {
let flag = current_user && current_user.login && (isManager || isDeveloper);
const Option = Select.Option;
return (
-
+
@@ -275,7 +275,7 @@ class CoderRootFileDetail extends Component {
>
)}
-
+
);
}
}
diff --git a/src/forge/Main/CoderRootIndex.js b/src/forge/Main/CoderRootIndex.js
index 0e9c72077..4dd531bc3 100644
--- a/src/forge/Main/CoderRootIndex.js
+++ b/src/forge/Main/CoderRootIndex.js
@@ -71,6 +71,7 @@ class CoderRootIndex extends Component{
this.getTopCount(branchName || defaultBranch);
}
+ // 获取
组件里要显示的数据
getTopCount=(branch)=>{
const { projectsId , owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/top_counts.json`;
@@ -105,13 +106,6 @@ class CoderRootIndex extends Component{
(props) => (
)
}
>
-
- {/* diff */}
-
()
- }
- >
()
@@ -122,7 +116,6 @@ class CoderRootIndex extends Component{
() => ()
}
>
-
()
@@ -133,33 +126,21 @@ class CoderRootIndex extends Component{
() => ()
}
>
-
()
}
>
-
()
}
>
-
()
- }
- >
()
}
>
-
()
- }
- >
)
diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 719fa3d31..81b35bf00 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -97,6 +97,14 @@ const ForkUsers = Loadable({
loading: Loading,
})
+const CoderRootCommit = Loadable({
+ loader: () => import('./CoderRootCommit'),
+ loading: Loading,
+})
+const CoderDepot = Loadable({
+ loader: () => import('./CoderDepot'),
+ loading: Loading,
+})
const TrendsIndex = Loadable({
loader: () => import('../Activity/Activity'),
@@ -151,7 +159,6 @@ class Detail extends Component {
watched: false,
praised: false,
http_url: undefined,
- author: undefined,
branchs: undefined,
branchList: undefined,
project: null,
@@ -246,7 +253,7 @@ class Detail extends Component {
getDetail = () => {
const { projectsId , owner } = this.props.match.params;
- const url = `/${owner}/${projectsId}.json`;
+ const url = `/${owner}/${projectsId}/detail.json`;
axios.get(url).then((result) => {
if (result && result.data) {
this.setState({
@@ -256,7 +263,6 @@ class Detail extends Component {
isReporter: result.data.permission && result.data.permission === "Reporter",
isDeveloper: result.data.permission && result.data.permission === "Developer",
http_url: result.data.clone_url,
- author: result.data.author,
praised: result.data.praised,
watched: result.data.watched,
watchers_count: result.data.watchers_count,
@@ -677,11 +683,6 @@ class Detail extends Component {
(props) => ()
}
>
- ()
- }
- >
()
@@ -697,19 +698,27 @@ class Detail extends Component {
(props) => ()
}
>
+
+
+ {/* 代码库----详情页面 */}
()
+ (props) => ()
}
>
()
+ (props) => ()
+ }
+ >
+ ()
}
>
()
+ (props) => ()
}
>
diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx
index 8007e1fc8..b36453514 100644
--- a/src/forge/Main/Diff.jsx
+++ b/src/forge/Main/Diff.jsx
@@ -59,7 +59,7 @@ export default ({ match , history }) => {
{commit && commit.message &&
{commit.message}
}
-
+
diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss
index cb006f67a..bcb2bd1c8 100644
--- a/src/forge/Main/Index.scss
+++ b/src/forge/Main/Index.scss
@@ -71,4 +71,201 @@
text-align: right;
}
}
+}
+
+// coderDepot
+.Panels{
+ max-width: 1200px;
+ margin: 0 auto;
+ .panelmenu{
+ padding-top:30px;
+ }
+ .addOptionBtn{
+ height: 32px;
+ line-height: 32px;
+ display: flex;
+ border:1px solid #d9d9d9;
+ border-radius: 4px;
+ a{
+ padding:0px 13px;
+ color: rgba(0, 0, 0, 0.65);
+ cursor: pointer;
+ }
+ & > a:first-child{
+ border-right: 1px solid #d9d9d9;
+ }
+ }
+ .infoCount{
+ display: inline-block;
+ padding:0px 5px;
+ height: 16px;
+ line-height: 16px;
+ background-color: #eee;
+ color:#999;
+ border-radius: 12px;
+ margin-left: 10px;
+ font-size: 12px;
+ }
+ .attrPerson{
+ padding-top: 15px;
+ display: flex;
+ flex-wrap: wrap;
+ a{
+ margin: 10px 10px 0px 0px;
+ img{
+ border-radius: 50%;
+ width: 35px;
+ height: 35px;
+ }
+ &:nth-child(6){
+ margin-right: 0px;
+ }
+ }
+ }
+ .progress{
+ display: flex;
+ border-radius: 10px;
+ height: 7px;
+ margin-top: 12px;
+ span{
+ border-left: 1px solid #fff;
+ &:first-child{
+ border-left: none;
+ border-radius: 10px 0px 0px 10px;
+ }
+ &:last-child{
+ border-radius: 0px 10px 10px 0px;
+ }
+ }
+ }
+ .progresstip{
+ margin-top: 15px;
+ flex-wrap: wrap;
+ i.zero{
+ position: absolute;
+ display: block;
+ border-radius: 50%;
+ height: 8px;
+ width: 8px;
+ left: 0px;
+ top:10px
+ }
+ &>span{
+ padding-left: 15px;
+ position: relative;
+ min-width: 33.5%;
+ span{
+ color: #666;
+ &:last-child{
+ color: #999;
+ margin-left: 5px;
+ }
+ }
+ }
+ }
+ .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;
+ border-radius: 4px 4px 0px 0px;
+ background-color: #FAFBFC;
+ .ellipsistxt{
+ margin-left: 13px;
+ line-height:18px;
+ margin-top:6px;
+ flex:1;
+ width: 0;
+ color: #666;
+ &>p{
+ word-break:break-all;
+ }
+ &.hide{
+ height: 18px;
+ overflow: hidden;
+ position: relative;
+ padding-right:8px;
+ }
+ &.hide::after{
+ position: absolute;
+ right: 0px;
+ bottom: 0px;
+ content:"...";
+
+ }
+ }
+ .ellipsis{
+ margin-left: 8px;
+ cursor: pointer;
+ border-radius: 2px;
+ background-color: #c1c1c1;
+ padding:0px 4px;
+ height: 14px;
+ line-height: 14px;
+ margin-top: 9px;
+ i{
+ font-size: 15px!important;
+ color: #fff;
+ height: 14px;
+ line-height: 14px;
+ }
+ }
+ }
+ .listtablebody{
+ li.listtablepath{
+ a{color: #40a9ff;}
+ }
+ li{
+ height: 42px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1px solid #d9d9d9;
+ padding:0px 20px 0px 24px;
+ & > span:first-child{
+ width: 30%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ & > span:nth-child(2){
+ width: 60%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ & > span:nth-child(3){
+ width: 10%;
+ text-align: right;
+ }
+ }
+ &> li:last-child{
+ border-bottom: none;
+ }
+ }
+ }
+}
+.drawerBtn{
+ position: fixed;
+ left: -13px;
+ border:1px solid #d9d9d9;
+ width: 34px;
+ border-radius: 0px 12px 12px 0px;
+ text-align: right;
+ height: 70px;
+ line-height: 70px;
+ top:50%;
+ margin-top: -35px;
+ cursor: pointer;
+ &:hover{
+ box-shadow: 1px 0px 7px rgba(0,0,0,0.1);
+ }
+ i{
+ color: #d9d9d9;
+ }
}
\ No newline at end of file
diff --git a/src/forge/Main/list.css b/src/forge/Main/list.css
index 272583d1c..226be6728 100644
--- a/src/forge/Main/list.css
+++ b/src/forge/Main/list.css
@@ -424,15 +424,11 @@
max-width: 100%;
}
/* 分支 */
-.branchTable{
- border:1px solid #f7f7f7;
- border-radius: 4px;
-}
.branchTitle{
- padding:12px 10px;
+ padding:8px 10px;
color: #333;
font-size: 16px;
- background:rgba(241,248,255,1);
+ border-bottom: 1px solid #d9d9d9;
}
.branchUl{
padding:0px 30px;
@@ -548,17 +544,19 @@
}
.commonBox{
border:1px solid #ddd;
- margin-top: 25px;
+ margin-top: 30px;
+ border-radius: 4px;
}
.commonBox .commonBox-title{
- padding:0px 15px;
+ padding:0px 20px;
box-sizing: border-box;
font-size: 16px;
- background: #F1F8FF;
+ background: #FAFBFC;/* F1F8FF */
font-weight: bold;
- height: 50px;
- line-height: 50px;
- border-bottom: 1px solid #ddd;
+ height: 45px;
+ line-height: 45px;
+ border-bottom: 1px solid #d9d9d9;
+ border-radius: 4px 4px 0px 0px;
}
.synchronism{
display: block;
@@ -575,7 +573,7 @@
.commonBox .commonBox-info{
padding:20px 15px;
}
-.commonBox-title-read{vertical-align: middle;}
+.commonBox-title-read{vertical-align: middle;color: #666;}
@media screen and (max-width: 370px){
.p-r-tags,.p-r-btn{
diff --git a/src/forge/Merge/MergeItem.js b/src/forge/Merge/MergeItem.js
index 77a8a62a7..dd5f4f45e 100644
--- a/src/forge/Merge/MergeItem.js
+++ b/src/forge/Merge/MergeItem.js
@@ -98,7 +98,7 @@ class MergeItem extends Component {
{item.is_original
@@ -116,7 +116,7 @@ class MergeItem extends Component {
{/* {item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`} */}
diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js
index 3e721ebce..c10742dad 100644
--- a/src/forge/Merge/MessageCount.js
+++ b/src/forge/Merge/MessageCount.js
@@ -305,7 +305,7 @@ class MessageCount extends Component {
{data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}:{data.pull_request.head}
@@ -320,7 +320,7 @@ class MessageCount extends Component {
{/* {data.pull_request.is_fork ? data.pull_request.base : `${data.pull_request.pull_request_user}:${data.pull_request.base}`} */}
diff --git a/src/forge/Newfile/UserSubmitComponent.js b/src/forge/Newfile/UserSubmitComponent.js
index 956ec3634..9883ce8f3 100644
--- a/src/forge/Newfile/UserSubmitComponent.js
+++ b/src/forge/Newfile/UserSubmitComponent.js
@@ -54,7 +54,7 @@ class UserSubmitComponent extends Component {
const { getTopCount } = this.props;
getTopCount && getTopCount(values.branchname);
}
- let url = `/projects/${owner}/${projectsId}${values.branchname ? `/branch/${values.branchname}`: (branch ? `/branch/${branch}` : "")}`;
+ let url = `/projects/${owner}/${projectsId}${values.branchname ? `/tree/${values.branchname}`: (branch ? `/tree/${branch}` : "")}`;
this.props.history.push(url);
}
})
@@ -89,7 +89,7 @@ class UserSubmitComponent extends Component {
.then((result) => {
this.setState({ isSpin: false });
if (result.data && result.data.status === 1) {
- let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/branch/${values.branchname}` : ((currentBranch || branch) ? `/branch/${currentBranch || branch}`:""))}`;
+ let url = `/projects/${owner}/${projectsId}${(values.branchname ? `/tree/${values.branchname}` : ((currentBranch || branch) ? `/tree/${currentBranch || branch}`:""))}`;
this.props.history.push(url);
this.props.showNotification("文件修改成功!");
}
@@ -114,7 +114,7 @@ class UserSubmitComponent extends Component {
const { editor_type } = this.props;
return (
-
+
-
- {!readOnly && (
-
- )}
-
+ {!readOnly && (
+
+
+
+ )}
+
);
}