This commit is contained in:
谢思 2023-08-29 14:07:02 +08:00
parent 99b2c03583
commit 52dc7d2046
6 changed files with 747 additions and 742 deletions

1466
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -86,7 +86,7 @@ function Index(props){
useEffect(()=>{
if(checkIfLogin() === false){
props.history.push('/login');
props.history.push(`/login?go_page=${pathname}`);
}
},[])

View File

@ -55,7 +55,7 @@ function MySiteList(props){
<Nodata _html="暂无数据"/>
</div> : <div className="mt10">
{pages && pages.map(item=>{
const {owner, repo, url, last_build_at, state} = item
const {owner, repo, url, last_build_at, state, state_description} = item
return <FlexAJ>
<div className="siteBox">
<i className="iconfont icon-cangkuyuyanicon font-16 mr5 color-grey-6"></i>
@ -66,6 +66,7 @@ function MySiteList(props){
<span className="ml5 mr5 color-grey-ccc">|</span>
建站工具{item.language_frame}
</div>
{!state && <div className="color-grey-6 mt5">关闭原因{state_description}</div>}
</div>
<Button className="themeCorBorBut" onClick={()=>{history.push(`/${owner}/${repo}/service/pages`)}}>去仓库</Button>
</FlexAJ>

View File

@ -1,4 +1,4 @@
import React from 'react';
import React, { useEffect } from 'react';
import { Route, Switch } from 'react-router-dom';
import "./index.scss";
import Loadable from 'react-loadable';
@ -25,6 +25,15 @@ const Pages = Loadable({
})
function ServerIndex(props){
const { projectDetail } = props;
const { owner , projectsId } = props.match.params;
useEffect(()=>{
// tab 3397
if(projectDetail && projectDetail.permission === ""){
props.history.push(`/${owner}/${projectsId}`);
}
}, [projectDetail])
return(
<div className="panels">
<Switch {...props}>

View File

@ -15,10 +15,6 @@ function Main(props){
const { author, name} = projectDetail;
document.title = `服务-${author.name}/${name}`;
}
// tab 3397
if(projectDetail && !(isDeveloper || isManager || isReporter)){
props.history.push(`/${owner}/${projectsId}`);
}
}, [projectDetail])
useEffect(()=>{

View File

@ -3,7 +3,6 @@ import { Spin, message, Button, Form, Input, Select, Descriptions, Alert } from
import axios from 'axios';
import SelectBranch from '../../../forge/Branch/Select';
import './index.scss';
import { Link } from 'react-router-dom';
function Pages(props) {
const {current_user, history, form, projectDetail, defaultBranch, isManager} = props;
@ -180,7 +179,7 @@ function Pages(props) {
</div>}
</div> : <div className='mt30'>
{/* 站点权限被关闭 */}
<Alert type="error" message={pageInfo && pageInfo.state_description}></Alert>
{pageInfo && <Alert type="error" message={`您的个人站点 ${pageInfo.site_name} 已被关闭,关闭原因为:${pageInfo.state_description}`}></Alert>}
</div>}
{result && <div className='mt30'>
<div className='mt20 ant-descriptions-title'>部署结果</div>