Merge branch 'gitlink_server' of http://106.75.45.236:3000/Gitlink/forgeplus-react into feature_IDE

This commit is contained in:
何童崇 2022-05-27 16:13:19 +08:00
commit 8f9579fa5b
17 changed files with 92 additions and 19 deletions

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1652927945088') format('woff2'),
url('iconfont.woff?t=1652927945088') format('woff'),
url('iconfont.ttf?t=1652927945088') format('truetype');
src: url('iconfont.woff2?t=1653550272457') format('woff2'),
url('iconfont.woff?t=1653550272457') format('woff'),
url('iconfont.ttf?t=1653550272457') format('truetype');
}
.iconfont {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-tuichuicon:before {
content: "\e936";
}
.icon-bangzhuzhongxinicon1:before {
content: "\e935";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "29934961",
"name": "退出icon",
"font_class": "tuichuicon",
"unicode": "e936",
"unicode_decimal": 59702
},
{
"icon_id": "29811507",
"name": "帮助中心icon",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -104,7 +104,7 @@ function Params(props){
<Banner>
<FlexAJ>
<span className="font-18">引擎 - 参数管理</span>
<Link to={`/${owner}/${projectsId}/devops`} className="font-14 color-grey-9 ml20">返回</Link>
<Link to={{pathname:`/${owner}/${projectsId}/devops`,state:{open_devops:true}}} className="font-14 color-grey-9 ml20">返回</Link>
</FlexAJ>
</Banner>
<Div className="disposeList">

View File

@ -290,7 +290,7 @@ function Structure(props,ref){
<Banner>
<FlexAJ>
<span>构建列表</span>
<Link to={`/${owner}/${projectsId}/devops`} className="font-15 color-grey-9">返回</Link>
<Link to={{pathname:`/${owner}/${projectsId}/devops`,state:{open_devops:true}}} className="font-15 color-grey-9">返回</Link>
</FlexAJ>
</Banner>
<Div>

View File

@ -275,7 +275,10 @@ function disposePipeline(props){
...params
}).then(result=>{
if(result){
props.history.push(`/${owner}/${projectsId}/devops`);
props.history.push({
pathname:`/${owner}/${projectsId}/devops`,
state:{open_devops:true}
});
}
setLoading(false);
}).catch(error=>{

View File

@ -522,7 +522,7 @@ function CoderDepot(props){
(dirInfo && dirInfo.length === 0) && !fileInfo ? <Nodata _html="暂未发现文件"/> :""
}
{/* readme文件显示(显示文件详情时不显示readme文件) */}
{ (readme && readme.content) ? <ReadMe ChangeFile={ChangeFile} readme={readme} operate={props && (props.isManager || props.isDeveloper) && projectDetail.type !==2 } history={props.history} /> :"" }
{ (readme && readme.replace_content) ? <ReadMe ChangeFile={ChangeFile} readme={readme} operate={props && (props.isManager || props.isDeveloper) && projectDetail.type !==2 } history={props.history} /> :"" }
</div>
</LongWidth>
{

View File

@ -644,7 +644,8 @@ class Detail extends Component {
open_devops={open_devops}
platform={platform}
urlFlag={urlFlag}
isManager={isManager}
showNotification={this.props.showNotification}
current_user={current_user}
/>
}
</div>

View File

@ -2,9 +2,12 @@ import React, { useEffect, useState } from 'react';
import { Skeleton , Tooltip} from 'antd';
import { Link } from 'react-router-dom';
import { numFormat } from 'educoder';
import QuitBox from './quit';
import axios from 'axios';
function DetailBanner({ history,list , owner , projectsId , isManager , url , pathname , state , urlFlag , projectDetail , platform ,open_devops }){
function DetailBanner({ history,list , owner , projectsId ,showNotification , url , pathname , state , urlFlag , projectDetail , platform ,open_devops ,current_user }){
const [ menuName , setMenuName ] = useState(undefined);
const [ visible , setVisible ] = useState(false);
useEffect(()=>{
if(list){
// banner
@ -19,8 +22,20 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
setMenuName(list);
}
},[list]);
function onSuccess(){
const url = `/${owner}/${projectsId}/quit.json`;
axios.post(url).then(result=>{
if(result){
showNotification("已成功退出仓库!");
history.push(`/${current_user && current_user.login}`);
}
}).catch(error=>{})
}
return(
<div className="f-wrap-between mt25">
<QuitBox visible={visible} onCancel={()=>setVisible(false)} name={projectDetail && projectDetail.name} onSuccess={onSuccess}/>
{
menuName && projectDetail ?
<ul className="headerMenu-wrapper">
@ -135,6 +150,10 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa
</Link>
</li>
}
{
item.menu_name === "quit" &&
<a onClick={()=>setVisible(true)}><i className="iconfont icon-tuichuicon color-grey-3 mr5 font-14"></i>退出仓库</a>
}
</React.Fragment>
)
})

View File

@ -0,0 +1,27 @@
import React from 'react';
import { AlignCenter } from '../../Component/layout';
import Modals from '../../Component/PublicModal/Index';
import { Button } from 'antd';
function QuitBox({ visible , onCancel ,onSuccess , name }) {
return(
<Modals
visible={visible}
onCancel={onCancel}
title={"退出仓库"}
btn={
<div>
<Button size={'large'} onClick={onCancel}>取消</Button>
<Button type={"danger"} size={"large"} onClick={onSuccess}>确定</Button>
</div>
}
>
<div className="desc">
<AlignCenter className="descMain">
<i className="iconfont icon-jinggao1 mr10 font-20 red"></i>确定退出 {name} 仓库吗</AlignCenter>
<p style={{textAlign:"center"}}>请进行确认以防数据的丢失</p>
</div>
</Modals>
)
}
export default QuitBox;

View File

@ -58,7 +58,9 @@ function Index({onCancel,avatarImg,login}){
const reader = new FileReader();
reader.onload = () => {
setAvatarPhoto(reader.result);
if(reader.result){
setAvatarPhoto(reader.result);
}
};
reader.readAsDataURL(files[0]);
}

View File

@ -21,7 +21,10 @@
.icon-bangzhuzhongxinicon, .icon-bangzhuzhongxinicon1{color:#ffffff}
}
}
.qqChatBox .ant-popover-arrow{display: none;}
.qqChatBox{
position: fixed;
.ant-popover-arrow{display: none;}
}
.qqChat{
margin: -12px -16px;
background-image:linear-gradient(180deg,#f8faff 0%,#dee7ff 100%);

View File

@ -150,7 +150,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
<div className="list">
<div className='search task'>
{current_user && current_user.login ? <Checkbox onChange={(e)=>{setCurrent(1);setApply(e.target.checked)}}>已报名</Checkbox> : <div></div>}
<Search className='taskSearch' placeholder='请输入课题名称进行搜索' allowClear enterButton onSearch={(value) => { setCurrent(1); setKeyword(value) }} />
<Search className='taskSearch' placeholder='请输入课题/项目名称进行搜索' allowClear enterButton onSearch={(value) => { setCurrent(1); setKeyword(value) }} />
<div></div>
</div>
<Table

View File

@ -21,7 +21,7 @@ const gradeList = [
{ id: '研二', name: '研二' },
{ id: '研三', name: '研三' }];
function Apply(props) {
const { form, current_user, showNotification, match,history, setStudentInfoReset } = props;
const { form, current_user, showNotification, match, history, setStudentInfoReset } = props;
const taskId = Number(match.params.taskId);
//
// current_user && (current_user.user_id = 6)
@ -364,7 +364,7 @@ function Apply(props) {
<div className="head_content">5提交申请后请耐心等待我们会在2022年7月1日公布入围结果如有任何问题请添加开源夏令营QQ群进行咨询</div>
</div>
<div className="main-tit">
<img src={studentSvg} alt=''/><span className="tit-text">学生报名</span>
<img src={studentSvg} alt='' /><span className="tit-text">学生报名</span>
</div>
<div className="form-content">
<div className="form-tit">申请课题</div>
@ -394,7 +394,7 @@ function Apply(props) {
{getFieldDecorator("location", {
rules: []
})(
<Cascader expandTrigger="hover" popupClassName="glcc_cascader" placeholder="请选择省份城市" options={locData} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} />
<Cascader expandTrigger="hover" popupClassName="glcc_cascader" placeholder="请选择省份城市" options={locData} className={editable ? "" : "disabledInput"} disabled={editable ? false : true} />
)}
</Form.Item>
{helper('所在年级',
@ -438,7 +438,7 @@ function Apply(props) {
onChange={handleChange}
>
{imageUrl ? <img src={imageUrl} alt="avatar" style={{ maxWidth: '100px', maxHeight: '100px' }} /> : userApplyInfo && userApplyInfo.proveAttachmentId ?
<div><img src={`${getUrl()}/api/attachments/${userApplyInfo.proveAttachmentId}`} alt='' style={{maxWidth: '100px'}}/></div> : <div>
<div><img src={`${getUrl()}/api/attachments/${userApplyInfo.proveAttachmentId}`} alt='' style={{ maxWidth: '100px' }} /></div> : <div>
<i className='iconfont icon-tianjiadaohang font-30'></i>
<div className="ant-upload-text font-13">请上传学生证明</div>
</div>}
@ -468,11 +468,18 @@ function Apply(props) {
</Select>
)}
<div className='introArea'>{helper('自荐书',
<div className="memoExtra">自荐书示例<a href="https://forum.gitlink.org.cn/forums/7299/detail" target="_black">https://forum.gitlink.org.cn/forums/7299/detail</a></div>,
<div className="memoExtra">如何写课题申请书<a href="https://forum.gitlink.org.cn/forums/7299/detail" target="_black">https://forum.gitlink.org.cn/forums/7299/detail</a></div>,
'memo' + i,
[{ required: true, message: "请正确输入自荐书" },
{ max: 500, message: '超出限制长度500位字符请重新编辑' }],
<TextArea placeholder="请填写你的优势和能力不超过500字" onBlur={(e) => { verify("memo" + i); changeTaskItem("memo", e.currentTarget.value, i) }} rows={4} className={editable ? "memoText" : "memoText disabledInput"} />
<TextArea placeholder="自荐书可按如下结构填写
1申请书概要说重点让导师打起精神看下去
2社区的贡献告诉社区你能为他们做哪些贡献
3课题实施方案详细阐述对课题的理解如果有技术架构图更好
4课题实施规划课题实施拆解工作规划以及时间安排
5个人简介编程技能过往经验
6提示文本框表达内容有限建议您提供内容的pdf或url链接方式展示更精彩的陈述"
onBlur={(e) => { verify("memo" + i); changeTaskItem("memo", e.currentTarget.value, i) }} rows={7} className={editable ? "memoText" : "memoText disabledInput"} />
)}</div>
<div className='introArea'>{helper('附件',