This commit is contained in:
caishi 2021-03-30 15:01:25 +08:00
parent 2c83221376
commit b568aef34e
10 changed files with 39 additions and 21 deletions

View File

@ -27,7 +27,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || ''
}
function clearAllCookie() {
cookie.remove('_educoder_session', { path: '/' });

View File

@ -162,7 +162,7 @@ export function getmyUrl(geturl) {
}
export function getUploadActionUrl(path, goTest) {
return `${getUrl()}/api/attachments.json?debug=${window._debugType || 'admin'}`;
return `${getUrl()}/api/attachments.json`;
}
export function getUploadLogoActionUrl() {

View File

@ -102,7 +102,7 @@ export default (({ projectsId , branch , owner , changeBranch , branchList , tag
</div>
);
return(
<Popover placement="bottom" visible={flag} content={menu} onClick={()=>setFlag(!flag)} overlayClassName="branch-tagBox-list">
<Popover placement='bottomLeft' visible={flag} content={menu} onClick={()=>setFlag(!flag)} overlayClassName="branch-tagBox-list">
<div className="branch-tagBox">
{/* {nav === 0 ?"分支":"标签"} */}
<span className="color-grey-9 mr3 ml8"><i className="iconfont icon-fenzhi2 font-18"></i></span>

View File

@ -112,6 +112,9 @@ li.ant-menu-item{
right:240px;
z-index: 10000;
}
.laterest{
color: #05690d;
}
@media screen and (max-width: 1800px){
.handleBox{

View File

@ -20,10 +20,13 @@ function Releases({owner,projectsId,releaseVersions}){
releaseVersions && releaseVersions.total_count>0 ?
releaseVersions.list.map((item,key)=>{
return(
<AlignTop className="mt10">
key === 0 &&<AlignTop className="mt10">
<i className="iconfont icon-biaoqian3 color-grey-6 font-18 mr10"></i>
<div>
<p className="font-16 color-grey-6"><Link to={`/projects/${owner}/${projectsId}/releases/8/update`}>{item.name}</Link></p>
<p className="font-16 color-grey-6">
<Link to={`/projects/${owner}/${projectsId}/releases/8/update`}>{item.name}</Link>
<span className="font-12 laterest ml5">最新</span>
</p>
<p className="color-grey-9 font-13">{item.created_at}</p>
</div>
</AlignTop>

View File

@ -1,8 +1,8 @@
import React from 'react';
import styled from 'styled-components';
import { Link } from 'react-router-dom';
export default ({ url , name , column })=>{
export default ({ url , name , column , id , login })=>{
const Img = styled.span`
display:flex;
${column && "flex-direction: column;text-align:center;"}
@ -19,6 +19,14 @@ export default ({ url , name , column })=>{
}
`;
return(
id?
<Link to={`/users/${login}`}>
<Img>
{ url && <img src={url} alt=""/> }
<span>{name}</span>
</Img>
</Link>
:
<Img>
{ url && <img src={url} alt=""/> }
<span>{name}</span>

View File

@ -92,7 +92,7 @@ function CoderDepot(props){
setZip_url(result.data.zip_url);
let c = result.data.last_commit
setLastCommit(c && c.commit);
setLastCommitAuthor(c && (c.author || (c.commit && c.commit.author)));
setLastCommitAuthor(c && c.committer);
setMainFlag(true);
}
setTimeout(function(){setIsSpin(false);},500);
@ -133,7 +133,7 @@ function CoderDepot(props){
}
let c = result.data.last_commit
setLastCommit(c && c.commit);
setLastCommitAuthor(c && (c.author || (c.commit && c.commit.author)));
setLastCommitAuthor(c && c.committer);
setMainFlag(false);
}
setTimeout(function(){setIsSpin(false);},500)
@ -306,7 +306,7 @@ function CoderDepot(props){
{
lastCommit &&
<div className="listtablehead">
<User url={getImageUrl(`images/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} />
<User url={getImageUrl(`images/${lastCommitAuthor && lastCommitAuthor.image_url}`)} name={lastCommitAuthor && lastCommitAuthor.name} id={lastCommitAuthor && lastCommitAuthor.id} login={lastCommitAuthor && lastCommitAuthor.login}/>
<div className={hideBtn && hide ? "ellipsistxt hide" :"ellipsistxt"}><p id="ptxt">{lastCommit && lastCommit.message}</p></div>
{ hideBtn && <span className="ellipsis" onClick={()=>changeHide(hide)}><i className="iconfont icon-shenglvehao"></i></span> }

View File

@ -496,9 +496,11 @@ class Detail extends Component {
}
</span>
<span className="detail_tag_btn">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={this.forkFunc}>
<i className="iconfont icon-fork color-grey-9 mr3"></i> (Fork)
</a>
<Tooltip title="复刻是fork的中文名即复制代码仓库" placement="bottom">
<a className="detail_tag_btn_name" style={{cursor:platform?"pointer":"default"}} onClick={this.forkFunc}>
<i className="iconfont icon-fork color-grey-9 mr3"></i>
</a>
</Tooltip>
{
forked_count > 0 ?
platform ?

View File

@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { Skeleton } from 'antd';
import { Skeleton , Tooltip} from 'antd';
import { Link } from 'react-router-dom';
function DetailBanner({ list , owner , projectsId , isManager , url , pathname , state , urlFlag , projectDetail , platform ,open_devops }){
@ -39,11 +39,13 @@ function DetailBanner({ list , owner , projectsId , isManager , url , pathname ,
{
item.menu_name === "issues" &&
<li className={pathname==="issues" ? "active" : ""}>
<Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}>
<i className={pathname==="issues" ? "iconfont icon-renwu color-grey-3 mr5 font-14":"iconfont icon-renwu color-grey-6 font-14 mr5"}></i>
<span>易修 (Issue)</span>
{projectDetail && projectDetail.issues_count ? <span className="num">{projectDetail.issues_count}</span> : ""}
</Link>
<Tooltip title="复刻是fork的中文名即复制代码仓库" placement="bottom">
<Link to={{ pathname: `/projects/${owner}/${projectsId}/issues`, state }}>
<i className={pathname==="issues" ? "iconfont icon-renwu color-grey-3 mr5 font-14":"iconfont icon-renwu color-grey-6 font-14 mr5"}></i>
<span title="易修是Issue的中文名即问题列表">易修</span>
{projectDetail && projectDetail.issues_count ? <span className="num">{projectDetail.issues_count}</span> : ""}
</Link>
</Tooltip>
</li>
}
{

View File

@ -580,8 +580,8 @@ class LoginDialog extends Component {
<label htmlFor="p_autolog" style={{ top: '0px' }}>下次自动登录</label>
</span>
<span className="fr">
<a onClick={(url) => this.getloginurl("https://www.trustie.net/account/lost_password")}
className="mr3 color-grey-9">找回密码</a><em className="vertical-line"></em>
<a onClick={(url) => this.getloginurl("https://www.trustie.net/account/lost_password")} className="mr3 color-grey-9">找回密码</a>
<em className="vertical-line"></em>
<a onClick={(url) => this.getloginurl("https://www.trustie.net/login?login=false")} className="color-grey-9">注册</a>
</span>
</p>