邀请码位置,页面整体的加载

This commit is contained in:
caishi 2021-07-09 17:10:55 +08:00
parent a6d713d1f6
commit c5b729038c
8 changed files with 36 additions and 27 deletions

View File

@ -3409,7 +3409,7 @@ a.user_bluebg_btn {
}
.cdefault {
cursor: default
cursor: default!important;
}

View File

@ -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 ""
}
}

View File

@ -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>

View File

@ -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>

View File

@ -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>
{

View File

@ -361,3 +361,12 @@
margin-top: 1px;
}
}
.submoduleStyle{
cursor: default;
i{
cursor: default;
}
&:hover{
color: #05101a;
}
}

View File

@ -1,5 +1,6 @@
import React from 'react';
import { Tooltip , message } from 'antd';
import './sub.scss';
function Invite({code,className}) {
@ -14,11 +15,14 @@ function Invite({code,className}) {
}
return(
<div className={className}>
<span>邀请码: <span id="devitecode">{code}</span></span>
<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>
)
}
export default Invite;

View File

@ -23,3 +23,8 @@
line-height: 20px;
}
}
.detailsCode{
display: flex;
justify-content: space-between;
}