forked from Gitlink/forgeplus-react
Merge branch 'gitlink_server' of https://git.trustie.net/Gitlink/forgeplus-react into feature_teaching
This commit is contained in:
commit
e206de9f1f
|
@ -9603,6 +9603,7 @@
|
||||||
"set-blocking": "^2.0.0",
|
"set-blocking": "^2.0.0",
|
||||||
"string-width": "^1.0.2",
|
"string-width": "^1.0.2",
|
||||||
"which-module": "^1.0.0",
|
"which-module": "^1.0.0",
|
||||||
|
"y18n": "^3.2.1",
|
||||||
"yargs-parser": "^5.0.0"
|
"yargs-parser": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9828,6 +9829,7 @@
|
||||||
"set-blocking": "^2.0.0",
|
"set-blocking": "^2.0.0",
|
||||||
"string-width": "^1.0.2",
|
"string-width": "^1.0.2",
|
||||||
"which-module": "^1.0.0",
|
"which-module": "^1.0.0",
|
||||||
|
"y18n": "^3.2.1",
|
||||||
"yargs-parser": "^5.0.0"
|
"yargs-parser": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20037,6 +20039,11 @@
|
||||||
"resolved": "https://registry.npm.taobao.org/xterm-addon-fit/download/xterm-addon-fit-0.4.0.tgz",
|
"resolved": "https://registry.npm.taobao.org/xterm-addon-fit/download/xterm-addon-fit-0.4.0.tgz",
|
||||||
"integrity": "sha1-BuDF0KaqrPsAnvVl76HIHpPZAZM="
|
"integrity": "sha1-BuDF0KaqrPsAnvVl76HIHpPZAZM="
|
||||||
},
|
},
|
||||||
|
"y18n": {
|
||||||
|
"version": "3.2.2",
|
||||||
|
"resolved": "https://registry.nlark.com/y18n/download/y18n-3.2.2.tgz",
|
||||||
|
"integrity": "sha1-hckBvWRwznH8S7cjrSCbcPfyhpY="
|
||||||
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||||
|
|
|
@ -3945,6 +3945,10 @@ html>body #ajax-indicator {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
color: #2FC25B;
|
color: #2FC25B;
|
||||||
}
|
}
|
||||||
|
.privateTag.red{
|
||||||
|
color: #FF6832;
|
||||||
|
border:1px solid #FF6832;
|
||||||
|
}
|
||||||
.head-nav {
|
.head-nav {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 58px;
|
height: 58px;
|
||||||
|
|
10
src/App.js
10
src/App.js
|
@ -3,7 +3,6 @@ import './App.css';
|
||||||
import { ConfigProvider } from 'antd'
|
import { ConfigProvider } from 'antd'
|
||||||
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
||||||
import {
|
import {
|
||||||
// BrowserRouter as Router,
|
|
||||||
Route,
|
Route,
|
||||||
Switch
|
Switch
|
||||||
} from 'react-router-dom';
|
} from 'react-router-dom';
|
||||||
|
@ -79,10 +78,7 @@ const OrganizeIndex = Loadable({
|
||||||
loader: () => import('./forge/Team/Index'),
|
loader: () => import('./forge/Team/Index'),
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
})
|
})
|
||||||
const EducoderLogin = Loadable({
|
|
||||||
loader: () => import('./modules/login/EducoderLogin'),
|
|
||||||
loading: Loading,
|
|
||||||
})
|
|
||||||
const Search = Loadable({
|
const Search = Loadable({
|
||||||
loader: () => import('./modules/search/'),
|
loader: () => import('./modules/search/'),
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
|
@ -283,8 +279,7 @@ class App extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { mygetHelmetapi, pathType} = this.state;
|
const { pathType } = this.state;
|
||||||
let personal = mygetHelmetapi && mygetHelmetapi.personal;
|
|
||||||
return (
|
return (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<ConfigProvider locale={zhCN}>
|
<ConfigProvider locale={zhCN}>
|
||||||
|
@ -437,7 +432,6 @@ class App extends Component {
|
||||||
|
|
||||||
<Route component={Shixunnopage} />
|
<Route component={Shixunnopage} />
|
||||||
</Switch>
|
</Switch>
|
||||||
{/* </Router> */}
|
|
||||||
</MuiThemeProvider>
|
</MuiThemeProvider>
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
</Provider>
|
</Provider>
|
||||||
|
|
|
@ -82,7 +82,7 @@ function AboutUs(){
|
||||||
{/* 确实开源 一脉传承 */}
|
{/* 确实开源 一脉传承 */}
|
||||||
<div className="au_cont inherit pl30">
|
<div className="au_cont inherit pl30">
|
||||||
<p className="subtitle">确实开源 一脉传承</p>
|
<p className="subtitle">确实开源 一脉传承</p>
|
||||||
<div>本世纪以来,随着软件创新需求和应用规模的飞速增长,软件开发队伍、开发资源、可信评估呈现出规模化、开放化、持续化的新特点,软件开发活动面临协同难、复用难、评估难的制约,经典的工程化软件开发方法面临严峻挑战,严重影响了软件开发效率和质量的提升。在此背景下,国防科技大学联合国内多所知名高校、科研机构和软件企业,围绕开源创新开展了持续性探索,构建形成了以Trustie(确实)为代表的一系列开源创新服务基础设施。自2006年以来,Trustie经过三个阶段的演化发展,于2021年迎来全面升级:在计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,共筑新一代开源创新服务平台GitLink!</div>
|
<div>本世纪以来,随着软件创新需求和应用规模的飞速增长,软件开发队伍、开发资源、可信评估呈现出规模化、开放化、持续化的新特点,软件开发活动面临协同难、复用难、评估难的制约,经典的工程化软件开发方法面临严峻挑战,严重影响了软件开发效率和质量的提升。在此背景下,国防科技大学联合国内多所知名高校、科研机构和软件企业,围绕开源创新开展了持续性探索,构建形成了以Trustie(确实)为代表的一系列开源创新服务基础设施。自2006年以来,Trustie经过三个阶段的演化发展,于2021年迎来全面升级:在中国计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,共筑新一代开源创新服务平台GitLink!</div>
|
||||||
<div className="inherit_items">
|
<div className="inherit_items">
|
||||||
<img src={quan1} className="quan1Img"/>
|
<img src={quan1} className="quan1Img"/>
|
||||||
<img src={quan2} className="quan2Img"/>
|
<img src={quan2} className="quan2Img"/>
|
||||||
|
@ -102,7 +102,7 @@ function AboutUs(){
|
||||||
<Timeline.Item dot={<i className="iconfont icon-a-yuanquan2x"></i>}>
|
<Timeline.Item dot={<i className="iconfont icon-a-yuanquan2x"></i>}>
|
||||||
<div className="timeline_cont">
|
<div className="timeline_cont">
|
||||||
<p>Trustie 3.0阶段 (2020年至今)</p>
|
<p>Trustie 3.0阶段 (2020年至今)</p>
|
||||||
<div>Trustie在已有的技术积累基础上,进一步联合国内高等院校、科研机构、产业企业和开源组织等,在计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,致力于联接互联网海量群智资源,探索开源创新成果开放与共享、开源生态协作与共建的新模式和新方法,升级形成了新一代开源创新服务平台GitLink,力图破解软件开发群智范式背后的本质机理,建立面向“大外围”开放创新的群智激发与汇聚关键机制,实现面向大规模软件涉众的稳态群智激发与汇聚。</div>
|
<div>Trustie在已有的技术积累基础上,进一步联合国内高等院校、科研机构、产业企业和开源组织等,在中国计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,致力于联接互联网海量群智资源,探索开源创新成果开放与共享、开源生态协作与共建的新模式和新方法,升级形成了新一代开源创新服务平台GitLink,力图破解软件开发群智范式背后的本质机理,建立面向“大外围”开放创新的群智激发与汇聚关键机制,实现面向大规模软件涉众的稳态群智激发与汇聚。</div>
|
||||||
</div>
|
</div>
|
||||||
</Timeline.Item>
|
</Timeline.Item>
|
||||||
</Timeline>
|
</Timeline>
|
||||||
|
|
|
@ -14,20 +14,20 @@ class ActivityItem extends Component {
|
||||||
{/* 如果是版本发布 */}
|
{/* 如果是版本发布 */}
|
||||||
{item.trend_type === "VersionRelease" ?
|
{item.trend_type === "VersionRelease" ?
|
||||||
<p className="itemLine">
|
<p className="itemLine">
|
||||||
<Link to={`/${owner}/${projectsId}/releases`} className="color-blue font-16">{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/releases`} className="font-16">{item.name}</Link>
|
||||||
<span className="activity_type">{item.trend_type}</span>
|
<span className="activity_type">{item.trend_type}</span>
|
||||||
</p >
|
</p >
|
||||||
:
|
:
|
||||||
// 如果是任务
|
// 如果是任务
|
||||||
item.trend_type === "Issue" ?
|
item.trend_type === "Issue" ?
|
||||||
<p className="itemLine">
|
<p className="itemLine">
|
||||||
<Link to={`/${owner}/${projectsId}/issues/${item.trend_id}`} className="color-blue font-16">{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/issues/${item.trend_id}`} className="font-16">{item.name}</Link>
|
||||||
<span className="activity_type">{item.trend_type}</span>
|
<span className="activity_type">{item.trend_type}</span>
|
||||||
</p >
|
</p >
|
||||||
:
|
:
|
||||||
// 如果是合并请求
|
// 如果是合并请求
|
||||||
<p className="itemLine">
|
<p className="itemLine">
|
||||||
<Link to={`/${owner}/${projectsId}/pulls/${item.trend_id}`} className="color-blue font-16">{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/pulls/${item.trend_id}`} className="font-16">{item.name}</Link>
|
||||||
<span className="activity_type">{item.trend_type}</span>
|
<span className="activity_type">{item.trend_type}</span>
|
||||||
</p >
|
</p >
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@ function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
|
||||||
const [ key , setKey ] = useState("HTTP");
|
const [ key , setKey ] = useState("HTTP");
|
||||||
return (
|
return (
|
||||||
<div className="downMenu">
|
<div className="downMenu">
|
||||||
<div style={{borderBottom:"1px solid #eee"}}>
|
<div>
|
||||||
<Menu className="urlMenu" selectedKeys={[key]} mode={"horizontal"}>
|
<Menu className="urlMenu" selectedKeys={[key]} mode={"horizontal"}>
|
||||||
<Menu.Item key="HTTP" onClick={(e)=>{setKey(e.key)}}>HTTP</Menu.Item>
|
<Menu.Item key="HTTP" onClick={(e)=>{setKey(e.key)}}>HTTP</Menu.Item>
|
||||||
<Menu.Item key="SSH" onClick={(e)=>{setKey(e.key)}}>SSH</Menu.Item>
|
{ssh_url && <Menu.Item key="SSH" onClick={(e)=>{setKey(e.key)}}>SSH</Menu.Item>}
|
||||||
</Menu>
|
</Menu>
|
||||||
<div className="gitAddressClone">
|
<div className="gitAddressClone">
|
||||||
<input type="text" id="copy_rep_content" value={key==="HTTP" ? http_url:ssh_url} />
|
<input type="text" id="copy_rep_content" value={key==="HTTP" ? http_url:ssh_url} />
|
||||||
|
@ -18,8 +18,8 @@ function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Menu className="edu-txt-center">
|
<Menu className="edu-txt-center">
|
||||||
<Menu.Item><a href={zip_url}>下载 ZIP</a></Menu.Item>
|
{zip_url && <Menu.Item style={{borderTop:"1px solid #eee"}}><a href={zip_url}>下载 ZIP</a></Menu.Item>}
|
||||||
<Menu.Item><a href={tar_url}>下载 TAR.GZ</a></Menu.Item>
|
{tar_url && <Menu.Item><a href={tar_url}>下载 TAR.GZ</a></Menu.Item>}
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import './Component.scss';
|
||||||
import { getUser } from '../GetData/getData';
|
import { getUser } from '../GetData/getData';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
function Contributors({contributors,owner,projectsId,currentLogin}){
|
function Contributors({owner,projectsId,currentLogin}){
|
||||||
const [ menuList ,setMenuList ]= useState([]);
|
const [ menuList ,setMenuList ]= useState([]);
|
||||||
const [ list , setList ]= useState(undefined);
|
const [ list , setList ]= useState(undefined);
|
||||||
const [ total , setTotal ]= useState(0);
|
const [ total , setTotal ]= useState(0);
|
||||||
|
@ -16,11 +16,18 @@ function Contributors({contributors,owner,projectsId,currentLogin}){
|
||||||
const [ isSpin , setIsSpin ] = useState(false);
|
const [ isSpin , setIsSpin ] = useState(false);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(contributors && contributors.total_count>0){
|
getData();
|
||||||
setTotal(contributors.total_count);
|
},[])
|
||||||
setList(contributors.list);
|
|
||||||
}
|
function getData(){
|
||||||
},[contributors])
|
const url = `/${owner}/${projectsId}/contributors.json`;
|
||||||
|
axios.get(url).then(result=>{
|
||||||
|
if(result){
|
||||||
|
setTotal(result.data.total_count);
|
||||||
|
setList(result.data.list);
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(login){
|
if(login){
|
||||||
|
@ -148,15 +155,15 @@ function Contributors({contributors,owner,projectsId,currentLogin}){
|
||||||
}
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
|
total > 0 ?
|
||||||
<div className="halfs">
|
<div className="halfs">
|
||||||
<Link to={`/${owner}/${projectsId}/contribute`} className="font-16 color-ooo hoverA">
|
<Link to={`/${owner}/${projectsId}/contribute`} className="font-16 color-ooo hoverA">
|
||||||
<span>贡献者</span>
|
<span>贡献者</span>
|
||||||
{ contributors && contributors.total_count > 0 && <span className="infoCount">{contributors.total_count}</span>}
|
{ total > 0 && <span className="infoCount">{total}</span>}
|
||||||
</Link>
|
</Link>
|
||||||
<div className="attrPerson" onMouseLeave={()=>setVisibleFunc(false)}>
|
<div className="attrPerson" onMouseLeave={()=>setVisibleFunc(false)}>
|
||||||
{
|
{
|
||||||
total > 0 ?
|
list && list.length>0 && list.map((item,key)=>{
|
||||||
list.map((item,key)=>{
|
|
||||||
return(
|
return(
|
||||||
<Popover content={menu} visible={item.visible} overlayClassName="menuPanels" placement="top">
|
<Popover content={menu} visible={item.visible} overlayClassName="menuPanels" placement="top">
|
||||||
<Link key={key} to={`/${item.login}`}>
|
<Link key={key} to={`/${item.login}`}>
|
||||||
|
@ -165,10 +172,9 @@ function Contributors({contributors,owner,projectsId,currentLogin}){
|
||||||
</Popover>
|
</Popover>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
:""
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>:""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default Contributors;
|
export default Contributors;
|
|
@ -1,18 +1,41 @@
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { FlexAJ } from '../Component/layout';
|
import { FlexAJ } from '../Component/layout';
|
||||||
|
import { Divider } from 'antd';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
function LanguagePower({languages}){
|
function LanguagePower({owner,projectsId}){
|
||||||
const [ array , setArray ] = useState(undefined);
|
const [ array , setArray ] = useState(undefined);
|
||||||
|
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if(languages){
|
getData();
|
||||||
let arr = [];
|
},[])
|
||||||
Object.keys(languages).map((item,key)=>{
|
|
||||||
arr.push({name:item,percent:languages[item],color:getColor()});
|
function getData(){
|
||||||
})
|
const url = `/${owner}/${projectsId}/languages.json`;
|
||||||
setArray(arr);
|
axios.get(url).then(result=>{
|
||||||
}
|
if(result){
|
||||||
},[languages])
|
let languages = result.data;
|
||||||
|
if(languages){
|
||||||
|
let arr = [];
|
||||||
|
Object.keys(languages).map((item,key)=>{
|
||||||
|
arr.push({name:item,percent:languages[item],color:getColor()});
|
||||||
|
})
|
||||||
|
setArray(arr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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(){
|
function getColor(){
|
||||||
let str = "#";
|
let str = "#";
|
||||||
|
@ -24,7 +47,9 @@ function LanguagePower({languages}){
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
return(
|
return(
|
||||||
|
(array && array.length > 0) ?
|
||||||
<div>
|
<div>
|
||||||
|
<Divider />
|
||||||
<p className="font-16 color-ooo aboutSubTitle">开发语言</p>
|
<p className="font-16 color-ooo aboutSubTitle">开发语言</p>
|
||||||
<div className="progress">
|
<div className="progress">
|
||||||
{
|
{
|
||||||
|
@ -47,8 +72,7 @@ function LanguagePower({languages}){
|
||||||
}
|
}
|
||||||
</FlexAJ>
|
</FlexAJ>
|
||||||
}
|
}
|
||||||
|
</div>:""
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default LanguagePower;
|
export default LanguagePower;
|
|
@ -17,7 +17,6 @@ import './header.scss';
|
||||||
import NoticeContent from './NoticeContent';
|
import NoticeContent from './NoticeContent';
|
||||||
import MainLogo from './img/logo.png';
|
import MainLogo from './img/logo.png';
|
||||||
// TODO 这部分脚本从公共脚本中直接调用
|
// TODO 这部分脚本从公共脚本中直接调用
|
||||||
let old_url;
|
|
||||||
|
|
||||||
window._header_componentHandler = null;
|
window._header_componentHandler = null;
|
||||||
// 非trustie链接则新开页跳转
|
// 非trustie链接则新开页跳转
|
||||||
|
@ -197,12 +196,19 @@ class NewHeader extends Component {
|
||||||
|
|
||||||
matchpaths = (url) => {
|
matchpaths = (url) => {
|
||||||
const { match } = this.props;
|
const { match } = this.props;
|
||||||
if(url){
|
const isDev = window.location.port == 3007;
|
||||||
if (match.path.indexOf(url) > -1) {
|
const isdev2= isDev ?'https://testforgeplus.trustie.net':`https://${window.location.hostname}`;
|
||||||
return true
|
let str = "";
|
||||||
}else {
|
if(url.indexOf("http")>-1){
|
||||||
return false
|
str = isdev2+match.path;
|
||||||
}
|
}else{
|
||||||
|
str = match.path;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (url && str === url) {
|
||||||
|
return true
|
||||||
|
}else {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,82 +278,6 @@ class NewHeader extends Component {
|
||||||
settings,
|
settings,
|
||||||
visible,
|
visible,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
/*用户名称 用户头像url*/
|
|
||||||
// let activeIndex = false;
|
|
||||||
// let activeForums = false;
|
|
||||||
// let activeShixuns = false;
|
|
||||||
// let activePaths = false;
|
|
||||||
// let coursestype = false;
|
|
||||||
// let activePackages = false;
|
|
||||||
// let activeMoopCases = false;
|
|
||||||
// let activeCompetitions = false;
|
|
||||||
|
|
||||||
// if (match.path === '/forums') {
|
|
||||||
// activeForums = true;
|
|
||||||
// } else if (match.path.startsWith('/shixuns')) {
|
|
||||||
// activeShixuns = true;
|
|
||||||
// } else if (match.path.startsWith('/paths')) {
|
|
||||||
// activePaths = true;
|
|
||||||
// } else if (match.path.startsWith('/courses')) {
|
|
||||||
// coursestype = true;
|
|
||||||
// } else if (match.path.startsWith('/crowdsourcing')) {
|
|
||||||
// activePackages = true;
|
|
||||||
// } else if (match.path.startsWith('/moop_cases')) {
|
|
||||||
// activeMoopCases = true;
|
|
||||||
// } else if (match.path.startsWith('/competitions')) {
|
|
||||||
// activeCompetitions = true;
|
|
||||||
// } else {
|
|
||||||
// activeIndex = true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let headtypes = '/';
|
|
||||||
// if (settings) {
|
|
||||||
// if (settings.navbar) {
|
|
||||||
// if (settings.navbar.length > 0) {
|
|
||||||
// if (match.path === '/') {
|
|
||||||
// if (headtypesonClickbool === false) {
|
|
||||||
// headtypes = undefined;
|
|
||||||
// } else {
|
|
||||||
// headtypes = headtypess;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// for (var i = 0; i < settings.navbar.length; i++) {
|
|
||||||
// if (match.path === settings.navbar[i].link) {
|
|
||||||
// headtypes = settings.navbar[i].link;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// let shixuntype = false;
|
|
||||||
// let pathstype = false;
|
|
||||||
// let coursestypes = false;
|
|
||||||
// if (this.props && this.props.mygetHelmetapi != null) {
|
|
||||||
// let shixun = "/shixuns";
|
|
||||||
// let paths = "/paths";
|
|
||||||
// let courses = "/courses";
|
|
||||||
// this.props.mygetHelmetapi && this.props.mygetHelmetapi.navbar && this.props.mygetHelmetapi.navbar.map((item, key) => {
|
|
||||||
// var reg = RegExp(item.link);
|
|
||||||
// if (shixun.match(reg)) {
|
|
||||||
// if (item.hidden === true) {
|
|
||||||
// shixuntype = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (paths.match(reg)) {
|
|
||||||
// if (item.hidden === true) {
|
|
||||||
// pathstype = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (courses.match(reg)) {
|
|
||||||
// if (item.hidden === true) {
|
|
||||||
// coursestypes = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
let search_url = settings && settings.common && settings.common.search;
|
let search_url = settings && settings.common && settings.common.search;
|
||||||
return (
|
return (
|
||||||
<div className={publicNav ? `newHeaders publicNav`:`newHeaders`} id="nHeader">
|
<div className={publicNav ? `newHeaders publicNav`:`newHeaders`} id="nHeader">
|
||||||
|
@ -405,7 +335,7 @@ class NewHeader extends Component {
|
||||||
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
|
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
|
||||||
var wl = waiLian && waiLian.length>0;
|
var wl = waiLian && waiLian.length>0;
|
||||||
return (
|
return (
|
||||||
<li key={key} onClick={() => this.headtypesonClick(item.link, true)} className={`${this.matchpaths(item.link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}>
|
<li key={key} onClick={() => this.headtypesonClick(item.link, true)} className={`${this.matchpaths(new_link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}>
|
||||||
<a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a>
|
<a href={new_link} target={wl ? "_self":"_blank"}>{item.name}</a>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
|
@ -436,7 +366,6 @@ class NewHeader extends Component {
|
||||||
>
|
>
|
||||||
<Link to={"/settings/notice"} className="message-icon">
|
<Link to={"/settings/notice"} className="message-icon">
|
||||||
{current_user && <Badge count={current_user.message_unread_total}>
|
{current_user && <Badge count={current_user.message_unread_total}>
|
||||||
{/* <i className="iconfont icon-xiaoxilingdang ml15 mr15"></i> */}
|
|
||||||
<img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/>
|
<img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/>
|
||||||
</Badge>}
|
</Badge>}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -23,6 +23,7 @@ import Nodata from '../Nodata';
|
||||||
import Invite from './sub/Invite';
|
import Invite from './sub/Invite';
|
||||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
import RenderHtml from '../../components/render-html';
|
import RenderHtml from '../../components/render-html';
|
||||||
|
import { Base64 } from 'js-base64';
|
||||||
/**
|
/**
|
||||||
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
||||||
*/
|
*/
|
||||||
|
@ -279,6 +280,7 @@ function CoderDepot(props){
|
||||||
// 子目录路径返回链接
|
// 子目录路径返回链接
|
||||||
function returnUlr(url){
|
function returnUlr(url){
|
||||||
let enBranch = turnbar(branchName);
|
let enBranch = turnbar(branchName);
|
||||||
|
setType('dir');
|
||||||
props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
|
props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
|
||||||
}
|
}
|
||||||
// 点击跳转到子目录
|
// 点击跳转到子目录
|
||||||
|
@ -319,9 +321,9 @@ function CoderDepot(props){
|
||||||
const downloadMenu = (
|
const downloadMenu = (
|
||||||
<CloneAddress
|
<CloneAddress
|
||||||
http_url={projectDetail && projectDetail.clone_url}
|
http_url={projectDetail && projectDetail.clone_url}
|
||||||
ssh_url = {projectDetail && projectDetail.ssh_url}
|
ssh_url = {(projectDetail && props && props.platform) && projectDetail.ssh_url}
|
||||||
zip_url={zip_url}
|
zip_url={(props && props.platform) && zip_url}
|
||||||
tar_url={tar_url}
|
tar_url={(props && props.platform) && tar_url}
|
||||||
showNotification={props.showNotification}/>
|
showNotification={props.showNotification}/>
|
||||||
)
|
)
|
||||||
// 确认修改简介、website、实践课程链接
|
// 确认修改简介、website、实践课程链接
|
||||||
|
@ -351,7 +353,7 @@ function CoderDepot(props){
|
||||||
|
|
||||||
const { current_user } = props;
|
const { current_user } = props;
|
||||||
const baseOper = current_user && current_user.login && issuesFlag;
|
const baseOper = current_user && current_user.login && issuesFlag;
|
||||||
const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type !== 2 && pullsFlag;
|
const baseOperate = projectDetail && projectDetail.permission && projectDetail.permission !=="Reporter" && projectDetail.type !== 2 && pullsFlag && props.platform;
|
||||||
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin));
|
const fileOperate = type === "dir" && projectDetail && projectDetail.type !== 2 && ((projectDetail.permission && projectDetail.permission !=="Reporter") || (current_user && current_user.admin));
|
||||||
|
|
||||||
return(
|
return(
|
||||||
|
@ -401,7 +403,7 @@ function CoderDepot(props){
|
||||||
<span>分支:<span className="color-grey-6">{branchName || defaultBranch}</span></span>
|
<span>分支:<span className="color-grey-6">{branchName || defaultBranch}</span></span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
treeValuePath && treeValuePath.length > 0 ?
|
treeValuePath && treeValuePath.length > 0 ?
|
||||||
<Path
|
<Path
|
||||||
identifier={projectDetail && projectDetail.identifier}
|
identifier={projectDetail && projectDetail.identifier}
|
||||||
|
@ -413,18 +415,35 @@ function CoderDepot(props){
|
||||||
:
|
:
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<AlignCenter className="mr20">
|
<AlignCenter className="mr20">
|
||||||
<Link to={`/${owner}/${projectsId}/branches`} className="iconBtn">
|
{
|
||||||
<i className="iconfont icon-master_icon font-16"></i>
|
props.platform ?
|
||||||
<span>分支</span>
|
<Link to={`/${owner}/${projectsId}/branches`} className="iconBtn">
|
||||||
<span>{projectDetail && projectDetail.branches_count}</span>
|
<i className="iconfont icon-master_icon font-16"></i>
|
||||||
</Link>
|
<span>分支</span>
|
||||||
|
<span>{projectDetail && projectDetail.branches_count}</span>
|
||||||
|
</Link>
|
||||||
|
:
|
||||||
|
<span>
|
||||||
|
<i className="iconfont icon-master_icon font-16 color-grey-6"></i>
|
||||||
|
<span className="ml3 color-grey-6">分支</span>
|
||||||
|
<span className="ml3">{projectDetail && projectDetail.branches_count}</span>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
</AlignCenter>
|
</AlignCenter>
|
||||||
<AlignCenter className="mr20">
|
<AlignCenter className="mr20">
|
||||||
|
{
|
||||||
|
props.platform ?
|
||||||
<Link to={`/${owner}/${projectsId}/tags`} className="iconBtn">
|
<Link to={`/${owner}/${projectsId}/tags`} className="iconBtn">
|
||||||
<i className="iconfont icon-biaoqianicon font-16"></i>
|
<i className="iconfont icon-biaoqianicon font-16"></i>
|
||||||
<span>标签</span>
|
<span>标签</span>
|
||||||
<span>{projectDetail && projectDetail.tags_count}</span>
|
<span>{projectDetail && projectDetail.tags_count}</span>
|
||||||
</Link>
|
</Link>:
|
||||||
|
<span>
|
||||||
|
<i className="iconfont icon-biaoqianicon font-16 color-grey-6"></i>
|
||||||
|
<span className="ml3 color-grey-6">标签</span>
|
||||||
|
<span className="ml3">{projectDetail && projectDetail.tags_count}</span>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
</AlignCenter>
|
</AlignCenter>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
|
@ -463,12 +482,18 @@ function CoderDepot(props){
|
||||||
(dirInfo && dirInfo.length>0) || fileInfo ?
|
(dirInfo && dirInfo.length>0) || fileInfo ?
|
||||||
<div className="listtable">
|
<div className="listtable">
|
||||||
{
|
{
|
||||||
lastCommit &&
|
((lastCommit && lastCommit.message) || lastCommitAuthor) &&
|
||||||
<div className="listtablehead">
|
<div className="listtablehead">
|
||||||
<User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/>
|
{
|
||||||
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}>
|
lastCommitAuthor &&
|
||||||
<pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}><RenderHtml value={lastCommit.message}/></Link></pre>
|
<User url={getImageUrl(`/${lastCommitAuthor.image_url}`)} name={lastCommitAuthor.name} id={lastCommitAuthor.id} login={lastCommitAuthor.login}/>
|
||||||
</div>
|
}
|
||||||
|
{
|
||||||
|
lastCommit.message &&
|
||||||
|
<div className={hideBtn && hide ? "ellipsistxt hidetxt" :"ellipsistxt"}>
|
||||||
|
<pre id="ptxt"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(lastCommit.sha)}`}><RenderHtml value={lastCommit.message}/></Link></pre>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }
|
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }
|
||||||
|
|
||||||
<span className="ml20 color-grey-6 font-12 mt3">{lastCommit.time_from_now}</span>
|
<span className="ml20 color-grey-6 font-12 mt3">{lastCommit.time_from_now}</span>
|
||||||
|
@ -490,6 +515,7 @@ function CoderDepot(props){
|
||||||
item={item}
|
item={item}
|
||||||
projectsId={projectsId}
|
projectsId={projectsId}
|
||||||
goToSubRoot={goToSubRoot}
|
goToSubRoot={goToSubRoot}
|
||||||
|
platform={props.platform}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
@ -569,7 +595,7 @@ function CoderDepot(props){
|
||||||
}
|
}
|
||||||
{/* 发布 */}
|
{/* 发布 */}
|
||||||
{
|
{
|
||||||
releaseVersions &&
|
releaseVersions && props.platform &&
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Divider />
|
<Divider />
|
||||||
<Releases
|
<Releases
|
||||||
|
@ -582,17 +608,9 @@ function CoderDepot(props){
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
{/* 贡献者 */}
|
{/* 贡献者 */}
|
||||||
{
|
<Contributors owner={owner} projectsId={projectsId} />
|
||||||
projectDetail && projectDetail.contributors && projectDetail.contributors.total_count >0 &&
|
|
||||||
<Contributors contributors={projectDetail.contributors} owner={owner} projectsId={projectsId} />
|
|
||||||
}
|
|
||||||
{/* 语言 */}
|
{/* 语言 */}
|
||||||
{ projectDetail && projectDetail.languages &&
|
<LanguagePower owner={owner} projectsId={projectsId}/>
|
||||||
<React.Fragment>
|
|
||||||
<Divider />
|
|
||||||
<LanguagePower languages={projectDetail.languages}/>
|
|
||||||
</React.Fragment>
|
|
||||||
}
|
|
||||||
</Gap>
|
</Gap>
|
||||||
</ShortWidth>
|
</ShortWidth>
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,13 +8,18 @@ const typeIco = {
|
||||||
"dir":"icon-wenjianjia4 font-15 color-blue_4C"
|
"dir":"icon-wenjianjia4 font-15 color-blue_4C"
|
||||||
}
|
}
|
||||||
|
|
||||||
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
|
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId , platform }){
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<span>
|
<span>
|
||||||
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}>
|
{
|
||||||
<i className={`iconfont ${typeIco[`${item.type}`]} mr8`}></i>{item.name}
|
(!platform && item.image_type) ?
|
||||||
</a>
|
<span><i className={`iconfont ${typeIco[`${item.type}`]} mr8`}></i>{item.name}</span>
|
||||||
|
:
|
||||||
|
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}>
|
||||||
|
<i className={`iconfont ${typeIco[`${item.type}`]} mr8`}></i>{item.name}
|
||||||
|
</a>
|
||||||
|
}
|
||||||
</span>
|
</span>
|
||||||
<span title="init project">
|
<span title="init project">
|
||||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}>
|
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.commit && item.commit.sha}`)}`} title={item.commit && item.commit.message}>
|
||||||
|
|
|
@ -133,7 +133,7 @@ class CoderRootCommit extends Component{
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
const { commitDatas , dataCount , limit , page , isSpining , branchList } = this.state;
|
const { commitDatas , dataCount , limit , page , isSpining , branchList } = this.state;
|
||||||
const { projectDetail, commit_class , defaultBranch } = this.props;
|
const { projectDetail, commit_class , defaultBranch , platform } = this.props;
|
||||||
const { projectsId , owner , branchName } = this.props.match.params;
|
const { projectsId , owner , branchName } = this.props.match.params;
|
||||||
let branch = returnbar(branchName || defaultBranch);
|
let branch = returnbar(branchName || defaultBranch);
|
||||||
return(
|
return(
|
||||||
|
@ -159,7 +159,16 @@ class CoderRootCommit extends Component{
|
||||||
<div className="commitList-item f-wrap-between">
|
<div className="commitList-item f-wrap-between">
|
||||||
<div>
|
<div>
|
||||||
<AlignTop>
|
<AlignTop>
|
||||||
<div className="commitDesc"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="font-14 color-grey-3 font-bd"><RenderHtml value={item.message}/></Link></div>
|
<div className="commitDesc">
|
||||||
|
{
|
||||||
|
platform ?
|
||||||
|
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`} className="font-14 color-grey-3 font-bd">
|
||||||
|
<RenderHtml value={item.message}/>
|
||||||
|
</Link>
|
||||||
|
:
|
||||||
|
<RenderHtml value={item.message}/>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</AlignTop>
|
</AlignTop>
|
||||||
<p className="f-wrap-alignCenter mt15 pb5">
|
<p className="f-wrap-alignCenter mt15 pb5">
|
||||||
<User
|
<User
|
||||||
|
@ -176,7 +185,12 @@ class CoderRootCommit extends Component{
|
||||||
<div>
|
<div>
|
||||||
<span className="treecopy-cont shadow">
|
<span className="treecopy-cont shadow">
|
||||||
<img src={Tree} alt="sha" width={"16px"}/>
|
<img src={Tree} alt="sha" width={"16px"}/>
|
||||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`}>{truncateCommitId(`${item.sha}`)}</Link>
|
{
|
||||||
|
platform ?
|
||||||
|
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}`}>{truncateCommitId(`${item.sha}`)}</Link>
|
||||||
|
:
|
||||||
|
<span style={{color:"#466AFF",cursor:"default"}}>{truncateCommitId(`${item.sha}`)}</span>
|
||||||
|
}
|
||||||
<input type="text" id={`value${k}`} value={`${truncateCommitId(`${item.sha}`)}`}/>
|
<input type="text" id={`value${k}`} value={`${truncateCommitId(`${item.sha}`)}`}/>
|
||||||
</span>
|
</span>
|
||||||
<CopyTool beforeText="复制commit id" afterText="复制成功" inputId={`value${k}`}/>
|
<CopyTool beforeText="复制commit id" afterText="复制成功" inputId={`value${k}`}/>
|
||||||
|
|
|
@ -507,6 +507,7 @@ class Detail extends Component {
|
||||||
<Link to={`/${owner}/${projectsId}`} className="projectN mt6">{projectDetail && projectDetail.name}</Link>
|
<Link to={`/${owner}/${projectsId}`} className="projectN mt6">{projectDetail && projectDetail.name}</Link>
|
||||||
</div>
|
</div>
|
||||||
{projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
|
{projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
|
||||||
|
{ !platform && <span className="privateTag red mt6">只读</span> }
|
||||||
</AlignTop>
|
</AlignTop>
|
||||||
<div className="mt8">
|
<div className="mt8">
|
||||||
{
|
{
|
||||||
|
|
|
@ -246,11 +246,14 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
border-bottom: 1px solid #d9d9d9;
|
|
||||||
padding:12px 20px 11px;
|
padding:12px 20px 11px;
|
||||||
border-radius: 4px 4px 0px 0px;
|
border-radius: 4px 4px 0px 0px;
|
||||||
border: 1px solid rgba(42, 97, 255, 0.23);
|
border: 1px solid rgba(42, 97, 255, 0.23);
|
||||||
|
border-bottom: none;
|
||||||
background-color: #FAFCFF;
|
background-color: #FAFCFF;
|
||||||
|
&+.listtablebody{
|
||||||
|
border-top-color: rgba(42, 97, 255, 0.23);
|
||||||
|
}
|
||||||
.ellipsistxt{
|
.ellipsistxt{
|
||||||
&:hover .markdown-body{
|
&:hover .markdown-body{
|
||||||
color: #466AFF;
|
color: #466AFF;
|
||||||
|
@ -331,7 +334,6 @@
|
||||||
.listtablebody{
|
.listtablebody{
|
||||||
border-radius:0px 0px 4px 4px ;
|
border-radius:0px 0px 4px 4px ;
|
||||||
border: 1px solid #D0D0D0;
|
border: 1px solid #D0D0D0;
|
||||||
border-top: none;
|
|
||||||
li.listtablepath{
|
li.listtablepath{
|
||||||
a{color: #40a9ff;}
|
a{color: #40a9ff;}
|
||||||
p{
|
p{
|
||||||
|
|
|
@ -4,18 +4,21 @@ import SubBanner from './SubBanner';
|
||||||
import SubUnitBanner from './SubUnitBanner';
|
import SubUnitBanner from './SubUnitBanner';
|
||||||
import Icon from '../img/index/icon.png';
|
import Icon from '../img/index/icon.png';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { Spin } from 'antd';
|
import { Spin , Input } from 'antd';
|
||||||
import SubList from './SubList';
|
import SubList from './SubList';
|
||||||
import more from '../img/index/more.png';
|
import more from '../img/index/more.png';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
import Nodata from '../../Nodata';
|
import Nodata from '../../Nodata';
|
||||||
|
|
||||||
|
const { Search } = Input;
|
||||||
|
|
||||||
const LIMIT = 20;
|
const LIMIT = 20;
|
||||||
function Index() {
|
function Index() {
|
||||||
|
|
||||||
const [ cateList , setCateList ] = useState(undefined);
|
const [ cateList , setCateList ] = useState(undefined);
|
||||||
const [ projectsList , setProjectsList ] = useState(undefined);
|
const [ projectsList , setProjectsList ] = useState(undefined);
|
||||||
|
const [ search , setSearch ] = useState(undefined);
|
||||||
const [ cateID, setCateID ] = useState(undefined);
|
const [ cateID, setCateID ] = useState(undefined);
|
||||||
const [ isSpin, setIsSpin ] = useState(true);
|
const [ isSpin, setIsSpin ] = useState(true);
|
||||||
|
|
||||||
|
@ -37,13 +40,14 @@ function Index() {
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProject() {
|
function getProject(searchValue) {
|
||||||
const url = `/projects.json`;
|
const url = `/projects.json`;
|
||||||
axios.get(url,{
|
axios.get(url,{
|
||||||
params:{
|
params:{
|
||||||
pinned:"d",
|
pinned:"d",
|
||||||
category_id:cateID,
|
category_id:cateID,
|
||||||
limit:LIMIT
|
limit:LIMIT,
|
||||||
|
search:searchValue
|
||||||
}
|
}
|
||||||
}).then(result=>{
|
}).then(result=>{
|
||||||
if(result && result.data){
|
if(result && result.data){
|
||||||
|
@ -52,6 +56,15 @@ function Index() {
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeSearchValue(e){
|
||||||
|
setSearch(e.target.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchFun(value){
|
||||||
|
setIsSpin(true);
|
||||||
|
getProject(value);
|
||||||
|
}
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<div>
|
||||||
|
@ -74,6 +87,18 @@ function Index() {
|
||||||
<div className="leftLists">
|
<div className="leftLists">
|
||||||
<div className="leftTitles">
|
<div className="leftTitles">
|
||||||
<span>开源项目</span>
|
<span>开源项目</span>
|
||||||
|
|
||||||
|
<Search
|
||||||
|
placeholder="输入项目名称关键字进行搜索"
|
||||||
|
enterButton="搜索"
|
||||||
|
size="middle"
|
||||||
|
onSearch={searchFun}
|
||||||
|
className="list-r-Search"
|
||||||
|
value={search}
|
||||||
|
onChange={changeSearchValue}
|
||||||
|
style={{width:"300px"}}
|
||||||
|
allowClear={true}
|
||||||
|
/>
|
||||||
<Link to={`/explore/all`} target="_blank">更多<i className="iconfont icon-triangle font-12"></i></Link>
|
<Link to={`/explore/all`} target="_blank">更多<i className="iconfont icon-triangle font-12"></i></Link>
|
||||||
</div>
|
</div>
|
||||||
<Spin spinning={isSpin}>
|
<Spin spinning={isSpin}>
|
||||||
|
@ -85,7 +110,14 @@ function Index() {
|
||||||
projectsList.map((i,k)=>{
|
projectsList.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<li>
|
<li>
|
||||||
<Link to={`/${i.author && i.author.login}`} target="_blank"><img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" /></Link>
|
{
|
||||||
|
i.platform === "educoder" ?
|
||||||
|
<a href="javascript:void(0)" style={{cursor:"default"}}>
|
||||||
|
<img className="p-r-photo" alt="" src={i.author && i.author.image_url} ></img>
|
||||||
|
</a>
|
||||||
|
:
|
||||||
|
<Link to={`/${i.author && i.author.login}`} target="_blank"><img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" /></Link>
|
||||||
|
}
|
||||||
<div className="itemTitle">
|
<div className="itemTitle">
|
||||||
<div className="item-title-infos">
|
<div className="item-title-infos">
|
||||||
<Link to={`/${i.author && i.author.login}/${i.identifier}`} target="_blank" className="infotitle task-hide">{i.author && i.author.name}/{i.name}</Link>
|
<Link to={`/${i.author && i.author.login}/${i.identifier}`} target="_blank" className="infotitle task-hide">{i.author && i.author.name}/{i.name}</Link>
|
||||||
|
|
|
@ -350,7 +350,15 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
border-bottom: 1px solid rgba(153, 153, 153, 0.16);
|
border-bottom: 1px solid rgba(153, 153, 153, 0.16);
|
||||||
padding:0px 20px;
|
padding:0px 20px;
|
||||||
span{
|
.ant-btn-primary{
|
||||||
|
background-color: #466AFF;
|
||||||
|
border-color: #466AFF;
|
||||||
|
&:hover,&:active{
|
||||||
|
background-color: rgba(70,106,255,0.8);
|
||||||
|
border-color: rgba(70,106,255,0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&>span{
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
|
|
@ -23,27 +23,41 @@ const settings = {
|
||||||
autoplay:true,
|
autoplay:true,
|
||||||
arrows:false
|
arrows:false
|
||||||
};
|
};
|
||||||
const group_size = 6;
|
// const group_size = 6;
|
||||||
|
const list =[
|
||||||
|
[
|
||||||
|
{url:"/Huawei_Technology",avatar_url:huawei,name:"华为技术有限公司"},
|
||||||
|
{url:"/openatom_foundation",avatar_url:jijinhui,name:"开放原子开源基金会"},
|
||||||
|
{url:"/Inspur",avatar_url:langchao,name:"浪潮信息"},
|
||||||
|
{url:"/mulan-community",avatar_url:mulan,name:"木兰开源社区"},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{url:"/CrowdOS_WeSense",avatar_url:xigongye,name:"西北工业大学"},
|
||||||
|
{url:"/pkecosystem",avatar_url:feiteng,name:"PK开源生态项目组"},
|
||||||
|
{url:"/xuos",avatar_url:xiuos,name:"泛在操作系统实验室"},
|
||||||
|
{url:"/hustos",avatar_url:huake,name:"华中科技大学操作系统团队"},
|
||||||
|
]
|
||||||
|
]
|
||||||
function SubUnitBanner() {
|
function SubUnitBanner() {
|
||||||
|
|
||||||
const [ list , setlist ] = useState(undefined);
|
// const [ list , setlist ] = useState(undefined);
|
||||||
|
|
||||||
useEffect(()=>{
|
// useEffect(()=>{
|
||||||
getRecommandOrz();
|
// getRecommandOrz();
|
||||||
},[])
|
// },[])
|
||||||
|
|
||||||
function getRecommandOrz(params) {
|
// function getRecommandOrz(params) {
|
||||||
const url = `/organizations/recommend.json`;
|
// const url = `/organizations/recommend.json`;
|
||||||
axios.get(url,{
|
// axios.get(url,{
|
||||||
params:{
|
// params:{
|
||||||
group_size
|
// group_size
|
||||||
}
|
// }
|
||||||
}).then(result=>{
|
// }).then(result=>{
|
||||||
if(result){
|
// if(result){
|
||||||
setlist(result.data.organizations)
|
// setlist(result.data.organizations)
|
||||||
}
|
// }
|
||||||
}).catch(error=>{})
|
// }).catch(error=>{})
|
||||||
}
|
// }
|
||||||
return(
|
return(
|
||||||
list && list.length > 0 ?
|
list && list.length > 0 ?
|
||||||
<div className="unitBanner">
|
<div className="unitBanner">
|
||||||
|
@ -60,7 +74,7 @@ function SubUnitBanner() {
|
||||||
{
|
{
|
||||||
i.map((j,k1)=>{
|
i.map((j,k1)=>{
|
||||||
return(
|
return(
|
||||||
<Link to={j.name}><img src={getImageUrl(`/${j.avatar_url}`)} alt="" height="56px" style={{maxWidth:"180px"}}/></Link>
|
<Link to={j.url}><img src={j.avatar_url} title={j.name} alt={j.name} height="56px" style={{maxWidth:"180px"}}/></Link>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -68,12 +82,6 @@ function SubUnitBanner() {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
{/* <div className="slickline">
|
|
||||||
<a href="https://www.nwpu.edu.cn/" target="_blank"><img src={xigongye} alt="" height="56px"/></a>
|
|
||||||
<a href="https://www.phytium.com.cn/" target="_blank"><img src={feiteng} alt="" height="56px"/></a>
|
|
||||||
<a href="http://xuos.io" target="_blank"><img src={xiuos} alt="" height="56px"/></a>
|
|
||||||
<a href="https://www.hust.edu.cn/" target="_blank"><img src={huake} alt="" height="56px"/></a>
|
|
||||||
</div> */}
|
|
||||||
</Slider>
|
</Slider>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -67,16 +67,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
||||||
</li>:""
|
</li>:""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
item.menu_name === "wiki" &&
|
item.menu_name === "devops" ?
|
||||||
<li className={pathname === "wiki" ? "active" : ""}>
|
|
||||||
<Link to={{ pathname: `/${owner}/${projectsId}/wiki`, state }}>
|
|
||||||
<i className={"iconfont icon-a-wikiicon1 color-grey-3 mr5 font-14"}></i>
|
|
||||||
<span>维基(Wiki)</span>
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
item.menu_name === "devops" && platform ?
|
|
||||||
<li className={pathname==="devops" ? "active" : ""}>
|
<li className={pathname==="devops" ? "active" : ""}>
|
||||||
{/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
|
{/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
|
||||||
<Link to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
|
<Link to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
|
||||||
|
@ -99,13 +90,22 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
||||||
{
|
{
|
||||||
item.menu_name === "versions" &&
|
item.menu_name === "versions" &&
|
||||||
<li className={pathname==="milestones" ? "active" : ""}>
|
<li className={pathname==="milestones" ? "active" : ""}>
|
||||||
<Link to={{ pathname: `/${owner}/${projectsId}/milestones`, state }}>
|
<Link to={{ pathname: `/${owner}/${projectsId}/milestones`, state }}>
|
||||||
<i className={pathname==="milestones" ? "iconfont icon-lichengbeiicon color-grey-3 mr5 font-14":"iconfont icon-lichengbeiicon color-grey-6 font-14 mr5"}></i>
|
<i className={pathname==="milestones" ? "iconfont icon-lichengbeiicon color-grey-3 mr5 font-14":"iconfont icon-lichengbeiicon color-grey-6 font-14 mr5"}></i>
|
||||||
<span>里程碑</span>
|
<span>里程碑</span>
|
||||||
{projectDetail && projectDetail.versions_count ? <span className="num">{numFormat(projectDetail.versions_count)}</span> :""}
|
{projectDetail && projectDetail.versions_count ? <span className="num">{numFormat(projectDetail.versions_count)}</span> :""}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
item.menu_name === "wiki" &&
|
||||||
|
<li className={pathname === "wiki" ? "active" : ""}>
|
||||||
|
<Link to={{ pathname: `/${owner}/${projectsId}/wiki`, state }}>
|
||||||
|
<i className={"iconfont icon-a-wikiicon1 color-grey-3 mr5 font-14"}></i>
|
||||||
|
<span>维基(Wiki)</span>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
{
|
{
|
||||||
item.menu_name === "activity" &&
|
item.menu_name === "activity" &&
|
||||||
<li className={pathname==="activity" ? "active" : ""}>
|
<li className={pathname==="activity" ? "active" : ""}>
|
||||||
|
@ -116,7 +116,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
item.menu_name === "settings" &&
|
item.menu_name === "settings" && platform &&
|
||||||
<li className={pathname === "settings" ? "active" : ""}>
|
<li className={pathname === "settings" ? "active" : ""}>
|
||||||
<Link to={`/${owner}/${projectsId}/settings`}>
|
<Link to={`/${owner}/${projectsId}/settings`}>
|
||||||
<i className={url && url.indexOf("/settings") > 0 ? "iconfont icon-cangkushezhiicon color-grey-3 mr5 font-14":"iconfont icon-cangkushezhiicon color-grey-6 font-14 mr5"}></i>
|
<i className={url && url.indexOf("/settings") > 0 ? "iconfont icon-cangkushezhiicon color-grey-3 mr5 font-14":"iconfont icon-cangkushezhiicon color-grey-6 font-14 mr5"}></i>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import React , { useState } from 'react';
|
import React , { useState } from 'react';
|
||||||
import { Anchor , Input } from 'antd';
|
import { Anchor , Input } from 'antd';
|
||||||
import './sub.scss';
|
import './sub.scss';
|
||||||
import { useEffect } from 'react';
|
|
||||||
|
|
||||||
const { Link } = Anchor;
|
const { Link } = Anchor;
|
||||||
|
|
||||||
|
@ -40,7 +39,7 @@ function ReadmeCatelogue({ menuList , hash }) {
|
||||||
{
|
{
|
||||||
menu.map((item,key)=>{
|
menu.map((item,key)=>{
|
||||||
return(
|
return(
|
||||||
<div style={{paddingLeft:`${item.level *10}px`}} className={goHref===item.href?"items active":"items"}>
|
<div style={{paddingLeft:`${item.level *15}px`}} className={goHref===item.href?"items active":"items"}>
|
||||||
<Link href={`#${item.text}`} title={item.text} />
|
<Link href={`#${item.text}`} title={item.text} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -34,10 +34,17 @@
|
||||||
padding:15px;
|
padding:15px;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
.ant-anchor{
|
||||||
|
padding-left: 0px!important;
|
||||||
|
.ant-anchor-ink::before{
|
||||||
|
width: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.ant-anchor-wrapper{
|
.ant-anchor-wrapper{
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
padding:5px 15px;
|
padding:5px 0px;
|
||||||
max-height: 255px!important;
|
max-height: 255px!important;
|
||||||
|
padding-left: 0px!important;
|
||||||
.items{
|
.items{
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
|
|
@ -5,11 +5,21 @@ import { Link } from 'react-router-dom';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
import { Dropdown , Menu , Spin } from 'antd';
|
import { Dropdown , Menu , Spin } from 'antd';
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
|
import { Base64 } from 'js-base64';
|
||||||
|
|
||||||
import Tree from '../img/tree.png';
|
import Tree from '../img/tree.png';
|
||||||
import Axios from 'axios';
|
import Axios from 'axios';
|
||||||
|
|
||||||
function turnbar(str){
|
function turnbar(str){
|
||||||
|
// const s = '!!@/::"“”<《》>||??%$¥';
|
||||||
|
// for(var i=0;i<s.length;i++){
|
||||||
|
// let s1 = s[i];
|
||||||
|
// if(str.indexOf(s1) > -1){
|
||||||
|
// return Base64.encode(str);
|
||||||
|
// }else{
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
if(str && str.length>0 && str.indexOf("/")>-1){
|
if(str && str.length>0 && str.indexOf("/")>-1){
|
||||||
return str.replaceAll('/','%2F');
|
return str.replaceAll('/','%2F');
|
||||||
}
|
}
|
||||||
|
@ -91,7 +101,7 @@ function Index(props) {
|
||||||
<div className="treeabout">
|
<div className="treeabout">
|
||||||
{
|
{
|
||||||
(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
|
(isManager || isDeveloper) && (projectDetail && projectDetail.type!==2) &&
|
||||||
<Link to={`/${owner}/${projectsId}/compare/master...${i.name}`} className="btn-83">+ 合并请求</Link>
|
<Link to={`/${owner}/${projectsId}/compare/master...${turnbar(i.name)}`} className="btn-83">+ 合并请求</Link>
|
||||||
}
|
}
|
||||||
<Dropdown overlay={menu(i.zip_url,i.tar_url)} trigger={['click']} placement="bottomRight">
|
<Dropdown overlay={menu(i.zip_url,i.tar_url)} trigger={['click']} placement="bottomRight">
|
||||||
<a className="btn-83 ml15">下载<i className="iconfont icon-sanjiaoxing-down font-14"></i></a>
|
<a className="btn-83 ml15">下载<i className="iconfont icon-sanjiaoxing-down font-14"></i></a>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { Form, Popconfirm, Tag, Spin } from "antd";
|
||||||
import Attachments from "../Upload/attachment";
|
import Attachments from "../Upload/attachment";
|
||||||
import RenderHtml from "../../components/render-html";
|
import RenderHtml from "../../components/render-html";
|
||||||
import Comments from "../comments/comments";
|
import Comments from "../comments/comments";
|
||||||
|
import Claims from "../claims/claims"
|
||||||
import "./order.css";
|
import "./order.css";
|
||||||
|
|
||||||
class Detail extends Component {
|
class Detail extends Component {
|
||||||
|
@ -310,6 +311,10 @@ class Detail extends Component {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="list-left list-left-padding">
|
<div className="list-left list-left-padding">
|
||||||
|
<div className="list-right-item-padding background-f boder-4">
|
||||||
|
<Claims issue_id={orderId} {...this.props} />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="list-right-item-padding background-f boder-4">
|
<div className="list-right-item-padding background-f boder-4">
|
||||||
<p className="grid-item-left pb15">
|
<p className="grid-item-left pb15">
|
||||||
<span className="issue_detail_info">负责人:</span>
|
<span className="issue_detail_info">负责人:</span>
|
||||||
|
|
|
@ -130,7 +130,7 @@ class order_form extends Component {
|
||||||
let data ={
|
let data ={
|
||||||
//指定指派成员,类型:缺陷,优先度:正常,issue状态:新增
|
//指定指派成员,类型:缺陷,优先度:正常,issue状态:新增
|
||||||
tracker_id: "1",
|
tracker_id: "1",
|
||||||
assigned_to_id: window.location.host === "gitlink.org.cn" ? "86107":"36480",
|
assigned_to_id: window.location.host === "www.gitlink.org.cn" ? "86107":"36480",
|
||||||
priority_id: "2",
|
priority_id: "2",
|
||||||
status_id: "1",
|
status_id: "1",
|
||||||
description:"####问题描述\n\n\n####重现问题步骤\n\n\n####截图\n\n\n####建议解决办法\n",
|
description:"####问题描述\n\n\n####重现问题步骤\n\n\n####截图\n\n\n####建议解决办法\n",
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Badge, Button, Checkbox, Menu, Pagination } from 'antd';
|
import { Badge, Checkbox, Menu, Pagination } from 'antd';
|
||||||
import DelModal from '../../../Component/ModalFun';
|
import DelModal from '../../../Component/ModalFun';
|
||||||
import NoneData from '../../../Nodata.js';
|
import NoneData from '../../../Nodata.js';
|
||||||
import { noticeSourceType } from '../../../common/static';
|
import { noticeSourceType } from '../../../common/static';
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
import '../manager/Index.scss'
|
import '../manager/Index.scss';
|
||||||
|
import { getImageUrl } from 'educoder';
|
||||||
|
|
||||||
|
|
||||||
function MyNotice(props) {
|
function MyNotice(props) {
|
||||||
let { current_user, resetUserInfo, location, mygetHelmetapi, history}= props;
|
let { current_user, resetUserInfo, location, mygetHelmetapi, history}= props;
|
||||||
|
@ -227,7 +228,7 @@ function MyNotice(props) {
|
||||||
<div className={`mynotice-content vertical-center-style ${isBatchDelete?'batchDel':''}`} key={item.id}>
|
<div className={`mynotice-content vertical-center-style ${isBatchDelete?'batchDel':''}`} key={item.id}>
|
||||||
<div className="mynotice-cont vertical-center-style">
|
<div className="mynotice-cont vertical-center-style">
|
||||||
<Checkbox value={item.id} className={isBatchDelete ? 'visible-checkbox' : 'invisible-checkbox'} onChange={onChange} checked={item.checkedBatch}></Checkbox>
|
<Checkbox value={item.id} className={isBatchDelete ? 'visible-checkbox' : 'invisible-checkbox'} onChange={onChange} checked={item.checkedBatch}></Checkbox>
|
||||||
{item.sender && <img src={`https://testforgeplus.trustie.net//${item.sender.image_url}`} className="currentImg" onClick={()=>{window.open(`/${item.sender && item.sender.login}`);}}/>}
|
{item.sender && <img alt="" src={getImageUrl(`/${item.sender.image_url}`)} className="currentImg" onClick={()=>{window.open(`/${item.sender && item.sender.login}`);}}/>}
|
||||||
<div className={`atme-notice-text stretch-style ${item.notification_url && 'highlightSpan'}`} onClick={() => {turnToMess(item)}}>
|
<div className={`atme-notice-text stretch-style ${item.notification_url && 'highlightSpan'}`} onClick={() => {turnToMess(item)}}>
|
||||||
{item.status === 1 ? <Badge color="#FA2020"/> : <span className="system-notice-blank"></span>}
|
{item.status === 1 ? <Badge color="#FA2020"/> : <span className="system-notice-blank"></span>}
|
||||||
{item.sender && <span className="atme-length" dangerouslySetInnerHTML={{__html: item.content}}></span>}
|
{item.sender && <span className="atme-length" dangerouslySetInnerHTML={{__html: item.content}}></span>}
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Index extends Component {
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/${owner}/${projectsId}/settings/webhooks`} className="w-100">
|
<Link to={`/${owner}/${projectsId}/settings/webhooks`} className="w-100">
|
||||||
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
|
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
|
||||||
Webhooks
|
网络钩子
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -14,10 +14,10 @@ const menu = [
|
||||||
{name:"代码库",index:"code"},
|
{name:"代码库",index:"code"},
|
||||||
{name:"易修 (Issue)",index:"issues"},
|
{name:"易修 (Issue)",index:"issues"},
|
||||||
{name:"合并请求 (PR)",index:"pulls"},
|
{name:"合并请求 (PR)",index:"pulls"},
|
||||||
{name:"维基 (Wiki)",index:"wiki"},
|
|
||||||
{name:"引擎 (Engine)",index:"devops"},
|
{name:"引擎 (Engine)",index:"devops"},
|
||||||
// {name:"资源库",index:"resources"},
|
// {name:"资源库",index:"resources"},
|
||||||
{name:"里程碑",index:"versions"},
|
{name:"里程碑",index:"versions"},
|
||||||
|
{name:"维基 (Wiki)",index:"wiki"},
|
||||||
{name:"动态",index:"activity"},
|
{name:"动态",index:"activity"},
|
||||||
]
|
]
|
||||||
class Setting extends Component {
|
class Setting extends Component {
|
||||||
|
|
|
@ -77,7 +77,7 @@ function Index(props) {
|
||||||
/>
|
/>
|
||||||
<Banner>
|
<Banner>
|
||||||
<FlexAJ>
|
<FlexAJ>
|
||||||
<span>Webhooks</span>
|
<span>Webhooks(网络钩子)</span>
|
||||||
<Button type="primary" size="large" onClick={addFunc}>添加Webhook</Button>
|
<Button type="primary" size="large" onClick={addFunc}>添加Webhook</Button>
|
||||||
</FlexAJ>
|
</FlexAJ>
|
||||||
</Banner>
|
</Banner>
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
.infoCount{
|
||||||
|
display: inline-block;
|
||||||
|
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: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuPanels{
|
||||||
|
width: 295px;
|
||||||
|
.leftline{
|
||||||
|
position: relative;
|
||||||
|
color: #666;
|
||||||
|
height: 16px;
|
||||||
|
margin-left: 14px;
|
||||||
|
font-size: 12px;
|
||||||
|
&::before{
|
||||||
|
position: absolute;
|
||||||
|
left: -7px;
|
||||||
|
top:3px;
|
||||||
|
height: 12px;
|
||||||
|
width: 1px;
|
||||||
|
background-color: #999;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.downMenu{
|
||||||
|
width: 329px;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0px 1px 8px 1px rgba(212, 212, 212, 0.5);
|
||||||
|
padding-bottom: 14px;
|
||||||
|
.ant-menu-item{
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.claimNote_input{
|
||||||
|
// up, right, botton, left
|
||||||
|
margin: 5px 10px 5px 10px;
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.claimNote{
|
||||||
|
// up, right, botton, left
|
||||||
|
margin: 5px 14px 0px 14px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
.attrPerson{
|
||||||
|
padding-top: 12px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
a{
|
||||||
|
margin: 0px 17px 10px 0px;
|
||||||
|
img{
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
&:nth-child(5n){
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,277 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import axios from "axios";
|
||||||
|
import { AlignCenter , FlexAJ } from '../Component/layout';
|
||||||
|
import { Popover, List, Button, Dropdown, Input} from "antd";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import { getImageUrl } from "educoder";
|
||||||
|
import "./claim.scss"
|
||||||
|
const { TextArea } = Input;
|
||||||
|
|
||||||
|
class claims extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
claimerdata: new Array(),
|
||||||
|
currentUserClaimed:0,
|
||||||
|
issue_id:this.props.issue_id,
|
||||||
|
claimNoteBody:'',
|
||||||
|
claimNoteBodyChanged:false,
|
||||||
|
claimNotePop:false
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
getClaimers = ()=>{
|
||||||
|
const {issue_id} = this.state;
|
||||||
|
axios.get(`/issues/${issue_id}/claims.json`)
|
||||||
|
.then((result) => {
|
||||||
|
if(result){
|
||||||
|
console.log(result.data),
|
||||||
|
this.setState({
|
||||||
|
claimerdata: result.data.claimers,
|
||||||
|
currentUserClaimed: result.data.currentUserclaimed,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
delClaim = () => {
|
||||||
|
if (this.props.checkIfLogin() === false) {
|
||||||
|
this.props.showLoginDialog();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
const {issue_id} = this.state;
|
||||||
|
axios({
|
||||||
|
method: 'delete',
|
||||||
|
url: `/issues/${issue_id}/claims.json`
|
||||||
|
}).then(result => {
|
||||||
|
this.setState({
|
||||||
|
claimerdata: result.data.claimers,
|
||||||
|
currentUserClaimed: result.data.currentUserclaimed,
|
||||||
|
claimNotePop:false,
|
||||||
|
claimNoteBody:'',
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
changeClaimNote = (e)=>{
|
||||||
|
this.setState({
|
||||||
|
claimNoteBody: e.target.value,
|
||||||
|
claimNoteBodyChanged: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
yesClaim = ()=>{
|
||||||
|
const {issue_id,claimNoteBody} = this.state;
|
||||||
|
|
||||||
|
axios.post(`/issues/${issue_id}/claims.json`, {
|
||||||
|
claim_note: claimNoteBody
|
||||||
|
})
|
||||||
|
.then(result => {
|
||||||
|
this.setState({
|
||||||
|
claimerdata: result.data.claimers,
|
||||||
|
currentUserClaimed: result.data.currentUserclaimed,
|
||||||
|
claimNotePop:false,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
addClaim = ()=> {
|
||||||
|
if (this.props.checkIfLogin() === false) {
|
||||||
|
this.props.showLoginDialog();
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
this.setState({
|
||||||
|
claimNotePop: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
updateClaim = (claimId,key)=>{
|
||||||
|
const {issue_id,claimNoteBody,claimNoteBodyChanged} = this.state;
|
||||||
|
if(claimNoteBodyChanged){
|
||||||
|
axios.put(`/issues/${issue_id}/claims.json`, {
|
||||||
|
claim_note: claimNoteBody,
|
||||||
|
claim_id: claimId
|
||||||
|
})
|
||||||
|
.then(result => {
|
||||||
|
this.setState({
|
||||||
|
claimerdata: result.data.claimers,
|
||||||
|
currentUserClaimed: result.data.currentUserclaimed,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.setVisibleFunc(false,key)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cancleClaim = ()=>{
|
||||||
|
this.setState({
|
||||||
|
claimNotePop: false,
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
componentDidMount = () => {
|
||||||
|
this.getClaimers();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
setVisibleFunc = (flag,index) => {
|
||||||
|
const {claimerdata} = this.state
|
||||||
|
var lx = claimerdata.concat();
|
||||||
|
lx.map(i=>i.visible =false);
|
||||||
|
if(flag){
|
||||||
|
lx[index].visible = flag;
|
||||||
|
}
|
||||||
|
lx.splice();
|
||||||
|
this.setState({
|
||||||
|
claimerdata:lx
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
claimerdata,
|
||||||
|
currentUserClaimed,
|
||||||
|
issue_id
|
||||||
|
} = this.state;
|
||||||
|
|
||||||
|
const rednerlist = (item)=>{
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Link to={`/${item && item.user_login}`} className="show-user-link">
|
||||||
|
<img
|
||||||
|
className="radius"
|
||||||
|
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||||
|
alt=""
|
||||||
|
width="30"
|
||||||
|
height="30"/>
|
||||||
|
</Link>
|
||||||
|
<Link to={`/${item && item.user_login}`}
|
||||||
|
className="show-user-link color-black ml10 fwb">
|
||||||
|
{item && item.user_name}
|
||||||
|
</Link>
|
||||||
|
<span className="color-grey-8"> 声明于 {item.created_at}</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderClaim = ()=>{
|
||||||
|
return(
|
||||||
|
<div className="claimNote_input">
|
||||||
|
<span> 声明留言:</span> <br/>
|
||||||
|
<TextArea rows={4} type="text" placeholder="例如可以留言你的解决思路......" onChange={this.changeClaimNote}/><br/><br/>
|
||||||
|
<div style={{display:"flex",justifyContent:'center'}}>
|
||||||
|
<Button onClick={()=>this.cancleClaim()} >取 消</Button>
|
||||||
|
<Button onClick={()=>this.yesClaim()} style={{marginLeft:"20px"}} type={'primary'} >确 认</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
const renderUser = (item,key)=>{
|
||||||
|
const { current_user} = this.props;
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<FlexAJ className="menuMaininfos">
|
||||||
|
<AlignCenter>
|
||||||
|
<Link to={`/${item && item.user_login}`} className="show-user-link">
|
||||||
|
<img
|
||||||
|
className="radius"
|
||||||
|
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||||
|
alt=""
|
||||||
|
width="30"
|
||||||
|
height="30"/>
|
||||||
|
</Link>
|
||||||
|
<Link to={`/${item && item.user_login}`}
|
||||||
|
className="show-user-link color-black ml10 fwb">
|
||||||
|
<div >
|
||||||
|
{current_user.login == item.user_login?(<div>你</div>
|
||||||
|
):(
|
||||||
|
<div>{item && item.user_name}</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
<div style={{marginLeft:"10px"}}> <span className="color-grey-8"> 声明于 {item.created_at}</span></div>
|
||||||
|
</AlignCenter>
|
||||||
|
</FlexAJ>
|
||||||
|
<div className="claimNote">
|
||||||
|
{current_user.login==item.user_login?(
|
||||||
|
<div><span>你的留言:</span><br/>
|
||||||
|
<TextArea onChange={this.changeClaimNote} type="text" defaultValue={item.note_body} /><br/>
|
||||||
|
<div style={{display:"flex",justifyContent:'center',paddingBottom:"10px",paddingTop:"10px"}}>
|
||||||
|
<Button onClick={()=>this.updateClaim(item.claim_id,key)} type={'primary'} >更新声明留言</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
):
|
||||||
|
(
|
||||||
|
<div>
|
||||||
|
{item.note_body.length==0?(
|
||||||
|
<span>未留言</span>
|
||||||
|
):(
|
||||||
|
<div><span>声明留言:</span><br/>
|
||||||
|
<span>{item.note_body}</span></div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{currentUserClaimed==1?(
|
||||||
|
<div><Button onClick={()=>this.delClaim()} > 取消声明 </Button>
|
||||||
|
</div>
|
||||||
|
):(
|
||||||
|
<Popover visible={this.state.claimNotePop} content={renderClaim()} trigger='click' placement="bottom" overlayClassName="menuPanels">
|
||||||
|
<Button onClick={()=> this.addClaim()} type="primary" className="mr15" > 声 明 </Button>
|
||||||
|
</Popover>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="ant-divider ant-divider-horizontal"> </div>
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
claimerdata.length>0?(
|
||||||
|
<div>
|
||||||
|
<span>声明要关注/解决此易修的用户</span><span className="infoCount">{claimerdata.length}</span>
|
||||||
|
<div className="attrPerson" onMouseLeave={()=>this.setVisibleFunc(false)}>
|
||||||
|
{claimerdata.map((item,key)=>{
|
||||||
|
return(
|
||||||
|
<Popover content={renderUser(item,key)} visible={item.visible} placement="top" overlayClassName="menuPanels">
|
||||||
|
<Link key={key} to={`/${item.user_login}`}>
|
||||||
|
<img src={getImageUrl(`/${item.user_picture}`)} alt="" onMouseOver={()=>this.setVisibleFunc(true,key)}/>
|
||||||
|
</Link>
|
||||||
|
</Popover>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
</div>):(
|
||||||
|
<div><span>声明要关注/解决此易修的用户</span> <span className="infoCount">0</span></div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default claims;
|
|
@ -109,7 +109,7 @@ ul,ol,dl{
|
||||||
width: 49rem;
|
width: 49rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
&:hover{
|
& a:hover{
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
& .markdown-body{
|
& .markdown-body{
|
||||||
color: #466AFF;
|
color: #466AFF;
|
||||||
|
|
|
@ -91,7 +91,7 @@ function ThirdEdition() {
|
||||||
return(
|
return(
|
||||||
<div className="thirdEdition">
|
<div className="thirdEdition">
|
||||||
<p className="title">开发者的家园</p>
|
<p className="title">开发者的家园</p>
|
||||||
<p className="subtitle">一个实现100%开源,产学研联合面向软件创新的开源社区</p>
|
<p className="subtitle">一个实现群智激发与汇聚,产学研联合面向协同创新的开源社区</p>
|
||||||
<div id="thirdUl">
|
<div id="thirdUl">
|
||||||
<ul className="thirdUl">
|
<ul className="thirdUl">
|
||||||
<li className={active===1?"active":""}onClick={()=>{setFlag(false);setActive(1)}}>
|
<li className={active===1?"active":""}onClick={()=>{setFlag(false);setActive(1)}}>
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
i.iconfont {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overflowHidden1 {
|
.overflowHidden1 {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -139,7 +139,6 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<Tabs defaultActiveKey="1" onChange={changeTab}>
|
<Tabs defaultActiveKey="1" onChange={changeTab}>
|
||||||
<TabPane tab={`项目(${totalType1})`} key={1}>
|
<TabPane tab={`项目(${totalType1})`} key={1}>
|
||||||
<div className="search-content">
|
<div className="search-content">
|
||||||
|
@ -150,13 +149,13 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
dataList.length ?
|
dataList.length ?
|
||||||
<Pagination
|
<div className="pb20"><Pagination
|
||||||
showQuickJumper={dataList.length > size}
|
showQuickJumper={dataList.length > size}
|
||||||
onChange={(page) => { setPage(page) }}
|
onChange={(page) => { setPage(page) }}
|
||||||
current={page}
|
current={page}
|
||||||
total={total}
|
total={total}
|
||||||
showTotal={total => `共 ${total} 条`}
|
showTotal={total => `共 ${total} 条`}
|
||||||
/>
|
/></div>
|
||||||
: <Nodata _html="暂无数据" className="no-data-box" />
|
: <Nodata _html="暂无数据" className="no-data-box" />
|
||||||
}
|
}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
@ -170,13 +169,13 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
dataList.length ?
|
dataList.length ?
|
||||||
<Pagination
|
<div className="pb20"><Pagination
|
||||||
showQuickJumper={dataList.length > size}
|
showQuickJumper={dataList.length > size}
|
||||||
onChange={(page) => { setPage(page) }}
|
onChange={(page) => { setPage(page) }}
|
||||||
current={page}
|
current={page}
|
||||||
total={total}
|
total={total}
|
||||||
showTotal={total => `共 ${total} 条`}
|
showTotal={total => `共 ${total} 条`}
|
||||||
/> : <Nodata _html="暂无数据" />
|
/></div> : <Nodata _html="暂无数据" />
|
||||||
}
|
}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
||||||
|
@ -227,13 +226,13 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
dataList.length ?
|
dataList.length ?
|
||||||
<Pagination
|
<div className="pb20"><Pagination
|
||||||
showQuickJumper={dataList.length > size}
|
showQuickJumper={dataList.length > size}
|
||||||
onChange={(page) => { setPage(page) }}
|
onChange={(page) => { setPage(page) }}
|
||||||
current={page}
|
current={page}
|
||||||
total={total}
|
total={total}
|
||||||
showTotal={total => `共 ${total} 条`}
|
showTotal={total => `共 ${total} 条`}
|
||||||
/> : <Nodata _html="暂无数据" />
|
/></div> : <Nodata _html="暂无数据" />
|
||||||
}
|
}
|
||||||
</TabPane>
|
</TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
Loading…
Reference in New Issue