Merge branch 'develop'
This commit is contained in:
commit
e31ff9bdf3
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="zh-CN" class="notranslate translated-ltr" translate="no">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name=”Keywords” Content=”trustie,trustieforge,forge,确实让创建更美好,协同开发平台″>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import RenderHtml from '../../components/render-html';
|
||||
import { AlignCenter } from '../Component/layout';
|
||||
import { Dropdown , Menu , Spin } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
const $ = window.$;
|
||||
|
@ -47,11 +48,16 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
|||
}
|
||||
return(
|
||||
<div className="commonBox" id="readme">
|
||||
<div className="commonBox-title">
|
||||
<div className="commonBox-title boxTitle">
|
||||
<AlignCenter>
|
||||
<Dropdown overlay={menu()}>
|
||||
<i className="iconfont icon-zhangjie1 font-16 color-grey-3 mr10"></i>
|
||||
<span className="catelogue">
|
||||
<i className="iconfont icon-zhangjie1 font-14 mr5"></i>
|
||||
<span>目录</span>
|
||||
</span>
|
||||
</Dropdown>
|
||||
<span className="commonBox-title-read">README.md</span>
|
||||
</AlignCenter>
|
||||
{
|
||||
operate ?
|
||||
<a className="ml20 pull-right" onClick={() =>ChangeFile(readme && readme.path, false)}>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Spin, Tooltip } from 'antd';
|
||||
import { Link, Route, Switch } from 'react-router-dom';
|
||||
import { Content , FlexAJ , AlignCenter } from '../Component/layout';
|
||||
import { Content , FlexAJ , AlignTop } from '../Component/layout';
|
||||
import DetailBanner from './sub/DetailBanner';
|
||||
import Invite from './sub/Invite';
|
||||
import '../css/index.scss'
|
||||
|
@ -393,11 +393,11 @@ class Detail extends Component {
|
|||
textFunc = (forked_from_project_id,fork_info)=>{
|
||||
let type = fork_info && fork_info.fork_project_user_type;
|
||||
return forked_from_project_id && fork_info ?
|
||||
<div className="color-grey-9">
|
||||
<div className="color-grey-9 df">
|
||||
<span>复刻自</span>
|
||||
<Link to={`${type ==="Organization" ? "/organize":'/users'}/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6">{fork_info.fork_project_user_name}</Link>
|
||||
<Link to={`${type ==="Organization" ? "/organize":'/users'}/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6 ml5">{fork_info.fork_project_user_name}</Link>
|
||||
<span> / </span>
|
||||
<Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6">{fork_info.fork_form_name}</Link>
|
||||
<Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6 task-hide flex1" style={{maxWidth:"400px"}} title={fork_info.fork_form_name}>{fork_info.fork_form_name}</Link>
|
||||
</div> : ""
|
||||
}
|
||||
|
||||
|
@ -426,29 +426,32 @@ class Detail extends Component {
|
|||
<div>
|
||||
<div className="detailHeader-wrapper">
|
||||
<div className="normal">
|
||||
<FlexAJ style={{paddingTop:"15px"}}>
|
||||
<AlignCenter>
|
||||
<AlignTop style={{padding:"20px 0px 10px",justifyContent:"space-between"}}>
|
||||
<div>
|
||||
<AlignTop>
|
||||
<div className="projectallName">
|
||||
{project && project.author &&
|
||||
<Link to={`${project.author.type ==="Organization" ? "/organize":'/users'}/${project.author.login}`}>{project.author.name}</Link>
|
||||
}
|
||||
<span className="ml5 mr5">/</span>
|
||||
<Link to={`/projects/${owner}/${projectsId}`} className="projectN">{project && project.name}</Link>
|
||||
<Link to={`/projects/${owner}/${projectsId}`} className="projectN mt6">{project && project.name}</Link>
|
||||
</div>
|
||||
{ projectDetail && projectDetail.private && <span className="privateTag">私有</span>}
|
||||
{ projectDetail && projectDetail.private && <span className="privateTag mt6">私有</span>}
|
||||
</AlignTop>
|
||||
<div className="mt8">
|
||||
{
|
||||
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
|
||||
projectDetail.type === 2 ?
|
||||
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
|
||||
<i className="iconfont icon-banbenku font-18 mt6" style={{ color: "#8D90E3" }}/>
|
||||
</Tooltip>
|
||||
:
|
||||
<Tooltip title={"镜像自: " + projectDetail.mirror_url} className="ml5" placement={'right'}>
|
||||
<i className="iconfont icon-jingxiang font-18 color-green mt6" />
|
||||
</Tooltip>
|
||||
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
|
||||
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
|
||||
:""
|
||||
}
|
||||
</AlignCenter>
|
||||
{
|
||||
projectDetail && projectDetail.type && projectDetail.type !== 0 ?
|
||||
<span className="color-grey-9">镜像自 <span className="color-grey-6">{projectDetail.mirror_url}</span></span>
|
||||
:""
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{
|
||||
firstSync ? "":
|
||||
<span className="df">
|
||||
|
@ -506,20 +509,12 @@ class Detail extends Component {
|
|||
</span>
|
||||
</span>
|
||||
}
|
||||
</FlexAJ>
|
||||
<FlexAJ>
|
||||
<div>
|
||||
{
|
||||
projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ?
|
||||
this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info)
|
||||
:""
|
||||
}
|
||||
</div>
|
||||
{
|
||||
projectDetail && projectDetail.invite_code &&
|
||||
<Invite code={projectDetail.invite_code} />
|
||||
<Invite code={projectDetail.invite_code} className={"mt8 textRight"}/>
|
||||
}
|
||||
</FlexAJ>
|
||||
</div>
|
||||
</AlignTop>
|
||||
{
|
||||
firstSync ? "" :
|
||||
<DetailBanner
|
||||
|
|
|
@ -345,3 +345,19 @@
|
|||
background-color: #e6f7ff;
|
||||
}
|
||||
}
|
||||
.catelogue{
|
||||
border:1px solid rgb(211, 211, 211);
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
border-radius: 5px;
|
||||
margin-right: 10px;
|
||||
padding:0px 10px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
color: #666!important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span{
|
||||
margin-top: 1px;
|
||||
}
|
||||
}
|
|
@ -35,7 +35,7 @@ class IndexItem extends Component {
|
|||
<div className="p-r-Infos">
|
||||
<div className="p-r-name">
|
||||
<AlignCenter>
|
||||
<Link to={`/projects/${item.author.login}/${item.identifier}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
|
||||
<Link to={`/projects/${item.author.login}/${item.identifier}`} title={`${item.author.name}/${item.name}`} className="color-grey-3 font-18 task-hide " style={{maxWidth: 470 }}>
|
||||
{item.author.name}/{item.name}
|
||||
</Link>
|
||||
{ !item.is_public && <span className="privateTag">私有</span> }
|
||||
|
|
|
@ -564,6 +564,10 @@
|
|||
border-bottom: 1px solid #d9d9d9;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
}
|
||||
.commonBox .commonBox-title.boxTitle{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.synchronism{
|
||||
display: block;
|
||||
height: 26px;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { Tooltip , message } from 'antd';
|
||||
|
||||
function Invite({code}) {
|
||||
function Invite({code,className}) {
|
||||
|
||||
function jsCopy(id) {
|
||||
const copyEle = document.querySelector(id); // 获取要复制的节点
|
||||
|
@ -13,7 +13,7 @@ function Invite({code}) {
|
|||
message.success('复制成功');
|
||||
}
|
||||
return(
|
||||
<div>
|
||||
<div className={className}>
|
||||
<span>邀请码: <span id="devitecode">{code}</span></span>
|
||||
<Tooltip title={<p className="edu-txt-center">可以通过邀请码邀请成员加入项目<br/>点击复制邀请码。</p>} placement={"bottom"}>
|
||||
<i className="iconfont icon-fuzhi2 font-16 color-blue ml8" onClick={()=>jsCopy("#devitecode")}></i>
|
||||
|
|
|
@ -573,7 +573,7 @@ class order extends Component {
|
|||
<div className="f-wrap-between screenWrap">
|
||||
<div className="df">
|
||||
{
|
||||
current_user && current_user.login ?
|
||||
((current_user && current_user.login) && (data && data.user_admin_or_member)) ?
|
||||
<Checkbox value="0" style={{ lineHeight: "50px", marginRight: "15px" }} checked={all} onChange={this.changeAll}></Checkbox>
|
||||
: ""
|
||||
}
|
||||
|
@ -818,7 +818,7 @@ class order extends Component {
|
|||
<OrderItem
|
||||
key={key}
|
||||
item={item}
|
||||
checkbox={current_user ? <Checkbox value={item.id} key={item.id} style={{ margin: '4px 15px 0px 0px' }}></Checkbox> : ""}
|
||||
checkbox={current_user &&(data && data.user_admin_or_member) ? <Checkbox value={item.id} key={item.id} style={{ margin: '4px 15px 0px 0px' }}></Checkbox> : ""}
|
||||
search_count={search_count}
|
||||
page={select_params.page}
|
||||
limit={select_params.limit}
|
||||
|
|
|
@ -30,13 +30,15 @@ class Setting extends Component {
|
|||
project_units:['home',"activity","code"],
|
||||
divertVisible:false,
|
||||
is_transfering:undefined,
|
||||
projectName:undefined
|
||||
};
|
||||
}
|
||||
|
||||
componentDidUpdate=(prevPros)=>{
|
||||
|
||||
if(prevPros && this.props && !this.props.checkIfLogin()){
|
||||
this.props.history.push("/403")
|
||||
return
|
||||
return;
|
||||
}
|
||||
}
|
||||
componentDidMount = () => {
|
||||
|
@ -75,6 +77,7 @@ class Setting extends Component {
|
|||
project_units:units
|
||||
});
|
||||
this.setState({
|
||||
projectName:result.data.project_name,
|
||||
private_check: result.data.private,
|
||||
loading:false,
|
||||
project_units:units,
|
||||
|
@ -169,10 +172,11 @@ class Setting extends Component {
|
|||
|
||||
// 删除本仓库
|
||||
deleteProject = () => {
|
||||
this.props.confirm({
|
||||
content: "删除后无法恢复,是否确认删除本仓库?",
|
||||
onOk: () => {
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const { projectName } = this.state;
|
||||
this.props.confirm({
|
||||
content: <span style={{display:"block",textAlign:"left"}}>该操作无法撤销!且将会一并删除相关的易修、合并请求、工作流、里程碑、动态等数据。<br/>是否确认删除 <span style={{fontWeight:"bold"}}>{owner}/{projectName}({projectsId})</span>?</span>,
|
||||
onOk: () => {
|
||||
const url = `/${owner}/${projectsId}.json`;
|
||||
axios
|
||||
.delete(url)
|
||||
|
@ -233,6 +237,7 @@ class Setting extends Component {
|
|||
const { CategoryList, LanguageList, private_check ,loading , divertVisible , is_transfering, transfer } = this.state;
|
||||
let mirror = projectDetail && projectDetail.mirror;
|
||||
let type = projectDetail && projectDetail.type;
|
||||
const forked_from_project_id = this.props && this.props.projectDetail && this.props.projectDetail.forked_from_project_id;
|
||||
return (
|
||||
<div>
|
||||
<DivertModal
|
||||
|
@ -265,8 +270,12 @@ class Setting extends Component {
|
|||
<Checkbox
|
||||
checked={private_check}
|
||||
onChange={this.changePrivate}
|
||||
disabled={forked_from_project_id}
|
||||
>
|
||||
将仓库设为私有
|
||||
<span className="color-grey-9">将仓库设为私有</span>
|
||||
<span className="color-grey-6">
|
||||
{ forked_from_project_id ?`(Fork仓库的可见性实时同步自源仓库,不支持直接修改)`:`(修改仓库的可见性,将会影响到该仓库下所有Fork仓库的可见性)`}
|
||||
</span>
|
||||
</Checkbox>
|
||||
)}
|
||||
</Form.Item>
|
||||
|
|
|
@ -202,7 +202,7 @@ export default Form.create()(
|
|||
[],
|
||||
<Checkbox checked={check_box} onChange={change_check_box_status} style={OptionStyle}>新建项目<span className="color-grey-8 ml10">(成员可以在组织中新建项目。创建者将自动获得新建的项目的管理员权限)</span></Checkbox>, false, 20,onwers ? "hide":""
|
||||
)}
|
||||
{helper(
|
||||
{/* {helper(
|
||||
'版本库权限:',
|
||||
"authorize",
|
||||
[],
|
||||
|
@ -211,7 +211,7 @@ export default Form.create()(
|
|||
<Radio value="write" style={addStyle}>写入权限<span className="color-grey-8 ml10">(成员可以查看和推送提交到团队项目)</span></Radio>
|
||||
<Radio value="admin" style={OptionStyle}>管理员权限<span className="color-grey-8 ml10">(成员可以拉取和推送到团队项目同时可以添加协作者)</span></Radio>
|
||||
</Radio.Group>, false, 20,onwers ? "hide":""
|
||||
)}
|
||||
)} */}
|
||||
</Form>
|
||||
{/* <p className="required">允许访问项目单元:</p>
|
||||
<AlignCenter className="mb10">
|
||||
|
|
|
@ -8,18 +8,17 @@ ul,ol,dl{
|
|||
color: #333;
|
||||
}
|
||||
.projectallName{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22px;
|
||||
font-weight: normal;
|
||||
line-height: 30px;
|
||||
max-width: 850px;
|
||||
.projectN{
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
max-width: 500px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.textRight{
|
||||
text-align: right;
|
||||
}
|
||||
.main{
|
||||
width: 1200px;
|
||||
padding:20px;
|
||||
|
|
Loading…
Reference in New Issue