This commit is contained in:
caishi 2021-04-21 16:55:10 +08:00
parent d872ffc606
commit 3b6cc99d49
6 changed files with 76 additions and 50 deletions

View File

@ -18,45 +18,48 @@ function Footer(){
} }
return( return(
<div className="newFooter edu-txt-center"> <div>
{value && showhtml(value)} <div style={{height:"483px"}}></div>
{/* <div className="footerInfos"> <div className="newFooter edu-txt-center">
<ul> {value && showhtml(value)}
<li>社区</li> {/* <div className="footerInfos">
<li><a href={`/`} target="_blank">网站首页</a></li> <ul>
<li><a href={`https://www.trustie.net/agreement`} target="_blank">服务协议</a></li> <li>社区</li>
<li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li> <li><a href={`/`} target="_blank">网站首页</a></li>
<li><a href={`https://forum.trustie.net/`} target="_blank">问吧交流</a></li> <li><a href={`https://www.trustie.net/agreement`} target="_blank">服务协议</a></li>
<li><a href={`https://www.trustie.net/cooperation`} target="_blank">合作伙伴</a></li> <li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li>
</ul> <li><a href={`https://forum.trustie.net/`} target="_blank">问吧交流</a></li>
<ul> <li><a href={`https://www.trustie.net/cooperation`} target="_blank">合作伙伴</a></li>
<li>支持与服务</li> </ul>
<li><a href={`https://forgeplus.trustie.net/docs/api`} target="_blank">API文档</a></li> <ul>
<li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li> <li>支持与服务</li>
<li><a href={`https://git-scm.com`} target="_blank">Git常用命令</a></li> <li><a href={`https://forgeplus.trustie.net/docs/api`} target="_blank">API文档</a></li>
<li><a href={`https://forum.trustie.net/forums/3080/detail`} target="_blank">DevOps使用文档</a></li> <li><a href={`https://forum.trustie.net/forums/1168/detail`} target="_blank">帮助中心</a></li>
<li><a href={`https://forgeplus.trustie.net/projects/jasder/forgeplus/tree/master/CHANGELOG.md`} target="_blank">日志更新</a></li> <li><a href={`https://git-scm.com`} target="_blank">Git常用命令</a></li>
</ul> <li><a href={`https://forum.trustie.net/forums/3080/detail`} target="_blank">DevOps使用文档</a></li>
<ul> <li><a href={`https://forgeplus.trustie.net/projects/jasder/forgeplus/tree/master/CHANGELOG.md`} target="_blank">日志更新</a></li>
<li>合作伙伴</li> </ul>
<li><a href={`http://www.sei.pku.edu.cn`} target="_blank">北京大学</a></li> <ul>
<li><a href={`http://scse.buaa.edu.cn`} target="_blank">北京航空航天大学</a></li> <li>合作伙伴</li>
<li><a href={`https://www.nju.edu.cn`} target="_blank">南京大学</a></li> <li><a href={`http://www.sei.pku.edu.cn`} target="_blank">北京大学</a></li>
<li><a href={`https://www.xtu.edu.cn`} target="_blank">湘潭大学</a></li> <li><a href={`http://scse.buaa.edu.cn`} target="_blank">北京航空航天大学</a></li>
<li><a href={`http://www.iscas.ac.cn`} target="_blank">ISCAS</a></li> <li><a href={`https://www.nju.edu.cn`} target="_blank">南京大学</a></li>
<li><a href={`https://www.ucloud.cn`} target="_blank">UCloud优刻得</a></li> <li><a href={`https://www.xtu.edu.cn`} target="_blank">湘潭大学</a></li>
<li><a href={`http://www.inforbus.com`} target="_blank">中创软件</a></li> <li><a href={`http://www.iscas.ac.cn`} target="_blank">ISCAS</a></li>
<li><a href={`https://www.inspur.com`} target="_blank">浪潮集团</a></li> <li><a href={`https://www.ucloud.cn`} target="_blank">UCloud优刻得</a></li>
<li><a href={`http://www.copu.org.cn`} target="_blank">中国开源软件推进联盟</a></li> <li><a href={`http://www.inforbus.com`} target="_blank">中创软件</a></li>
<li><a href={`https://www.sjtu.edu.cn`} target="_blank">上海交通大学</a></li> <li><a href={`https://www.inspur.com`} target="_blank">浪潮集团</a></li>
</ul> <li><a href={`http://www.copu.org.cn`} target="_blank">中国开源软件推进联盟</a></li>
<ul> <li><a href={`https://www.sjtu.edu.cn`} target="_blank">上海交通大学</a></li>
<li>合作伙伴</li> </ul>
<li><span>热线</span></li> <ul>
<li><span>QQ群1071514693</span></li> <li>合作伙伴</li>
</ul> <li><span>热线</span></li>
<li><span>QQ群1071514693</span></li>
</ul>
</div>
<p className="footerCopy">© Copyright 2007~2021 国防科技大学Trustie团队 & IntelliDE <a href="https://beian.miit.gov.cn">湘ICP备 17009477</a></p> */}
</div> </div>
<p className="footerCopy">© Copyright 2007~2021 国防科技大学Trustie团队 & IntelliDE <a href="https://beian.miit.gov.cn">湘ICP备 17009477</a></p> */}
</div> </div>
) )
} }

View File

@ -117,7 +117,7 @@ class UserSubmitComponent extends Component {
<span className="df" style={{ alignItems: "center" }}> <span className="df" style={{ alignItems: "center" }}>
<Link to={`/users/${current_user && current_user.login}`} className="show-user-link" > <Link to={`/users/${current_user && current_user.login}`} className="show-user-link" >
<img <img
src={getImageUrl(`images/${current_user && current_user.image_url}`)} src={getImageUrl(`/${current_user && current_user.image_url}`)}
alt="" alt=""
className="screwImg" className="screwImg"
/> />

View File

@ -51,7 +51,7 @@ class m_editor extends Component {
return ( return (
<React.Fragment> <React.Fragment>
<div> <div>
<div className="branchTable"> <div className="branchTable" style={{border:"1px solid #eee"}}>
<Editor <Editor
height="400px" height="400px"
language={language ? language : "plaintext"} language={language ? language : "plaintext"}
@ -64,7 +64,7 @@ class m_editor extends Component {
/> />
</div> </div>
{!readOnly && ( {!readOnly && (
<div style={{padding:"20px",marginTop:"20px",borderTop:"1px solid #d9d9d9"}}> <div style={{marginTop:"20px"}}>
<UserSubmitComponent <UserSubmitComponent
{...this.props} {...this.props}
{...this.state} {...this.state}

View File

@ -1,15 +1,15 @@
import React,{ forwardRef , useCallback , useEffect, useState } from 'react'; import React,{ forwardRef , useCallback , useEffect, useState } from 'react';
import './Index.scss'; import './Index.scss';
import { Form , Input , Radio , Checkbox , Button, InputNumber } from "antd"; import { Form , Input , Radio , Checkbox , Button } from "antd";
import UploadImage from './Component/UploadImage'; import UploadImage from './Component/UploadImage';
import axios from 'axios'; import axios from 'axios';
const port = window.location.port;
const hostname = window.location.hostname;
export default Form.create()( export default Form.create()(
forwardRef(({ form , showNotification , history })=>{ forwardRef(({ form , showNotification , history })=>{
const [ image , setImage ] = useState(undefined); const [ image , setImage ] = useState(undefined);
const [ imageFlag , setImageFlag] = useState(false); const [ imageFlag , setImageFlag] = useState(false);
const { getFieldDecorator, validateFields , setFieldsValue } = form; const { getFieldDecorator, validateFields , setFieldsValue } = form;
const radioStyle = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -60,19 +60,44 @@ export default Form.create()(
}) })
},[]) },[])
function checkname(rule, value, callback){
if(!value){
callback();
}
if(value && !value.match(/^[a-zA-Z][a-zA-Z0-9_-]{3,19}$/)){
callback("只能使用以字母开头包含字母、数字、下划线、横杠等长度4到20个字符");
}
callback();
}
return( return(
<div className="main"> <div className="main" style={{padding:"0px",border:"none"}}>
<div className="teamBox"> <div className="teamBox">
<p className="teamBox-title">新建组织</p> <p className="teamBox-title">新建组织</p>
<Form className="teamBox-form"> <Form className="teamBox-form">
{helper( {helper(
<span>组织名称<span className="color-grey-8">(组织名称应该简单明了)</span></span>, <span>组织账号</span>,
"name", "name",
[
{ required: true, message: "请输入组织账号" },
{
validator:checkname
}
],
<Input
addonBefore={`https://`+ port ? `${hostname}:${port}/organize`:`${hostname}/organize`}
placeholder="组织账号"
/>
)}
{helper(
<span>组织名称</span>,
"nickname",
[{ required: true, message: "请输入组织名称" }], [{ required: true, message: "请输入组织名称" }],
<Input <Input
placeholder="请输入组织名称" placeholder="请输入组织名称"
/> />
)} )}
{helper( {helper(
'组织描述', '组织描述',
"description", "description",

View File

@ -95,7 +95,7 @@ body>.-task-title {
} }
.newContainer { .newContainer {
background: #f5f5f5; background: #fff;
} }
.ant-modal-title { .ant-modal-title {

View File

@ -5,7 +5,6 @@ import axios from 'axios';
import { Spin } from 'antd'; import { Spin } from 'antd';
import './TPMIndex.css'; import './TPMIndex.css';
import LoginDialog from '../login/LoginDialog'; import LoginDialog from '../login/LoginDialog';
import EducoderAccount from '../../forge/Component/EducoderAccount';
export function TPMIndexHOC(WrappedComponent) { export function TPMIndexHOC(WrappedComponent) {
return class II extends React.Component { return class II extends React.Component {
@ -206,14 +205,13 @@ export function TPMIndexHOC(WrappedComponent) {
render() { render() {
let { isRender , current_user , giteaVisible , email } = this.state; let { isRender , current_user } = this.state;
const common = { const common = {
showLoginDialog: this.showLoginDialog, showLoginDialog: this.showLoginDialog,
checkIfLogin: this.checkIfLogin, checkIfLogin: this.checkIfLogin,
}; };
return ( return (
<div className="indexHOC"> <div className="indexHOC">
<EducoderAccount visible={giteaVisible} email={email} onOk={this.onOk}/>
{isRender === true ? <LoginDialog {isRender === true ? <LoginDialog
Modifyloginvalue={() => this.hideLoginDialog()} Modifyloginvalue={() => this.hideLoginDialog()}
{...this.props} {...this.props}