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",
|
||||
"string-width": "^1.0.2",
|
||||
"which-module": "^1.0.0",
|
||||
"y18n": "^3.2.1",
|
||||
"yargs-parser": "^5.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -9828,6 +9829,7 @@
|
|||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^1.0.2",
|
||||
"which-module": "^1.0.0",
|
||||
"y18n": "^3.2.1",
|
||||
"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",
|
||||
"integrity": "sha1-BuDF0KaqrPsAnvVl76HIHpPZAZM="
|
||||
},
|
||||
"y18n": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.nlark.com/y18n/download/y18n-3.2.2.tgz",
|
||||
"integrity": "sha1-hckBvWRwznH8S7cjrSCbcPfyhpY="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
|
|
|
@ -3945,6 +3945,10 @@ html>body #ajax-indicator {
|
|||
margin-left: 10px;
|
||||
color: #2FC25B;
|
||||
}
|
||||
.privateTag.red{
|
||||
color: #FF6832;
|
||||
border:1px solid #FF6832;
|
||||
}
|
||||
.head-nav {
|
||||
text-align: center;
|
||||
height: 58px;
|
||||
|
|
10
src/App.js
10
src/App.js
|
@ -3,7 +3,6 @@ import './App.css';
|
|||
import { ConfigProvider } from 'antd'
|
||||
import zhCN from 'antd/lib/locale-provider/zh_CN';
|
||||
import {
|
||||
// BrowserRouter as Router,
|
||||
Route,
|
||||
Switch
|
||||
} from 'react-router-dom';
|
||||
|
@ -79,10 +78,7 @@ const OrganizeIndex = Loadable({
|
|||
loader: () => import('./forge/Team/Index'),
|
||||
loading: Loading,
|
||||
})
|
||||
const EducoderLogin = Loadable({
|
||||
loader: () => import('./modules/login/EducoderLogin'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const Search = Loadable({
|
||||
loader: () => import('./modules/search/'),
|
||||
loading: Loading,
|
||||
|
@ -283,8 +279,7 @@ class App extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { mygetHelmetapi, pathType} = this.state;
|
||||
let personal = mygetHelmetapi && mygetHelmetapi.personal;
|
||||
const { pathType } = this.state;
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<ConfigProvider locale={zhCN}>
|
||||
|
@ -437,7 +432,6 @@ class App extends Component {
|
|||
|
||||
<Route component={Shixunnopage} />
|
||||
</Switch>
|
||||
{/* </Router> */}
|
||||
</MuiThemeProvider>
|
||||
</ConfigProvider>
|
||||
</Provider>
|
||||
|
|
|
@ -82,7 +82,7 @@ function AboutUs(){
|
|||
{/* 确实开源 一脉传承 */}
|
||||
<div className="au_cont inherit pl30">
|
||||
<p className="subtitle">确实开源 一脉传承</p>
|
||||
<div>本世纪以来,随着软件创新需求和应用规模的飞速增长,软件开发队伍、开发资源、可信评估呈现出规模化、开放化、持续化的新特点,软件开发活动面临协同难、复用难、评估难的制约,经典的工程化软件开发方法面临严峻挑战,严重影响了软件开发效率和质量的提升。在此背景下,国防科技大学联合国内多所知名高校、科研机构和软件企业,围绕开源创新开展了持续性探索,构建形成了以Trustie(确实)为代表的一系列开源创新服务基础设施。自2006年以来,Trustie经过三个阶段的演化发展,于2021年迎来全面升级:在计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,共筑新一代开源创新服务平台GitLink!</div>
|
||||
<div>本世纪以来,随着软件创新需求和应用规模的飞速增长,软件开发队伍、开发资源、可信评估呈现出规模化、开放化、持续化的新特点,软件开发活动面临协同难、复用难、评估难的制约,经典的工程化软件开发方法面临严峻挑战,严重影响了软件开发效率和质量的提升。在此背景下,国防科技大学联合国内多所知名高校、科研机构和软件企业,围绕开源创新开展了持续性探索,构建形成了以Trustie(确实)为代表的一系列开源创新服务基础设施。自2006年以来,Trustie经过三个阶段的演化发展,于2021年迎来全面升级:在中国计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,共筑新一代开源创新服务平台GitLink!</div>
|
||||
<div className="inherit_items">
|
||||
<img src={quan1} className="quan1Img"/>
|
||||
<img src={quan2} className="quan2Img"/>
|
||||
|
@ -102,7 +102,7 @@ function AboutUs(){
|
|||
<Timeline.Item dot={<i className="iconfont icon-a-yuanquan2x"></i>}>
|
||||
<div className="timeline_cont">
|
||||
<p>Trustie 3.0阶段 (2020年至今)</p>
|
||||
<div>Trustie在已有的技术积累基础上,进一步联合国内高等院校、科研机构、产业企业和开源组织等,在计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,致力于联接互联网海量群智资源,探索开源创新成果开放与共享、开源生态协作与共建的新模式和新方法,升级形成了新一代开源创新服务平台GitLink,力图破解软件开发群智范式背后的本质机理,建立面向“大外围”开放创新的群智激发与汇聚关键机制,实现面向大规模软件涉众的稳态群智激发与汇聚。</div>
|
||||
<div>Trustie在已有的技术积累基础上,进一步联合国内高等院校、科研机构、产业企业和开源组织等,在中国计算机学会(CCF)的带领指导下,共同推进产学研用深度融合,致力于联接互联网海量群智资源,探索开源创新成果开放与共享、开源生态协作与共建的新模式和新方法,升级形成了新一代开源创新服务平台GitLink,力图破解软件开发群智范式背后的本质机理,建立面向“大外围”开放创新的群智激发与汇聚关键机制,实现面向大规模软件涉众的稳态群智激发与汇聚。</div>
|
||||
</div>
|
||||
</Timeline.Item>
|
||||
</Timeline>
|
||||
|
|
|
@ -14,20 +14,20 @@ class ActivityItem extends Component {
|
|||
{/* 如果是版本发布 */}
|
||||
{item.trend_type === "VersionRelease" ?
|
||||
<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>
|
||||
</p >
|
||||
:
|
||||
// 如果是任务
|
||||
item.trend_type === "Issue" ?
|
||||
<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>
|
||||
</p >
|
||||
:
|
||||
// 如果是合并请求
|
||||
<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>
|
||||
</p >
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ function CloneAddress({http_url , ssh_url , zip_url , tar_url}) {
|
|||
const [ key , setKey ] = useState("HTTP");
|
||||
return (
|
||||
<div className="downMenu">
|
||||
<div style={{borderBottom:"1px solid #eee"}}>
|
||||
<div>
|
||||
<Menu className="urlMenu" selectedKeys={[key]} mode={"horizontal"}>
|
||||
<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>
|
||||
<div className="gitAddressClone">
|
||||
<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>
|
||||
<Menu className="edu-txt-center">
|
||||
<Menu.Item><a href={zip_url}>下载 ZIP</a></Menu.Item>
|
||||
<Menu.Item><a href={tar_url}>下载 TAR.GZ</a></Menu.Item>
|
||||
{zip_url && <Menu.Item style={{borderTop:"1px solid #eee"}}><a href={zip_url}>下载 ZIP</a></Menu.Item>}
|
||||
{tar_url && <Menu.Item><a href={tar_url}>下载 TAR.GZ</a></Menu.Item>}
|
||||
</Menu>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ import './Component.scss';
|
|||
import { getUser } from '../GetData/getData';
|
||||
import axios from 'axios';
|
||||
|
||||
function Contributors({contributors,owner,projectsId,currentLogin}){
|
||||
function Contributors({owner,projectsId,currentLogin}){
|
||||
const [ menuList ,setMenuList ]= useState([]);
|
||||
const [ list , setList ]= useState(undefined);
|
||||
const [ total , setTotal ]= useState(0);
|
||||
|
@ -16,11 +16,18 @@ function Contributors({contributors,owner,projectsId,currentLogin}){
|
|||
const [ isSpin , setIsSpin ] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
if(contributors && contributors.total_count>0){
|
||||
setTotal(contributors.total_count);
|
||||
setList(contributors.list);
|
||||
getData();
|
||||
},[])
|
||||
|
||||
function getData(){
|
||||
const url = `/${owner}/${projectsId}/contributors.json`;
|
||||
axios.get(url).then(result=>{
|
||||
if(result){
|
||||
setTotal(result.data.total_count);
|
||||
setList(result.data.list);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
},[contributors])
|
||||
|
||||
useEffect(()=>{
|
||||
if(login){
|
||||
|
@ -148,15 +155,15 @@ function Contributors({contributors,owner,projectsId,currentLogin}){
|
|||
}
|
||||
|
||||
return(
|
||||
total > 0 ?
|
||||
<div className="halfs">
|
||||
<Link to={`/${owner}/${projectsId}/contribute`} className="font-16 color-ooo hoverA">
|
||||
<span>贡献者</span>
|
||||
{ contributors && contributors.total_count > 0 && <span className="infoCount">{contributors.total_count}</span>}
|
||||
{ total > 0 && <span className="infoCount">{total}</span>}
|
||||
</Link>
|
||||
<div className="attrPerson" onMouseLeave={()=>setVisibleFunc(false)}>
|
||||
{
|
||||
total > 0 ?
|
||||
list.map((item,key)=>{
|
||||
list && list.length>0 && list.map((item,key)=>{
|
||||
return(
|
||||
<Popover content={menu} visible={item.visible} overlayClassName="menuPanels" placement="top">
|
||||
<Link key={key} to={`/${item.login}`}>
|
||||
|
@ -165,10 +172,9 @@ function Contributors({contributors,owner,projectsId,currentLogin}){
|
|||
</Popover>
|
||||
)
|
||||
})
|
||||
:""
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>:""
|
||||
)
|
||||
}
|
||||
export default Contributors;
|
|
@ -1,10 +1,21 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
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);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
getData();
|
||||
},[])
|
||||
|
||||
function getData(){
|
||||
const url = `/${owner}/${projectsId}/languages.json`;
|
||||
axios.get(url).then(result=>{
|
||||
if(result){
|
||||
let languages = result.data;
|
||||
if(languages){
|
||||
let arr = [];
|
||||
Object.keys(languages).map((item,key)=>{
|
||||
|
@ -12,7 +23,19 @@ function LanguagePower({languages}){
|
|||
})
|
||||
setArray(arr);
|
||||
}
|
||||
},[languages])
|
||||
}
|
||||
}).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(){
|
||||
let str = "#";
|
||||
|
@ -24,7 +47,9 @@ function LanguagePower({languages}){
|
|||
return str;
|
||||
}
|
||||
return(
|
||||
(array && array.length > 0) ?
|
||||
<div>
|
||||
<Divider />
|
||||
<p className="font-16 color-ooo aboutSubTitle">开发语言</p>
|
||||
<div className="progress">
|
||||
{
|
||||
|
@ -47,8 +72,7 @@ function LanguagePower({languages}){
|
|||
}
|
||||
</FlexAJ>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>:""
|
||||
)
|
||||
}
|
||||
export default LanguagePower;
|
|
@ -17,7 +17,6 @@ import './header.scss';
|
|||
import NoticeContent from './NoticeContent';
|
||||
import MainLogo from './img/logo.png';
|
||||
// TODO 这部分脚本从公共脚本中直接调用
|
||||
let old_url;
|
||||
|
||||
window._header_componentHandler = null;
|
||||
// 非trustie链接则新开页跳转
|
||||
|
@ -197,14 +196,21 @@ class NewHeader extends Component {
|
|||
|
||||
matchpaths = (url) => {
|
||||
const { match } = this.props;
|
||||
if(url){
|
||||
if (match.path.indexOf(url) > -1) {
|
||||
const isDev = window.location.port == 3007;
|
||||
const isdev2= isDev ?'https://testforgeplus.trustie.net':`https://${window.location.hostname}`;
|
||||
let str = "";
|
||||
if(url.indexOf("http")>-1){
|
||||
str = isdev2+match.path;
|
||||
}else{
|
||||
str = match.path;
|
||||
}
|
||||
|
||||
if (url && str === url) {
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkProfile=(url)=>{
|
||||
const { showCompeleteDialog , completeProfile } = this.props;
|
||||
|
@ -272,82 +278,6 @@ class NewHeader extends Component {
|
|||
settings,
|
||||
visible,
|
||||
} = 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;
|
||||
return (
|
||||
<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 wl = waiLian && waiLian.length>0;
|
||||
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>
|
||||
</li>
|
||||
)
|
||||
|
@ -436,7 +366,6 @@ class NewHeader extends Component {
|
|||
>
|
||||
<Link to={"/settings/notice"} className="message-icon">
|
||||
{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"/>
|
||||
</Badge>}
|
||||
</Link>
|
||||
|
|
|
@ -23,6 +23,7 @@ import Nodata from '../Nodata';
|
|||
import Invite from './sub/Invite';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
import RenderHtml from '../../components/render-html';
|
||||
import { Base64 } from 'js-base64';
|
||||
/**
|
||||
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
||||
*/
|
||||
|
@ -279,6 +280,7 @@ function CoderDepot(props){
|
|||
// 子目录路径返回链接
|
||||
function returnUlr(url){
|
||||
let enBranch = turnbar(branchName);
|
||||
setType('dir');
|
||||
props.history.push(`/${owner}/${projectsId}/tree${enBranch?`/${enBranch}`:""}/${url}`);
|
||||
}
|
||||
// 点击跳转到子目录
|
||||
|
@ -319,9 +321,9 @@ function CoderDepot(props){
|
|||
const downloadMenu = (
|
||||
<CloneAddress
|
||||
http_url={projectDetail && projectDetail.clone_url}
|
||||
ssh_url = {projectDetail && projectDetail.ssh_url}
|
||||
zip_url={zip_url}
|
||||
tar_url={tar_url}
|
||||
ssh_url = {(projectDetail && props && props.platform) && projectDetail.ssh_url}
|
||||
zip_url={(props && props.platform) && zip_url}
|
||||
tar_url={(props && props.platform) && tar_url}
|
||||
showNotification={props.showNotification}/>
|
||||
)
|
||||
// 确认修改简介、website、实践课程链接
|
||||
|
@ -351,7 +353,7 @@ function CoderDepot(props){
|
|||
|
||||
const { current_user } = props;
|
||||
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));
|
||||
|
||||
return(
|
||||
|
@ -413,18 +415,35 @@ function CoderDepot(props){
|
|||
:
|
||||
<React.Fragment>
|
||||
<AlignCenter className="mr20">
|
||||
{
|
||||
props.platform ?
|
||||
<Link to={`/${owner}/${projectsId}/branches`} className="iconBtn">
|
||||
<i className="iconfont icon-master_icon font-16"></i>
|
||||
<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 className="mr20">
|
||||
{
|
||||
props.platform ?
|
||||
<Link to={`/${owner}/${projectsId}/tags`} className="iconBtn">
|
||||
<i className="iconfont icon-biaoqianicon font-16"></i>
|
||||
<span>标签</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>
|
||||
</React.Fragment>
|
||||
}
|
||||
|
@ -463,12 +482,18 @@ function CoderDepot(props){
|
|||
(dirInfo && dirInfo.length>0) || fileInfo ?
|
||||
<div className="listtable">
|
||||
{
|
||||
lastCommit &&
|
||||
((lastCommit && lastCommit.message) || lastCommitAuthor) &&
|
||||
<div className="listtablehead">
|
||||
<User url={getImageUrl(`/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/>
|
||||
{
|
||||
lastCommitAuthor &&
|
||||
<User url={getImageUrl(`/${lastCommitAuthor.image_url}`)} name={lastCommitAuthor.name} id={lastCommitAuthor.id} login={lastCommitAuthor.login}/>
|
||||
}
|
||||
{
|
||||
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> }
|
||||
|
||||
<span className="ml20 color-grey-6 font-12 mt3">{lastCommit.time_from_now}</span>
|
||||
|
@ -490,6 +515,7 @@ function CoderDepot(props){
|
|||
item={item}
|
||||
projectsId={projectsId}
|
||||
goToSubRoot={goToSubRoot}
|
||||
platform={props.platform}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
@ -569,7 +595,7 @@ function CoderDepot(props){
|
|||
}
|
||||
{/* 发布 */}
|
||||
{
|
||||
releaseVersions &&
|
||||
releaseVersions && props.platform &&
|
||||
<React.Fragment>
|
||||
<Divider />
|
||||
<Releases
|
||||
|
@ -582,17 +608,9 @@ function CoderDepot(props){
|
|||
</React.Fragment>
|
||||
}
|
||||
{/* 贡献者 */}
|
||||
{
|
||||
projectDetail && projectDetail.contributors && projectDetail.contributors.total_count >0 &&
|
||||
<Contributors contributors={projectDetail.contributors} owner={owner} projectsId={projectsId} />
|
||||
}
|
||||
<Contributors owner={owner} projectsId={projectsId} />
|
||||
{/* 语言 */}
|
||||
{ projectDetail && projectDetail.languages &&
|
||||
<React.Fragment>
|
||||
<Divider />
|
||||
<LanguagePower languages={projectDetail.languages}/>
|
||||
</React.Fragment>
|
||||
}
|
||||
<LanguagePower owner={owner} projectsId={projectsId}/>
|
||||
</Gap>
|
||||
</ShortWidth>
|
||||
}
|
||||
|
|
|
@ -8,13 +8,18 @@ const typeIco = {
|
|||
"dir":"icon-wenjianjia4 font-15 color-blue_4C"
|
||||
}
|
||||
|
||||
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
|
||||
function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId , platform }){
|
||||
return(
|
||||
<li>
|
||||
<span>
|
||||
{
|
||||
(!platform && item.image_type) ?
|
||||
<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 title="init project">
|
||||
<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(){
|
||||
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;
|
||||
let branch = returnbar(branchName || defaultBranch);
|
||||
return(
|
||||
|
@ -159,7 +159,16 @@ class CoderRootCommit extends Component{
|
|||
<div className="commitList-item f-wrap-between">
|
||||
<div>
|
||||
<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>
|
||||
<p className="f-wrap-alignCenter mt15 pb5">
|
||||
<User
|
||||
|
@ -176,7 +185,12 @@ class CoderRootCommit extends Component{
|
|||
<div>
|
||||
<span className="treecopy-cont shadow">
|
||||
<img src={Tree} alt="sha" width={"16px"}/>
|
||||
{
|
||||
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}`)}`}/>
|
||||
</span>
|
||||
<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>
|
||||
</div>
|
||||
{projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
|
||||
{ !platform && <span className="privateTag red mt6">只读</span> }
|
||||
</AlignTop>
|
||||
<div className="mt8">
|
||||
{
|
||||
|
|
|
@ -246,11 +246,14 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
padding:12px 20px 11px;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
border: 1px solid rgba(42, 97, 255, 0.23);
|
||||
border-bottom: none;
|
||||
background-color: #FAFCFF;
|
||||
&+.listtablebody{
|
||||
border-top-color: rgba(42, 97, 255, 0.23);
|
||||
}
|
||||
.ellipsistxt{
|
||||
&:hover .markdown-body{
|
||||
color: #466AFF;
|
||||
|
@ -331,7 +334,6 @@
|
|||
.listtablebody{
|
||||
border-radius:0px 0px 4px 4px ;
|
||||
border: 1px solid #D0D0D0;
|
||||
border-top: none;
|
||||
li.listtablepath{
|
||||
a{color: #40a9ff;}
|
||||
p{
|
||||
|
|
|
@ -4,18 +4,21 @@ import SubBanner from './SubBanner';
|
|||
import SubUnitBanner from './SubUnitBanner';
|
||||
import Icon from '../img/index/icon.png';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Spin } from 'antd';
|
||||
import { Spin , Input } from 'antd';
|
||||
import SubList from './SubList';
|
||||
import more from '../img/index/more.png';
|
||||
import axios from 'axios';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import Nodata from '../../Nodata';
|
||||
|
||||
const { Search } = Input;
|
||||
|
||||
const LIMIT = 20;
|
||||
function Index() {
|
||||
|
||||
const [ cateList , setCateList ] = useState(undefined);
|
||||
const [ projectsList , setProjectsList ] = useState(undefined);
|
||||
const [ search , setSearch ] = useState(undefined);
|
||||
const [ cateID, setCateID ] = useState(undefined);
|
||||
const [ isSpin, setIsSpin ] = useState(true);
|
||||
|
||||
|
@ -37,13 +40,14 @@ function Index() {
|
|||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
function getProject() {
|
||||
function getProject(searchValue) {
|
||||
const url = `/projects.json`;
|
||||
axios.get(url,{
|
||||
params:{
|
||||
pinned:"d",
|
||||
category_id:cateID,
|
||||
limit:LIMIT
|
||||
limit:LIMIT,
|
||||
search:searchValue
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
|
@ -53,6 +57,15 @@ function Index() {
|
|||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
function changeSearchValue(e){
|
||||
setSearch(e.target.value);
|
||||
}
|
||||
|
||||
function searchFun(value){
|
||||
setIsSpin(true);
|
||||
getProject(value);
|
||||
}
|
||||
|
||||
return(
|
||||
<div>
|
||||
<SubBanner />
|
||||
|
@ -74,6 +87,18 @@ function Index() {
|
|||
<div className="leftLists">
|
||||
<div className="leftTitles">
|
||||
<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>
|
||||
</div>
|
||||
<Spin spinning={isSpin}>
|
||||
|
@ -85,7 +110,14 @@ function Index() {
|
|||
projectsList.map((i,k)=>{
|
||||
return(
|
||||
<li>
|
||||
{
|
||||
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="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>
|
||||
|
|
|
@ -350,7 +350,15 @@
|
|||
justify-content: space-between;
|
||||
border-bottom: 1px solid rgba(153, 153, 153, 0.16);
|
||||
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-weight: 500;
|
||||
color: #000000;
|
||||
|
|
|
@ -23,27 +23,41 @@ const settings = {
|
|||
autoplay:true,
|
||||
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() {
|
||||
|
||||
const [ list , setlist ] = useState(undefined);
|
||||
// const [ list , setlist ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
getRecommandOrz();
|
||||
},[])
|
||||
// useEffect(()=>{
|
||||
// getRecommandOrz();
|
||||
// },[])
|
||||
|
||||
function getRecommandOrz(params) {
|
||||
const url = `/organizations/recommend.json`;
|
||||
axios.get(url,{
|
||||
params:{
|
||||
group_size
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
setlist(result.data.organizations)
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
// function getRecommandOrz(params) {
|
||||
// const url = `/organizations/recommend.json`;
|
||||
// axios.get(url,{
|
||||
// params:{
|
||||
// group_size
|
||||
// }
|
||||
// }).then(result=>{
|
||||
// if(result){
|
||||
// setlist(result.data.organizations)
|
||||
// }
|
||||
// }).catch(error=>{})
|
||||
// }
|
||||
return(
|
||||
list && list.length > 0 ?
|
||||
<div className="unitBanner">
|
||||
|
@ -60,7 +74,7 @@ function SubUnitBanner() {
|
|||
{
|
||||
i.map((j,k1)=>{
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -67,16 +67,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
</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 === "devops" && platform ?
|
||||
item.menu_name === "devops" ?
|
||||
<li className={pathname==="devops" ? "active" : ""}>
|
||||
{/* <Link to={{ pathname: `/${owner}/${projectsId}/devops${open_devops ? `/dispose`:""}`, state }}> */}
|
||||
<Link to={{ pathname: `/${owner}/${projectsId}/devops`, state:{...state,open_devops} }}>
|
||||
|
@ -106,6 +97,15 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
</Link>
|
||||
</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" &&
|
||||
<li className={pathname==="activity" ? "active" : ""}>
|
||||
|
@ -116,7 +116,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
|
|||
</li>
|
||||
}
|
||||
{
|
||||
item.menu_name === "settings" &&
|
||||
item.menu_name === "settings" && platform &&
|
||||
<li className={pathname === "settings" ? "active" : ""}>
|
||||
<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>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import React , { useState } from 'react';
|
||||
import { Anchor , Input } from 'antd';
|
||||
import './sub.scss';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
const { Link } = Anchor;
|
||||
|
||||
|
@ -40,7 +39,7 @@ function ReadmeCatelogue({ menuList , hash }) {
|
|||
{
|
||||
menu.map((item,key)=>{
|
||||
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} />
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -34,10 +34,17 @@
|
|||
padding:15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.ant-anchor{
|
||||
padding-left: 0px!important;
|
||||
.ant-anchor-ink::before{
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
.ant-anchor-wrapper{
|
||||
margin-left: 0px;
|
||||
padding:5px 15px;
|
||||
padding:5px 0px;
|
||||
max-height: 255px!important;
|
||||
padding-left: 0px!important;
|
||||
.items{
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
|
|
|
@ -5,11 +5,21 @@ import { Link } from 'react-router-dom';
|
|||
import { getImageUrl } from 'educoder';
|
||||
import { Dropdown , Menu , Spin } from 'antd';
|
||||
import './Index.scss';
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
import Tree from '../img/tree.png';
|
||||
import Axios from 'axios';
|
||||
|
||||
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){
|
||||
return str.replaceAll('/','%2F');
|
||||
}
|
||||
|
@ -91,7 +101,7 @@ function Index(props) {
|
|||
<div className="treeabout">
|
||||
{
|
||||
(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">
|
||||
<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 RenderHtml from "../../components/render-html";
|
||||
import Comments from "../comments/comments";
|
||||
import Claims from "../claims/claims"
|
||||
import "./order.css";
|
||||
|
||||
class Detail extends Component {
|
||||
|
@ -310,6 +311,10 @@ class Detail extends Component {
|
|||
/>
|
||||
</div>
|
||||
<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">
|
||||
<p className="grid-item-left pb15">
|
||||
<span className="issue_detail_info">负责人:</span>
|
||||
|
|
|
@ -130,7 +130,7 @@ class order_form extends Component {
|
|||
let data ={
|
||||
//指定指派成员,类型:缺陷,优先度:正常,issue状态:新增
|
||||
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",
|
||||
status_id: "1",
|
||||
description:"####问题描述\n\n\n####重现问题步骤\n\n\n####截图\n\n\n####建议解决办法\n",
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
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 NoneData from '../../../Nodata.js';
|
||||
import { noticeSourceType } from '../../../common/static';
|
||||
import './Index.scss';
|
||||
import '../manager/Index.scss'
|
||||
import '../manager/Index.scss';
|
||||
import { getImageUrl } from 'educoder';
|
||||
|
||||
|
||||
function MyNotice(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-cont vertical-center-style">
|
||||
<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)}}>
|
||||
{item.status === 1 ? <Badge color="#FA2020"/> : <span className="system-notice-blank"></span>}
|
||||
{item.sender && <span className="atme-length" dangerouslySetInnerHTML={{__html: item.content}}></span>}
|
||||
|
|
|
@ -81,7 +81,7 @@ class Index extends Component {
|
|||
<p>
|
||||
<Link to={`/${owner}/${projectsId}/settings/webhooks`} className="w-100">
|
||||
<i className="iconfont icon-a-xuanzhongwebhookicon font-18 mr10 color-grey-9"></i>
|
||||
Webhooks
|
||||
网络钩子
|
||||
</Link>
|
||||
</p>
|
||||
</li>
|
||||
|
|
|
@ -14,10 +14,10 @@ const menu = [
|
|||
{name:"代码库",index:"code"},
|
||||
{name:"易修 (Issue)",index:"issues"},
|
||||
{name:"合并请求 (PR)",index:"pulls"},
|
||||
{name:"维基 (Wiki)",index:"wiki"},
|
||||
{name:"引擎 (Engine)",index:"devops"},
|
||||
// {name:"资源库",index:"resources"},
|
||||
{name:"里程碑",index:"versions"},
|
||||
{name:"维基 (Wiki)",index:"wiki"},
|
||||
{name:"动态",index:"activity"},
|
||||
]
|
||||
class Setting extends Component {
|
||||
|
|
|
@ -77,7 +77,7 @@ function Index(props) {
|
|||
/>
|
||||
<Banner>
|
||||
<FlexAJ>
|
||||
<span>Webhooks</span>
|
||||
<span>Webhooks(网络钩子)</span>
|
||||
<Button type="primary" size="large" onClick={addFunc}>添加Webhook</Button>
|
||||
</FlexAJ>
|
||||
</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;
|
||||
overflow: hidden;
|
||||
white-space: normal;
|
||||
&:hover{
|
||||
& a:hover{
|
||||
text-decoration: underline;
|
||||
& .markdown-body{
|
||||
color: #466AFF;
|
||||
|
|
|
@ -91,7 +91,7 @@ function ThirdEdition() {
|
|||
return(
|
||||
<div className="thirdEdition">
|
||||
<p className="title">开发者的家园</p>
|
||||
<p className="subtitle">一个实现100%开源,产学研联合面向软件创新的开源社区</p>
|
||||
<p className="subtitle">一个实现群智激发与汇聚,产学研联合面向协同创新的开源社区</p>
|
||||
<div id="thirdUl">
|
||||
<ul className="thirdUl">
|
||||
<li className={active===1?"active":""}onClick={()=>{setFlag(false);setActive(1)}}>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
i.iconfont {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.overflowHidden1 {
|
||||
overflow: hidden;
|
||||
|
|
|
@ -139,7 +139,6 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
|||
</Row>
|
||||
</div>
|
||||
|
||||
|
||||
<Tabs defaultActiveKey="1" onChange={changeTab}>
|
||||
<TabPane tab={`项目(${totalType1})`} key={1}>
|
||||
<div className="search-content">
|
||||
|
@ -150,13 +149,13 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
|||
</div>
|
||||
{
|
||||
dataList.length ?
|
||||
<Pagination
|
||||
<div className="pb20"><Pagination
|
||||
showQuickJumper={dataList.length > size}
|
||||
onChange={(page) => { setPage(page) }}
|
||||
current={page}
|
||||
total={total}
|
||||
showTotal={total => `共 ${total} 条`}
|
||||
/>
|
||||
/></div>
|
||||
: <Nodata _html="暂无数据" className="no-data-box" />
|
||||
}
|
||||
</TabPane>
|
||||
|
@ -170,13 +169,13 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
|||
</div>
|
||||
{
|
||||
dataList.length ?
|
||||
<Pagination
|
||||
<div className="pb20"><Pagination
|
||||
showQuickJumper={dataList.length > size}
|
||||
onChange={(page) => { setPage(page) }}
|
||||
current={page}
|
||||
total={total}
|
||||
showTotal={total => `共 ${total} 条`}
|
||||
/> : <Nodata _html="暂无数据" />
|
||||
/></div> : <Nodata _html="暂无数据" />
|
||||
}
|
||||
</TabPane>
|
||||
|
||||
|
@ -227,13 +226,13 @@ const GlobalSearch = ({ location, showNotification, history }) => {
|
|||
</div>
|
||||
{
|
||||
dataList.length ?
|
||||
<Pagination
|
||||
<div className="pb20"><Pagination
|
||||
showQuickJumper={dataList.length > size}
|
||||
onChange={(page) => { setPage(page) }}
|
||||
current={page}
|
||||
total={total}
|
||||
showTotal={total => `共 ${total} 条`}
|
||||
/> : <Nodata _html="暂无数据" />
|
||||
/></div> : <Nodata _html="暂无数据" />
|
||||
}
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
|
Loading…
Reference in New Issue