合并谢思修改的个人开源主页代码

This commit is contained in:
何童崇 2022-03-03 11:29:42 +08:00
commit e56c271540
12 changed files with 91 additions and 31 deletions

View File

@ -25,7 +25,7 @@ function DeleteBox({
>
<div className="desc">
<AlignCenter className="descMain"><i className="iconfont icon-shanchu_tc_icon mr10"></i>{content}</AlignCenter>
<p>{subTitle}</p>
<p className="task-hide-2" style={{WebkitLineClamp:5}}>删除后未来事件将不会推送至此Webhook地址<span title={subTitle}>{subTitle}</span></p>
</div>
</Modals>
)

View File

@ -36,15 +36,15 @@ function About(props, ref) {
const [ disabled, setDisabled ] = useState(false);
const [ typeFlag, setTypeFlag] = useState(false);
const AuthorLogin = props.projectDetail && props.projectDetail.author && props.projectDetail.author.login;
const isPermission = props.projectDetail && props.projectDetail.permission && props.projectDetail.permission!=="Reporter";
const CurrentLogin = props.current_user && props.current_user.login;
useEffect(()=>{
if(CurrentLogin === AuthorLogin){
if(isPermission){
auth('get');
}else{
setIsSpining(false);
}
},[AuthorLogin,CurrentLogin])
},[isPermission,CurrentLogin])
function auth(type){
const url = `/${owner}/${projectsId}/ci_authorize.json`;
@ -167,7 +167,7 @@ function About(props, ref) {
<img src={activate} alt="" width="250px" />
<P>定义DevOps工作流帮助您检测bug发布代码</P>
{
CurrentLogin !== AuthorLogin ?
!isPermission ?
<div className="noOperation">DevOps开启功能暂未对项目创建者以外的角色开放可以联系项目创建者进行开启开启后便可查看构建信息</div>:""
}
<a href={"https://forum.trustie.net/forums/3110/detail"} target="_blank" style={{ color: "#5091FF"}}>
@ -177,7 +177,7 @@ function About(props, ref) {
如何使用引擎Engine功能
</a>
{
AuthorLogin === CurrentLogin ?
isPermission ?
<React.Fragment>
{
step === 0 && !typeFlag ?

View File

@ -533,7 +533,7 @@ function CoderDepot(props){
<FlexAJ className="font-18 color-ooo mb20" style={{lineHeight:"28px"}}>关于
{
projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner" || projectDetail.permission==="Manager") &&
<i onClick={()=>setOpenModal(true)} className="iconfont icon-a-shezhi color-grey-9 font-15"></i>
<i onClick={()=>setOpenModal(true)} className="iconfont icon-a-shezhi color-grey-9 font-15 pointer"></i>
}
</FlexAJ>
{desc && <p className="font-14 color-grey-3 mb15 task-hide-2" style={{lineHeight:"24px",WebkitLineClamp:"4",textAlign:"justify",wordBreak:"break-all"}} title={desc}>{desc}</p>}

View File

@ -255,7 +255,7 @@ class Index extends Component {
<Menu onClick={this.ChangeSoryBy}>
<Menu.Item key="updated_on">更新时间排序</Menu.Item>
<Menu.Item key="created_on">创建时间排序</Menu.Item>
<Menu.Item key="forked_count">fork数排序</Menu.Item>
<Menu.Item key="forked_count">fork数排序</Menu.Item>
<Menu.Item key="praises_count">点赞数量排序</Menu.Item>
</Menu>
)

View File

@ -210,8 +210,10 @@ class order extends Component {
});
}
}
const { select_params } = this.state;
this.setState({
select_params:{
...select_params,
order_name:key_name[0],
order_type:e.item.props.value,
page:1
@ -220,9 +222,6 @@ class order extends Component {
const { status_type } = this.state;
this.getIssueList(status_type);
})
// this.state.select_params.order_name = key_name[0];
// this.state.select_params.order_type = e.item.props.value;
// this.state.select_params.page = 1;
};
getOption = (e, id, name, toGet) => {
@ -283,15 +282,15 @@ class order extends Component {
// 翻页
ChangePage = (page) => {
window.scrollTo(0,0);
const { status_type } = this.state;
this.setState({
isSpin: true,
checkedValue: [],
all: false
all: false,
},()=>{
this.state.select_params.page=page;
this.getIssueList(status_type);
});
const { status_type } = this.state;
this.state.select_params.page = page;
this.getIssueList(status_type);
};
// 搜索
@ -346,12 +345,12 @@ class order extends Component {
ChangeAssign = (type) => {
const { current_user } = this.props;
this.setState({
isSpin: true,
isSpin: true
});
if (type) {
if (!current_user) {
this.setState({
isSpin: false,
isSpin: false
});
return;
}
@ -385,7 +384,7 @@ class order extends Component {
this.state.select_params.author_id = undefined;
}
const { status_type } = this.state;
this.state.select_params.page = 1;
this.getIssueList(status_type);
};
@ -563,6 +562,49 @@ class order extends Component {
}
})
}
clearSelectParams=()=>{
this.setState({
status_type: "1", // 默认显示开启中的
issue_tag_ids: "标记",
tracker_ids: "类型",
author_ids: "发布人",
assigned_to_ids: "负责人",
fixed_version_ids: "里程碑",
status_ids: "状态",
done_ratios: "完成度",
paix: "排序",
update_author_ids: "更换负责人",
update_fixed_version_ids: '更换里程碑',
update_status_ids: "修改状态",
begin: '',
end: '',
checkedValue: [],
allValue: [],
all: false,
search:undefined,
select_params: {
assigned_to_id: undefined, // 负责人
author_id: undefined, // 发布人
issue_tag_id: undefined, // 标记
tracker_id: undefined, //类型
done_ratio: undefined, // 完成度
status_id: undefined, // 优先级
fixed_version_id: undefined,//里程碑
order_name: undefined,
order_type: undefined,
search: undefined,
update_author_id: undefined,
update_fixed_version_id: undefined,
update_status_id: undefined,
page: 1,
limit: 15,
}
},()=>{
this.getIssueList("1");
})
}
menu =()=> (
<Menu onClick={(e) => this.getMenu(e)}>
<Menu.Item key={"created_on-desc"} value="desc">
@ -634,6 +676,7 @@ class order extends Component {
/>
</div>
<div>
<a className="mr20 color-grey-6" onClick={this.clearSelectParams}><i className="iconfont icon-shanchu6 mr3 font-14"></i></a>
<DatePicker
value={begin ? moment(begin, 'YYYY-MM-DD') : ""}
style={{ marginRight: "20px" }}
@ -912,7 +955,7 @@ class order extends Component {
<div className="pt30 mb30 edu-txt-center" style={{borderTop:"1px solid #eee"}}>
<Pagination
simple
defaultCurrent={select_params.page}
current={select_params.page}
total={search_count}
pageSize={select_params.limit}
onChange={this.ChangePage}

View File

@ -177,7 +177,7 @@ function New({ form , match , showNotification , history }) {
onSuccess={onSuccess}
title="删除Webhook"
content="您确定要删除此Webhook吗"
subTitle={`删除后未来事件将不会推送至此Webhook地址${data && data.url}`}
subTitle={`${data && data.url}`}
/>
<Banner>
<span>
@ -199,7 +199,7 @@ function New({ form , match , showNotification , history }) {
}
]
})(
<Input placeholder="请输入目标URL" size="large" autocomplete='off'/>
<Input placeholder="请输入目标URL" maxLength="100" size="large" autocomplete='off'/>
)}
</Form.Item>
<Form.Item label="Webhook密钥" colon={false}>
@ -260,7 +260,7 @@ function New({ form , match , showNotification , history }) {
</span> */}
<span>
<Checkbox value="create">创建</Checkbox>
<span>删除分支或标签</span>
<span>创建分支或标签</span>
</span>
<span>
<Checkbox value="delete">删除</Checkbox>

View File

@ -74,6 +74,7 @@ export default Form.create()(
function getImage(image){
setImageFlag(true);
setImage(image);
console.log(image);
}
//
@ -107,6 +108,7 @@ export default Form.create()(
}
callback();
}
return(
<div>
<WhiteBack>
@ -176,11 +178,11 @@ export default Form.create()(
'最大仓库数:',
"max_repo_creation",
[],
<InputNumber value="-1" style={{width:"350px"}}/>,false,false,
<InputNumber value="-1" max={1000} style={{width:"350px"}}/>,false,false,
"当输入栏为空时,默认数量无限制"
)}
<p>选择头像:</p>
<UploadImage url={getImageUrl(`/${image}`)} getImage={getImage}/>
<UploadImage url={image&&image.startsWith('images/avatars/Organization')?getImageUrl(`/${image}`):image} getImage={getImage}/>
<Button type={"primary"} onClick={updateDetail}>更新组织设置</Button>
</Form>
</Div>

View File

@ -6,7 +6,7 @@ import Nodata from '../Nodata';
import { Pagination , Spin } from 'antd';
import AddMemberBox from './Component/AddMemberBox';
const limit = 15;
const limit = 16;
function TeamMember({organizeDetail,current_user,history,match}){
const OIdentifier = match.params.OIdentifier;
const [ page , setPage ] = useState(1);
@ -24,7 +24,7 @@ function TeamMember({organizeDetail,current_user,history,match}){
setIsSpin(true);
const url = `/organizations/${organizeDetail.id}/organization_users.json`;
axios.get(url,{
page,limit
params:{page,limit}
}).then(result=>{
if(result && result.data){
setList(result.data.organization_users);
@ -76,7 +76,7 @@ function TeamMember({organizeDetail,current_user,history,match}){
{
total >limit &&
<div className="mt20 pb20 edu-txt-center">
<Pagination simple current={page} pageSize={limit} total={total} onChange={(page)=>setPage(page)}/>
<Pagination simple current={page} pageSize={limit} total={total} onChange={(p)=>setPage(p)}/>
</div>
}
</WhiteBack>

View File

@ -108,7 +108,7 @@ class InfosUser extends Component {
<Menu onClick={this.ChangeSoryBy}>
<Menu.Item key="updated_on">更新时间排序</Menu.Item>
<Menu.Item key="created_on">创建时间排序</Menu.Item>
<Menu.Item key="forked_count">fork数排序</Menu.Item>
<Menu.Item key="forked_count">fork数排序</Menu.Item>
<Menu.Item key="praises_count">点赞数量排序</Menu.Item>
</Menu>
);

View File

@ -202,7 +202,7 @@ function Index(props) {
<div className="echartBox">
<p>展示你擅长关注感兴趣的专业范围通过你参与项目收藏项目关注项目复刻项目等数据来统计</p>
{
cloudData && cloudData.categories && cloudData.categories.length >0 ?
cloudData && cloudData.categories && cloudData.categories.length > 0?
<Cloud data={cloudData}/>
:
<Nodata _html="暂无数据" small={true}/>

View File

@ -2,7 +2,7 @@ import React from "react";
import Login from "./Login";
import Register from "./Register";
import ResetPassword from "./ResetPassword";
import logo from './img/logo.png';
import logo from './img/logo.svg';
import banner from './img/banner.png';
import ball from './img/ball.png';
import img1 from './img/img1.png';

View File

@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="88" viewBox="0 0 400 88">
<defs>
<linearGradient id="linear-gradient" y1="0.501" x2="1" y2="0.501" gradientUnits="objectBoundingBox">
<stop offset="0" stop-color="#6dffff"/>
<stop offset="1" stop-color="#0080ff"/>
</linearGradient>
</defs>
<g id="logo" transform="translate(-181 -101)">
<rect id="矩形_1" data-name="矩形 1" width="400" height="88" transform="translate(181 101)" fill="#fff" opacity="0"/>
<g id="顶部logo" transform="translate(181.055 106.72)">
<path id="形状" d="M64.185,77.408H51.334V0h8.379V69.74h4.473v7.668Zm10.223-8.6,0,0-6.029-3.653V10.536l6.033-3.655V68.809Zm-38.624-.144V17.273l-3.337-1.217V6.881l12.71,7.382v6.953L41.891,20V65.511l-6.1,3.152ZM22.152,60.493V17.059L28.9,20.427v36.7l-6.742,3.365Zm69.793,0h0l-3.051-.5L85.2,53.9v3.941l-2.343-1.217V20.856l2.84-1.433,3.265,4.445-.072-5.734,3.054-1.147V60.493ZM.072,57.841H0V23.295l14.626,4.874v5.806L5.68,32.326V47.52L10.508,45.3V40.5H7.74V35.551l6.957.715V50.388L.073,57.84Zm120.7-.142h-.005l-9.226-.432-5.678-7.382v4.946l-5.894-1.219V27.881l5.894-1.433v4.8l5.325-7.169,8.021-.859L108.417,40.354l12.351,17.341Z" transform="translate(0 0)" fill="url(#linear-gradient)"/>
<path id="形状-2" data-name="形状" d="M192.836,66.37l0,0-1.63-1.215a16.1,16.1,0,0,0,1.136-2.222A15.2,15.2,0,0,0,193,61.32c.04-.111.08-.22.12-.326a12.573,12.573,0,0,0,.567-1.934l1.918.5a4.741,4.741,0,0,0-.142.646c-.066.2-.132.414-.205.652-.085.276-.179.58-.292.925a22.742,22.742,0,0,1-.852,2.15,27.108,27.108,0,0,1-1.278,2.434ZM64.824,66.3h0l-.991-.356-.924-.358c.142-.571.253-1.115.351-1.595.051-.248.1-.482.146-.7.085-.423.144-.847.207-1.3.044-.318.09-.645.148-1l.01-.12c.068-.806.132-1.567.132-2.388V50.6h6.888l1.491-2.222H66.1c-.237.359-.453.677-.645.957-.154.226-.294.43-.419.62-.1.124-.188.23-.263.32-.146.174-.234.279-.234.326l-1.491-1.5c.418-.565.851-1.148,1.136-1.577.172-.3.369-.607.578-.927.137-.211.277-.425.416-.65a14.379,14.379,0,0,0,.713-1.361c.071-.149.14-.293.209-.432l1.777,1a3.542,3.542,0,0,1-.31.7c-.042.079-.082.157-.118.229h7.668v1.718L73.272,50.53h1.136V50.1H76.4V63.646a2.617,2.617,0,0,1-.639,1.793,2.039,2.039,0,0,1-1.633.718H72.989V63.934h1.136c.191,0,.283-.117.283-.358V61.712H71v3.943H69.013V61.712H65.676c-.043.386-.11.738-.174,1.08-.043.226-.083.439-.112.641a8.225,8.225,0,0,1-.173.91c-.042.181-.082.352-.11.522-.071.437-.143.725-.214,1a2.19,2.19,0,0,0-.07.426Zm6.105-9.317v2.58h3.409v-2.58Zm-5.042.072v2.508h3.054V57.053Zm5.042-4.3v2.006h3.409V52.752Zm-5.042,0v2.006h3.054V52.752ZM188.649,66.3l0,0-1.7-1.142c.058-.118.128-.272.209-.45.117-.256.262-.574.429-.913.288-.584.575-1.234.852-1.934a15.544,15.544,0,0,0,.611-1.811q.05-.172.1-.339a7.222,7.222,0,0,0,.283-2.006V44.511h15.62v2.22h-13.7V57.555a8.817,8.817,0,0,1-.211,1.862,19.834,19.834,0,0,1-.5,1.937c-.208.627-.418,1.192-.622,1.738l-.019.052a16.993,16.993,0,0,1-.639,1.577c-.113.231-.207.442-.29.628-.073.162-.141.314-.206.447a2.02,2.02,0,0,0-.211.5Zm14.554-.07v0l-2.342-6.449,1.777-.862,2.413,6.451-1.844.86Zm-6.036,0h-1.491V64.006h1.491a.259.259,0,0,0,.214-.072.266.266,0,0,0,.072-.216V58.486h-4.828V48.953h3.123l1.208-2.222,1.7,1.219-.567,1h4.189v-.5h1.988v7.526a2.635,2.635,0,0,1-.639,1.793,2,2,0,0,1-1.442.726,1.727,1.727,0,0,1-.193-.011H199.44v5.232a2.627,2.627,0,0,1-.639,1.793A2.313,2.313,0,0,1,197.167,66.229Zm-2.554-11.182v1.289h7.382c.214,0,.286-.072.286-.286v-1Zm0-3.8v1.5h7.668v-1.5Zm-9.87,14.981h0l-1.772-.932,3.407-7.884,1.846.931-3.478,7.884Zm-124.25,0h-4.4v-9.1c-.142.214-.286.433-.425.646l-.121.183c-.1.156-.2.309-.306.46l-1.561-1.361A12.764,12.764,0,0,0,55.1,54.545l.012-.029c.345-.837.7-1.7.912-2.409.2-.746.339-1.293.5-1.934a5.114,5.114,0,0,0,.211-1V47.376H54.812V45.154h8.237v2.222h-4.4v2.078c0,.048-.032.224-.1.575-.032.174-.071.386-.117.644a22.027,22.027,0,0,1-.78,2.8h3.123v-.43h1.988V63.718a2.617,2.617,0,0,1-.639,1.793A2.039,2.039,0,0,1,60.493,66.229ZM57.936,55.762v8.316h2.415c.212,0,.283-.073.283-.288V55.762ZM167.774,66.157h-1.988V56.05h-8.379a17.373,17.373,0,0,1-1.064,3.869c-.455,1.111-.906,2.189-1.421,3.154-.518.9-.935,1.6-1.277,2.15-.528.62-.639.811-.639.862l-1.563-1.433c.007-.01.215-.289.5-.718.292-.443.671-1.135,1.066-1.865a24.842,24.842,0,0,0,1.277-2.722,23.343,23.343,0,0,0,1.064-3.37h-5.181V53.756h5.467a1.614,1.614,0,0,0,.07-.574V47.235h-4.045V45.012h19.6v2.222h-3.479v6.593h5.042V56.05h-5.042V66.157ZM157.691,47.235v5.947a1.447,1.447,0,0,0-.07.574h8.093V47.235ZM87.9,66.157h0v0l-.281-1.073-.283-1.075a5.866,5.866,0,0,0,.78-.288c.449-.193,1.022-.45,1.918-.859.636-.321,1.448-.79,2.485-1.433a17.173,17.173,0,0,0,2.626-2.009H87.259V57.2h9.87a13.358,13.358,0,0,0,.78-1.363,8.376,8.376,0,0,0,.569-1.433v-4.73h1.988V54.9a6,6,0,0,1-.994,2.294H109.2v2.22h-8.1l7.882,4.8-.993,1.934-8.452-5.16.783-1.577h-2.2A18.535,18.535,0,0,1,96.063,61.5c-.605.49-1.325,1.03-2.2,1.649a16.9,16.9,0,0,1-2.132,1.291c-.247.125-.475.248-.694.368a9.545,9.545,0,0,1-1.152.563,10.6,10.6,0,0,1-1.066.463c-.1.038-.193.074-.281.11A2.943,2.943,0,0,1,87.9,66.157Zm40.328-4.946a3.976,3.976,0,0,1-3.9-3.943,3.905,3.905,0,1,1,7.81,0A3.977,3.977,0,0,1,128.226,61.21ZM94.572,56.765h0l-5.322-2.435.711-2.078,5.325,2.436-.71,2.076Zm165.006-.358H218.966V54.831h40.612v1.577Zm-218.469,0H.5V54.831H41.109v1.577Zm145.764-.5,0,0-3.618-3.725,1.277-1.649,3.692,3.727L186.874,55.9ZM96.845,54.044h0L91.52,51.533l.78-2.078,5.325,2.58-.779,2.006Zm-7.457-2.8H87.4V46.373h9.942L96.7,45.012l1.774-1,1.064,2.436h7.526v-.43h1.988v5.16h-1.988V48.6H89.388v2.652Zm97.484-1.291,0,0-3.69-3.725,1.28-1.646,3.692,3.725-1.278,1.646ZM25.985,33.9H0V.144H41.394l-2.557,4.37v.072h-26.7V29.53h17.4v-11.9H20.8V13.188H41.25V33.9l-11.713,0V30.319L25.986,33.9Zm207.676-.07h0l-11.356,0V.072h11.358v18.2l11.005-8.17h14.059L245.732,20.141l12.706,13.685-12.706,0L233.661,21.217V33.833Zm-66.1,0H156.2V10.106h11.36V33.831Zm-24.354,0h-31.1V.072h11.857V29.458h21.725l-2.484,4.372Zm-44.587,0H79.946V14.407H73.911V10.178h6.036V2.436h11.36v7.742H101.6l-2.84,4.229H91.307V29.746h9.8L98.62,33.829Zm-35.287,0H51.972V10.106h11.36V33.831Zm148.39-.144H200.5V10.034l-3.9,4.229h-7.1V33.687H178.141V10.034h33.582V33.687ZM167.56,7.31H156.2V0h11.36V7.31Zm-104.228,0H51.972V0h11.36V7.31Z" transform="translate(140.368 8.673)" fill="#fffdfd"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB