注销账号+已注销账号头像以及点击跳转
This commit is contained in:
commit
d93ab544a6
|
@ -97,6 +97,7 @@ export function initAxiosInterceptors(props) {
|
|||
}
|
||||
|
||||
if (response.data.status === 404) {
|
||||
console.log("response:",response);
|
||||
let responseURL = (response && response.request) ? response.request.responseURL:'';
|
||||
// 组织和个人的拥有情况,404不跳转
|
||||
if (responseURL.indexOf('/api/users/') === -1 && responseURL.indexOf('/api/organizations/') === -1 ) {
|
||||
|
|
|
@ -32,10 +32,18 @@ class ActivityItem extends Component {
|
|||
</p >
|
||||
}
|
||||
<p className="itemLine mt10">
|
||||
<Link to={`/${item && item.user_login}`} className="show-user-link">
|
||||
<img alt="" src={getImageUrl(`/${item.user_avatar}`)} className="createImage" />
|
||||
<span className="mr20">{item.user_name}</span>
|
||||
</Link>
|
||||
{
|
||||
item && item.user_login ?
|
||||
<Link to={`/${item.user_login}`} className="show-user-link">
|
||||
<img alt="" src={getImageUrl(`/${item.user_avatar}`)} className="createImage" />
|
||||
<span className="mr20">{item.user_name}</span>
|
||||
</Link>
|
||||
:
|
||||
<span className="show-user-link">
|
||||
<img alt="" src={getImageUrl(`/${item.user_avatar}`)} className="createImage" />
|
||||
<span className="mr20 color-grey-6">{item.user_name}</span>
|
||||
</span>
|
||||
}
|
||||
{item.created_at && <span className="color-grey-9">创建于<span className="ml2 color-grey-6">{item.created_at}</span></span>}
|
||||
</p >
|
||||
</div>
|
||||
|
|
|
@ -5,25 +5,21 @@ import axios from 'axios';
|
|||
|
||||
const Option = AutoComplete.Option;
|
||||
|
||||
export default ({ getUser , placeholder, width ,value })=>{
|
||||
export default ({ getUser , placeholder, width ,value, userList=[] })=>{
|
||||
const [ source , setSource ] = useState(undefined);
|
||||
const [ searchKey , setSearchKey ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
if(!value){
|
||||
setSearchKey(undefined);
|
||||
if(userList && userList.length){
|
||||
sourceOptions(userList);
|
||||
}else{
|
||||
getUserList();
|
||||
}
|
||||
},[value])
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
getUserList();
|
||||
},[searchKey])
|
||||
|
||||
function getUserList(e){
|
||||
function getUserList(value){
|
||||
const url = `/users/list.json`;
|
||||
axios.get(url, {
|
||||
params: {
|
||||
search: searchKey,
|
||||
search: value,
|
||||
},
|
||||
}).then((result) => {
|
||||
if (result) {
|
||||
|
@ -61,13 +57,9 @@ export default ({ getUser , placeholder, width ,value })=>{
|
|||
setSource(s);
|
||||
}
|
||||
|
||||
function changeInputUser(e){
|
||||
setSearchKey(e);
|
||||
};
|
||||
|
||||
// 选择用户
|
||||
function selectInputUser(e, option){
|
||||
setSearchKey(option.props.name);
|
||||
getUserList(option.props.name);
|
||||
getUser(option.props.login);
|
||||
};
|
||||
|
||||
|
@ -76,12 +68,12 @@ export default ({ getUser , placeholder, width ,value })=>{
|
|||
<AutoComplete
|
||||
getPopupContainer={trigger => trigger.parentNode}
|
||||
dataSource={source}
|
||||
value={searchKey}
|
||||
style={{ width: width || 300 }}
|
||||
onChange={changeInputUser}
|
||||
onSearch={(value)=>{getUserList(value)}}
|
||||
onSelect={selectInputUser}
|
||||
placeholder={placeholder || "搜索需要添加的用户..."}
|
||||
allowClear
|
||||
optionLabelProp="name"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -20,8 +20,8 @@ export default ({ url , name , column , id , login })=>{
|
|||
}
|
||||
`;
|
||||
return(
|
||||
id?
|
||||
<Link to={`/${login}`}>
|
||||
(id && login)?
|
||||
<Link to={`/${login ||""}`}>
|
||||
<span className="User">
|
||||
{ url && <img src={url} alt=""/> }
|
||||
<span>{name}</span>
|
||||
|
|
|
@ -8,14 +8,9 @@ const { Option } = Select;
|
|||
function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
const [ cate , setCate ] = useState(0);
|
||||
const [ value , setValue ] = useState(undefined);
|
||||
|
||||
const [ organizations , setOrganizations ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
setFieldsValue({goal:cate})
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
if(owner && repo && visible===true){
|
||||
getTeam();
|
||||
|
@ -25,7 +20,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
owner_name:undefined,
|
||||
identifier:undefined
|
||||
})
|
||||
setValue(undefined)
|
||||
setCate(0);
|
||||
}
|
||||
},[repo,owner,visible])
|
||||
|
||||
|
@ -79,7 +74,6 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
};
|
||||
|
||||
function getUser(id){
|
||||
setValue(id);
|
||||
setFieldsValue({
|
||||
owner_name:id
|
||||
})
|
||||
|
@ -94,6 +88,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
okText="确认转移"
|
||||
cancelText={"取消"}
|
||||
centered
|
||||
destroyOnClose={true}
|
||||
>
|
||||
<div className="diverModal">
|
||||
{
|
||||
|
@ -113,7 +108,8 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
<Form {...layout} colon={false} layout={"horizontal"}>
|
||||
<Form.Item label="转移给:" style={{marginBottom:"0px"}}>
|
||||
{getFieldDecorator("goal",{
|
||||
rules:[]
|
||||
rules:[],
|
||||
initialValue: 0
|
||||
})(
|
||||
<Radio.Group onChange={changeType}>
|
||||
<Radio value={0}>个人</Radio>
|
||||
|
@ -128,7 +124,7 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
rules:[{required:true,message:"请输入目标用户名"}]
|
||||
})(
|
||||
// <Input placeholder="请输入目标用户" autoComplete={"off"}/>
|
||||
<SearchUser getUser={getUser} width={"100%"} placeholder="请输入目标用户" value={value}/>
|
||||
<SearchUser getUser={getUser} width={"100%"} placeholder="请输入目标用户"/>
|
||||
)}
|
||||
</Form.Item>
|
||||
}
|
||||
|
|
|
@ -125,14 +125,19 @@ function IssueCommentList(props){
|
|||
{journals && (journals.length > 0 && journals.map(item=>{return <div key={item.id} className='commentContentBox pb30'>
|
||||
{/* 评论 */}
|
||||
<div className='commentOperationBor'></div>
|
||||
<Link to={`/${item.user.login}`}><img src={getImageUrl(item.user.image_url)} alt="" className='commentUserImg mr15'/></Link>
|
||||
{
|
||||
item.user.login ?
|
||||
<Link to={`/${item.user.login}`}><img src={getImageUrl(item.user.image_url)} alt="" className='commentUserImg mr15'/></Link>
|
||||
:
|
||||
<span><img src={getImageUrl(item.user.image_url)} alt="" className='commentUserImg mr15'/></span>
|
||||
}
|
||||
<div className='commentContentRight'>
|
||||
{/* 判断是否是编辑状态 */}
|
||||
{(showEdit === 2 && updateId === item.id) ? <div className='mt15 mr20'><EditComment {...props} cancelMd={cancelMd} updateId={updateId} reloadComment={reloadComment} content={item.notes} defaultFileList={item.attachments} showUserImg={false}/></div> : <div>
|
||||
<div className='commentContent'>
|
||||
<div className='flexCenter font-14'>
|
||||
<div>
|
||||
<Link to={`/${item.user.login}`}>{item.user.name}</Link>
|
||||
{item.user.login ? <Link to={`/${item.user.login}`}>{item.user.name}</Link>:<span>{item.user.name}</span>}
|
||||
<span className='ml15 timeAgo font-14'>{timeAgo(item.created_at)}</span>
|
||||
</div>
|
||||
{login && !isPhone() && <div>
|
||||
|
|
|
@ -129,7 +129,7 @@ function IssueCommentList(props){
|
|||
<div className='operationCommentBor'></div>
|
||||
<div className='flexCenter font-14' style={{width: '100%'}}>
|
||||
<div className='flexCenter opBox'>
|
||||
<span className='iconBackBox mr10'><i className={`iconfont font-12 ${journalsIcon[item.operate_category]}`}></i></span>
|
||||
<span className='iconBackBox mr10'><i className={`iconfont font-12 ${journalsIcon[item.operate_category] || "icon-xiugaibaobiaomoba"}`}></i></span>
|
||||
<div className='task-hide' style={{maxWidth: item.closeAndSpan && item.id === item.start? '550px' : '700px'}}>
|
||||
<Link to={`/${item.user.login}`}><img src={getImageUrl(item.user.image_url)} alt="" className='commentUserImg mr5'/></Link>
|
||||
<Link to={`/${item.user.login}`}>{item.user.name} </Link>
|
||||
|
@ -142,14 +142,19 @@ function IssueCommentList(props){
|
|||
</div> : '' : <div key={item.id} className='commentContentBox pb30'>
|
||||
{/* 评论 */}
|
||||
<div className='commentOperationBor'></div>
|
||||
<Link to={`/${item.user.login}`}><img src={getImageUrl(item.user.image_url)} alt="" className='commentUserImg mr15'/></Link>
|
||||
{
|
||||
item.user.login ?
|
||||
<Link to={`/${item.user.login}`}><img src={getImageUrl(item.user.image_url)} alt="" className='commentUserImg mr15'/></Link>
|
||||
:
|
||||
<span><img src={getImageUrl(item.user.image_url)} alt="" className='commentUserImg mr15'/></span>
|
||||
}
|
||||
<div className='commentContentRight'>
|
||||
{/* 判断是否是编辑状态 */}
|
||||
{(showEdit === 2 && updateId === item.id) ? <div className='mt15 mr20'><EditComment {...props} cancelMd={cancelMd} updateId={updateId} reloadComment={reloadComment} content={item.notes} defaultFileList={item.attachments} showUserImg={false}/></div> : <div>
|
||||
<div className='commentContent'>
|
||||
<div className='flexCenter font-14'>
|
||||
<div>
|
||||
<Link to={`/${item.user.login}`}>{item.user.name}</Link>
|
||||
{item.user.login ? <Link to={`/${item.user.login}`}>{item.user.name}</Link>:<span>{item.user.name}</span>}
|
||||
<span className='ml15 timeAgo font-14'>{timeAgo(item.created_at)}</span>
|
||||
</div>
|
||||
{login && <div>
|
||||
|
|
|
@ -53,8 +53,13 @@ function Datas({checkbox ,item , projectsId,owner,chooseTagFunc}){
|
|||
<Copy value={`/${owner}/${projectsId}/issues/${item.project_issues_index}`}><span className="number">#{item.project_issues_index}</span></Copy>
|
||||
}
|
||||
</div>
|
||||
<Link to={`/${item.author && item.author.login}`}><i className="iconfont icon-chengyuan2 mr3 font-12" style={{color:'#898d9d'}}></i></Link>
|
||||
<span className="mr12"><Link style={{color:"#898d9d"}} to={`/${item.author && item.author.login}`}>{item.author && item.author.name}</Link></span>
|
||||
<span className="mr12">
|
||||
{item.author && item.author.login ?
|
||||
<Link style={{color:"#898d9d"}} to={`/${item.author.login}`}>
|
||||
<i className="iconfont icon-chengyuan2 mr3 font-12" style={{color:'#898d9d'}}></i>{item.author && item.author.name}</Link>
|
||||
:<span><i className="iconfont icon-chengyuan2 mr3 font-12" style={{color:'#898d9d'}}></i>{item.author && item.author.name}</span>
|
||||
}
|
||||
</span>
|
||||
<span className="mr12">{item.created_at} 发布</span>
|
||||
<span className="mr20">{item.updated_at}更新</span>
|
||||
{item.blockchain_token_num && <span className="mr30"><img src={gold} alt="" width="13px" className="mr3"/>{item.blockchain_token_num}</span>}
|
||||
|
|
|
@ -393,7 +393,11 @@ function Details(props){
|
|||
{
|
||||
details.author &&
|
||||
<div>
|
||||
<Link to={`/${details.author.login}`} className="author"><img src={getImageUrl(details.author.image_url)} alt="" />{details.author.name}</Link>
|
||||
{ details.author.login ?
|
||||
<Link to={`/${details.author.login}`} className="author"><img src={details.author.image_url} alt="" />{details.author.name}</Link>
|
||||
:
|
||||
<span className="author color-grey-6"><img src={details.author.image_url} alt="" />{details.author.name}</span>
|
||||
}
|
||||
<span className="ml10" style={{color:"#898d9d"}}>添加于{details.created_at}</span>
|
||||
</div>
|
||||
}
|
||||
|
|
|
@ -79,25 +79,34 @@ class MergeItem extends Component {
|
|||
</Tag>
|
||||
</p>
|
||||
<p className="grid-item font-13">
|
||||
<Link
|
||||
to={`/${item && item.author_login}`}
|
||||
className="show-user-link"
|
||||
>
|
||||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(`/${item && item.avatar_url}`)}
|
||||
alt=""
|
||||
width="24"
|
||||
height="24"
|
||||
/>
|
||||
</Link>
|
||||
<AlignCenter>
|
||||
<Link
|
||||
to={`/${item && item.author_login}`}
|
||||
className="show-user-link color-grey-8 ml5"
|
||||
>
|
||||
{item && item.author_name}
|
||||
</Link>
|
||||
{
|
||||
item && item.author_login ?
|
||||
<Link
|
||||
to={`/${item.author_login}`}
|
||||
className="show-user-link color-grey-8"
|
||||
>
|
||||
<img
|
||||
className="radius mr5"
|
||||
src={getImageUrl(`/${item && item.avatar_url}`)}
|
||||
alt=""
|
||||
width="24"
|
||||
height="24"
|
||||
/>
|
||||
{item && item.author_name}
|
||||
</Link>
|
||||
:
|
||||
<span className="color-grey-6">
|
||||
<img
|
||||
className="radius mr5"
|
||||
src={getImageUrl(`/${item && item.avatar_url}`)}
|
||||
alt=""
|
||||
width="24"
|
||||
height="24"
|
||||
/>{item && item.author_name}
|
||||
</span>
|
||||
}
|
||||
|
||||
<span className="ml15 color-grey-8">
|
||||
{item.pull_request_staus === "open"
|
||||
? "创建于"
|
||||
|
|
|
@ -404,19 +404,23 @@ class MessageCount extends Component {
|
|||
{
|
||||
<div className="mt15">
|
||||
<Tag className="pr-branch-tag">
|
||||
<Link
|
||||
to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.author_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
|
||||
className="ver-middle task-hide" style={{maxWidth:"300px"}} title={`${data.pull_request.fork_project_user}: ${data.pull_request && data.pull_request.head}`}
|
||||
>
|
||||
{data.pull_request && (data.pull_request.is_original ? data.pull_request.fork_project_user:data.issue.author_name)}: {data.pull_request && data.pull_request.head}
|
||||
</Link>
|
||||
{
|
||||
(data.pull_request.fork_project_user || data.issue.author_name!=="已注销") ?
|
||||
<Link
|
||||
to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.author_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
|
||||
className="ver-middle task-hide" style={{maxWidth:"300px"}} title={`${data.pull_request.fork_project_user}: ${data.pull_request && data.pull_request.head}`}
|
||||
>
|
||||
{data.pull_request && (data.pull_request.is_original ? data.pull_request.fork_project_user:data.issue.author_name)}: {data.pull_request && data.pull_request.head}
|
||||
</Link>
|
||||
:
|
||||
<span className="ver-middle task-hide" style={{maxWidth:"300px"}} title={`${data.pull_request.fork_project_user}: ${data.pull_request && data.pull_request.head}`}>
|
||||
{data.pull_request && (data.pull_request.is_original ? data.pull_request.fork_project_user:data.issue.author_name)}: {data.pull_request && data.pull_request.head}
|
||||
</span>
|
||||
|
||||
}
|
||||
</Tag>
|
||||
<span className="mr8 ver-middle">
|
||||
<i
|
||||
className={
|
||||
"iconfont icon-youjiang color-grey-c font-16"
|
||||
}
|
||||
></i>
|
||||
<i className={"iconfont icon-youjiang color-grey-c font-16"} />
|
||||
</span>
|
||||
<Tag className="pr-branch-tag">
|
||||
<Link
|
||||
|
@ -430,16 +434,26 @@ class MessageCount extends Component {
|
|||
}
|
||||
|
||||
<div className="mt15">
|
||||
<Link to={`/${data.issue.author_login}`} className="show-user-link">
|
||||
<img className="mr5" src={getImageUrl(`/${data.issue.author_picture}`)}
|
||||
alt="" width="24" height="24" style={{borderRadius:"50%"}}
|
||||
/>
|
||||
</Link>
|
||||
{
|
||||
data.issue.author_login?
|
||||
<Link to={`/${data.issue.author_login}`} className="show-user-link">
|
||||
<img className="mr5" src={getImageUrl(`/${data.issue.author_picture}`)}
|
||||
alt="" width="24" height="24" style={{borderRadius:"50%"}}
|
||||
/>
|
||||
</Link>
|
||||
:
|
||||
<span><img className="mr5" src={getImageUrl(`/${data.issue.author_picture}`)} alt="" width="24" height="24" style={{borderRadius:"50%"}}/></span>
|
||||
}
|
||||
<span className="ver-middle">
|
||||
<span className="color-grey-8 mr5">由</span>
|
||||
<Link to={`/${data.issue.author_login}`} className="show-user-link color-blue">
|
||||
{data.issue.author_name}
|
||||
</Link>
|
||||
{
|
||||
data.issue.author_login ?
|
||||
<Link to={`/${data.issue.author_login}`} className="show-user-link color-blue">
|
||||
{data.issue.author_name}
|
||||
</Link>
|
||||
:
|
||||
<span className="show-user-link color-grey-6">{data.issue.author_name}</span>
|
||||
}
|
||||
<span className="ml5 color-grey-8">
|
||||
{pr_status === 0
|
||||
? "创建于"
|
||||
|
|
|
@ -146,18 +146,14 @@ const ReplyItem = memo(({ note, isChild }) => {
|
|||
<div className="reply-item-head">
|
||||
<Link
|
||||
to={`/${note.user && note.user.login}`}
|
||||
className="show-user-link"
|
||||
className="show-user-link color-black fwb"
|
||||
>
|
||||
<Avatar src={note.user && note.user.imageUrl
|
||||
? getImageUrl(`/${note.user.imageUrl}`)
|
||||
: "images/avatars/User/b"} size={24} />
|
||||
</Link>
|
||||
<Link
|
||||
to={`/${note.user && note.user.login}`}
|
||||
className="show-user-link color-black ml10 fwb"
|
||||
>
|
||||
: "images/avatars/User/b"} size={24} className="mr10"/>
|
||||
{note.user && note.user.username}
|
||||
</Link> 于 <span className="show-user-link color-black">{timeAgo(note.createdAt)}</span> 发表评论:
|
||||
</Link>
|
||||
于 <span className="show-user-link color-black">{timeAgo(note.createdAt)}</span> 发表评论:
|
||||
<span className="btn-right">
|
||||
{user &&
|
||||
(user.admin ||
|
||||
|
|
|
@ -19,11 +19,15 @@ function Apply(props) {
|
|||
setIsSpin(true);
|
||||
getList();
|
||||
}
|
||||
},[username])
|
||||
},[username, page])
|
||||
|
||||
function getList() {
|
||||
const url = `/users/${username}/applied_projects.json`;
|
||||
Axios.get(url).then(result=>{
|
||||
Axios.get(url,{
|
||||
params:{
|
||||
page,per_page:limit
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
setList(result.data.applied_projects);
|
||||
setTotal(result.data.total_count);
|
||||
|
|
|
@ -23,11 +23,7 @@ function CLAinfos(props){
|
|||
}
|
||||
},[current_user,details])
|
||||
|
||||
useEffect(()=>{
|
||||
if(current_user &&!current_user.login){
|
||||
props.history.push(`/login?go_page=/${OIdentifier}/cla/${claid}`);
|
||||
}
|
||||
},[current_user])
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
if(claid){
|
||||
|
|
|
@ -9,6 +9,7 @@ function TeamSettingCLA(props){
|
|||
const OIdentifier = props.match.params.OIdentifier;
|
||||
const [ list , setList ] = useState(undefined);
|
||||
const [ isSpin , setisSpin ] = useState(false);
|
||||
const { current_user } = props;
|
||||
|
||||
useEffect(()=>{
|
||||
if(OIdentifier){
|
||||
|
@ -28,6 +29,14 @@ function TeamSettingCLA(props){
|
|||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
function toDetail(){
|
||||
if(current_user && current_user.login){
|
||||
window.open(`/${OIdentifier}/cla/${list.key}`, '_blank');
|
||||
}else{
|
||||
window.open(`/login?go_page=/${OIdentifier}/cla/${claid}`, '_blank');
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
<div style={{border:list && list.id ? "none":"1px solid #eee"}}>
|
||||
<Title>CLA管理</Title>
|
||||
|
@ -40,7 +49,7 @@ function TeamSettingCLA(props){
|
|||
<p className="task-hide cla_name">{list.name}</p>
|
||||
<span className="cla_personCount">签署人数<span>{list.count || 0}</span></span>
|
||||
<div className="cla_btn">
|
||||
<Button href={`/${OIdentifier}/cla/${list.key}`} target="_blank" style={{color:"#466aff",borderColor:"#466aff"}}>查看协议</Button>
|
||||
<Button onClick={toDetail} style={{color:"#466aff",borderColor:"#466aff"}}>查看协议</Button>
|
||||
<Button onClick={()=>{props.history.push(`/${OIdentifier}/setting/agreement/${list.key}`)}} style={{color:"#466aff",borderColor:"#466aff"}} className="ml22">编辑</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -124,20 +124,15 @@ class children_comments extends Component {
|
|||
<div className="grid-item pb5">
|
||||
<Link
|
||||
to={`/${item && item.user_login}`}
|
||||
className="show-user-link"
|
||||
className="show-user-link color-black fwb"
|
||||
>
|
||||
<img
|
||||
className="radius"
|
||||
className="radius mr10"
|
||||
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||
alt=""
|
||||
width="30"
|
||||
height="30"
|
||||
/>
|
||||
</Link>
|
||||
<Link
|
||||
to={`/${item && item.user_login}`}
|
||||
className="show-user-link color-black ml10 fwb"
|
||||
>
|
||||
{item && item.user_name}
|
||||
</Link>
|
||||
</div>
|
||||
|
|
|
@ -397,24 +397,34 @@ class comments extends Component {
|
|||
return (
|
||||
<div className="width100" key={item.id}>
|
||||
<div className="pb5">
|
||||
<Link
|
||||
to={`/${item && item.user_login}`}
|
||||
className="show-user-link"
|
||||
>
|
||||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||
alt=""
|
||||
width="30"
|
||||
height="30"
|
||||
/>
|
||||
</Link>
|
||||
<Link
|
||||
to={`/${item && item.user_login}`}
|
||||
className="show-user-link color-black ml10 fwb"
|
||||
>
|
||||
{item && item.user_name}
|
||||
</Link>
|
||||
{
|
||||
item && item.user_login ?
|
||||
<Link
|
||||
to={`/${item && item.user_login}`}
|
||||
className="show-user-link color-black fwb"
|
||||
>
|
||||
<img
|
||||
className="radius mr10"
|
||||
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||
alt=""
|
||||
width="30"
|
||||
height="30"
|
||||
/>
|
||||
{item && item.user_name}
|
||||
</Link>
|
||||
:
|
||||
<span>
|
||||
<img
|
||||
className="radius mr10"
|
||||
src={getImageUrl(`/${item && item.user_picture}`)}
|
||||
alt=""
|
||||
width="30"
|
||||
height="30"
|
||||
/>
|
||||
{item && item.user_name}
|
||||
</span>
|
||||
}
|
||||
|
||||
</div>
|
||||
<div className="ml40">
|
||||
{item.content ? (
|
||||
|
|
|
@ -253,7 +253,7 @@ export default Form.create()(
|
|||
let can_delete = result.data.can_delete;
|
||||
if(can_delete === false){
|
||||
setOffAgain(true);
|
||||
message.error("当前账号名下存在未删除或退出的组织/仓库,请先删除或退出后再尝试注销操作");
|
||||
message.error("当前账号名下存在拥有的组织/代码库,请先删除或转让后再尝试注销操作");
|
||||
} else {
|
||||
setOffAgain(false);
|
||||
setOffVisible(true);
|
||||
|
@ -363,10 +363,10 @@ export default Form.create()(
|
|||
<div className='tipsBox mb15'><img src={img1} alt="" width={16} className='mr10'/>请您谨慎操作,注销后帐号内所有数据都会被清空,且无法恢复帐号!</div>
|
||||
<div className='tipCont'>
|
||||
您可点击按钮完成账号的注销,注销后相关数据将不可恢复,注意事项如下:<br/>
|
||||
<span className='oneTipBox mt10'>请确认需注销的帐号未加入任何组织的owner团队,若owner团队仅此一人,则该组织将被删除。</span>
|
||||
<span className='oneTipBox mt5'>注销账号后,该账号名下所有仓库将被删除,请进行备份以防数据的丢失。</span>
|
||||
<span className='oneTipBox mt5'>注销账号后,该账号在Gitlink产生的所有过程数据(如疑修,合并请求,论坛帖子等)也将被删除。</span>
|
||||
<span className='oneTipBox mt5'>注销后你将丢失该帐号产生的所有数据,一旦注销相关数据将不可恢复,请输入登录密码再次确认。</span>
|
||||
<span className='oneTipBox mt10'>提交注销前,请确保此账号下没有拥有的组织及代码库,若存在上述情况请及时转让或删除。</span>
|
||||
<span className='oneTipBox mt5'>注销后该账号产生的所有数据将会丢失且不可恢复,请提前进行数据备份。</span>
|
||||
{/* <span className='oneTipBox mt5'>注销账号后,该账号在Gitlink产生的所有过程数据(如疑修,合并请求,论坛帖子等)也将被删除。</span>
|
||||
<span className='oneTipBox mt5'>注销后你将丢失该帐号产生的所有数据,一旦注销相关数据将不可恢复,请输入登录密码再次确认。</span> */}
|
||||
{ current_user && <Button className='mt30' loading={offLoading} onClick={checkAccount} style={{color:"red",borderColor:"red"}}>{!offAgain ? "注销账号" : "重新检测"}</Button> }
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
|
||||
import React , { useEffect , useState } from 'react';
|
||||
import { Button, Dropdown, Input, Menu , message, Pagination } from 'antd';
|
||||
import Search from '../../Component/Search';
|
||||
import Item from '../Team-item';
|
||||
import Nodata from '../../Nodata';
|
||||
import axios from 'axios';
|
||||
import CheckProfile from '../../Component/ProfileModal/Profile';
|
||||
import './index.scss';
|
||||
import SearchUser from '../../Component/SearchUser';
|
||||
import { FlexAJ } from '../../Component/layout';
|
||||
|
@ -28,6 +25,10 @@ function Contribution(props){
|
|||
const [error2, setError2] = useState(undefined);
|
||||
// 操作仓库id
|
||||
const [proId, setProId] = useState(undefined);
|
||||
// 名称搜索
|
||||
const [content, setContent] = useState(undefined);
|
||||
// 平台用户列表
|
||||
const [userList, setUserList] = useState([]);
|
||||
const {current_user:{user_id, login, open_blockchain}, current_user} = props;
|
||||
const {user} = props;
|
||||
const username = props.match.params.username;
|
||||
|
@ -43,7 +44,8 @@ function Contribution(props){
|
|||
axios.get(`/users/blockchain/balance.json`,{params: {
|
||||
user_id,
|
||||
limit,
|
||||
page
|
||||
page,
|
||||
keyword: content
|
||||
}}).then(res=>{
|
||||
if(res && res.data){
|
||||
const {projects} = res.data;
|
||||
|
@ -63,7 +65,7 @@ function Contribution(props){
|
|||
setTotal(res.data.total_count);
|
||||
}
|
||||
})
|
||||
}, [reload, page])
|
||||
}, [reload, page, content])
|
||||
|
||||
useEffect(()=>{
|
||||
if(user){
|
||||
|
@ -73,6 +75,16 @@ function Contribution(props){
|
|||
}
|
||||
},[user])
|
||||
|
||||
useEffect(()=>{
|
||||
// 获取平台用户列表
|
||||
const url = `/users/list.json`;
|
||||
axios.get(url).then((result) => {
|
||||
if (result) {
|
||||
setUserList(result.data.users);
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
|
||||
// 目标转账用户
|
||||
function getUser(id, login){
|
||||
// 使用JSON进行对象深拷贝
|
||||
|
@ -113,7 +125,7 @@ function Contribution(props){
|
|||
project_id: id
|
||||
}).then(res=>{
|
||||
if(res && res.data && res.data.status === 2){
|
||||
getUser(id, undefined);
|
||||
// getUser(id, undefined);
|
||||
setToken(id, undefined);
|
||||
setReload(Math.random());
|
||||
message.success('转账成功');
|
||||
|
@ -124,10 +136,14 @@ function Contribution(props){
|
|||
|
||||
return(<div className='mt15 contribution'>
|
||||
{/* 转账/记录切换 */}
|
||||
{/* <div className='contHead'>
|
||||
<a className={`itemCont ${type ? 'active' : ''}`} onClick={()=>{setType(1)}}>token转账</a>
|
||||
<a className={`itemCont ${type ? '' : 'active'}`} onClick={()=>{setType(0)}}>token记录</a>
|
||||
</div> */}
|
||||
<div className='contHead clearfix'>
|
||||
{/* <a className={`itemCont ${type ? 'active' : ''}`} onClick={()=>{setType(1)}}>token转账</a>
|
||||
<a className={`itemCont ${type ? '' : 'active'}`} onClick={()=>{setType(0)}}>token记录</a> */}
|
||||
<Input.Search className='fr' style={{width: 'auto'}} placeholder='请输入项目名称进行搜索' allowClear onSearch={(value)=>{
|
||||
setPage(1);
|
||||
setContent(value);
|
||||
}}/>
|
||||
</div>
|
||||
{/* token转账 */}
|
||||
{type ? <div className='contributionTable mt25'>
|
||||
{list && list.length > 0 && <div className='flexCenterCont tableHeadTri mb5'>
|
||||
|
@ -142,7 +158,7 @@ function Contribution(props){
|
|||
<div className='tableColumn1'>{item.name}</div>
|
||||
<div className='tableColumn2'>{item.balance}</div>
|
||||
<div className='tableColumn3'>
|
||||
<SearchUser getUser={(login)=>{getUser(item.id, login)}} width={"100%"} placeholder="搜索转账目标用户" value={userLogin[item.id]}/>
|
||||
<SearchUser getUser={(login)=>{getUser(item.id, login)}} width={"100%"} placeholder="搜索转账目标用户" userList={userList}/>
|
||||
{proId === item.id && error1 && <div className='errorTipTri'>{error1}</div>}
|
||||
</div>
|
||||
<div className='tableColumn4'>
|
||||
|
|
Loading…
Reference in New Issue