邀请码位置,页面整体的加载
This commit is contained in:
parent
a6d713d1f6
commit
c5b729038c
|
@ -3409,7 +3409,7 @@ a.user_bluebg_btn {
|
|||
}
|
||||
|
||||
.cdefault {
|
||||
cursor: default
|
||||
cursor: default!important;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,20 +9,7 @@ class Loading extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="App" style={{ minHeight: '800px', width: "100%" }}>
|
||||
<style>
|
||||
{
|
||||
`
|
||||
.margintop{
|
||||
margin-top:20%;
|
||||
}
|
||||
`
|
||||
}
|
||||
</style>
|
||||
<Spin size="large" className={"margintop"} />
|
||||
</div>
|
||||
);
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import LanguagePower from '../Component/LanguagePower';
|
|||
import DrawerPanel from '../Component/DrawerPanel';
|
||||
import UpdateDescModal from './sub/UpdateDescModal';
|
||||
import Nodata from '../Nodata';
|
||||
|
||||
import Invite from './sub/Invite';
|
||||
/**
|
||||
* projectDetail.type:0是托管项目,1是镜像项目,2是同步镜像项目(为2时不支持在线创建、在线上传、在线修改、在线删除、创建合并请求等功能)
|
||||
*/
|
||||
|
@ -39,6 +39,7 @@ function returnbar(str){
|
|||
|
||||
function CoderDepot(props){
|
||||
const [ projectDetail , setProjectDetail ]= useState(undefined);
|
||||
const [ inviteCode , setInviteCode ] = useState(undefined);
|
||||
const [ treeValue , setTreeValue ] = useState(undefined);
|
||||
const [ treeValuePath , setTreeValuePath ] = useState(undefined);
|
||||
const [ lastCommit,setLastCommit ] = useState(undefined);
|
||||
|
@ -77,6 +78,7 @@ function CoderDepot(props){
|
|||
setWebsite(details.website);
|
||||
setLessonUrl(details.lesson_url);
|
||||
setDefaultBranch(details.default_branch);
|
||||
setInviteCode(details.invite_code);
|
||||
}
|
||||
},[details])
|
||||
|
||||
|
@ -455,6 +457,13 @@ function CoderDepot(props){
|
|||
</p>
|
||||
}
|
||||
</div>
|
||||
{
|
||||
inviteCode &&
|
||||
<div>
|
||||
<Divider />
|
||||
<Invite code={inviteCode} className={"detailsCode"}/>
|
||||
</div>
|
||||
}
|
||||
{
|
||||
lesson_url &&
|
||||
<div>
|
||||
|
|
|
@ -12,7 +12,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
|
|||
return(
|
||||
<li>
|
||||
<span>
|
||||
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} style={{cursor:item.type!=="submodule"?"pointer":"default"}}>
|
||||
<a onClick={()=>goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}>
|
||||
<i className={`iconfont ${typeIco[`${item.type}`]} color-green-file mr5`}></i>{item.name}
|
||||
</a>
|
||||
</span>
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Spin, Tooltip } from 'antd';
|
||||
import { Link, Route, Switch } from 'react-router-dom';
|
||||
import { Content , FlexAJ , AlignTop } from '../Component/layout';
|
||||
import { Content , AlignTop } from '../Component/layout';
|
||||
import DetailBanner from './sub/DetailBanner';
|
||||
import Invite from './sub/Invite';
|
||||
import '../css/index.scss'
|
||||
import './list.css';
|
||||
|
||||
|
@ -509,10 +508,6 @@ class Detail extends Component {
|
|||
</span>
|
||||
</span>
|
||||
}
|
||||
{
|
||||
projectDetail && projectDetail.invite_code &&
|
||||
<Invite code={projectDetail.invite_code} className={"mt8 textRight"}/>
|
||||
}
|
||||
</div>
|
||||
</AlignTop>
|
||||
{
|
||||
|
|
|
@ -360,4 +360,13 @@
|
|||
span{
|
||||
margin-top: 1px;
|
||||
}
|
||||
}
|
||||
.submoduleStyle{
|
||||
cursor: default;
|
||||
i{
|
||||
cursor: default;
|
||||
}
|
||||
&:hover{
|
||||
color: #05101a;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import { Tooltip , message } from 'antd';
|
||||
import './sub.scss';
|
||||
|
||||
function Invite({code,className}) {
|
||||
|
||||
|
@ -14,10 +15,13 @@ function Invite({code,className}) {
|
|||
}
|
||||
return(
|
||||
<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>
|
||||
</Tooltip>
|
||||
<span className="font-16 color-grey-6">邀请码</span>
|
||||
<div>
|
||||
<span id="devitecode">{code}</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>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -22,4 +22,9 @@
|
|||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.detailsCode{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
Loading…
Reference in New Issue