屏蔽webidea
This commit is contained in:
parent
0498a1d884
commit
956469d887
|
@ -45,8 +45,10 @@
|
|||
<div id="md_div" style="display: none;"></div>
|
||||
<div id="root" class="page -layout-v -fit widthunit"></div>
|
||||
<div id="picture_display" style="display: none;"></div>
|
||||
<script src="https://gw.alipayobjects.com/os/lib/react/16.14.0/umd/react.%REACT_URL%.js"></script>
|
||||
<script src="https://gw.alipayobjects.com/os/lib/react-dom/16.14.0/umd/react-dom.%REACT_URL%.js"></script>
|
||||
<!-- <script src="https://gw.alipayobjects.com/os/lib/react/16.14.0/umd/react.%REACT_URL%.js"></script>
|
||||
<script src="https://gw.alipayobjects.com/os/lib/react-dom/16.14.0/umd/react-dom.%REACT_URL%.js"></script> -->
|
||||
<script src="%PUBLIC_URL%js/react.%REACT_URL%.js"></script>
|
||||
<script src="%PUBLIC_URL%js/react-dom.%REACT_URL%.js"></script>
|
||||
<script src="%PUBLIC_URL%js/jquery-1.8.3.min.js"></script>
|
||||
<script src="%PUBLIC_URL%js/js_min_all.js"></script>
|
||||
<!-- <script src="%PUBLIC_URL%js/common.js"></script> -->
|
||||
|
@ -54,18 +56,18 @@
|
|||
<script src="%PUBLIC_URL%js/editormd/editormd.min.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/merge/merge.js"></script>
|
||||
<script src="%PUBLIC_URL%js/alex/moment.js"></script>
|
||||
<script src="https://gw.alipayobjects.com/os/lib/alipay/alex/2.0.19/bundle/alex.all.global.min.js"></script>
|
||||
<!-- <script src="https://gw.alipayobjects.com/os/lib/alipay/alex/2.0.19/bundle/alex.all.global.min.js"></script> -->
|
||||
<meta name="viewport" content="">
|
||||
<%= htmlWebpackPlugin.tags.bodyTags %>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?7e2def1fe918f15f9f1c5c061f69b256";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
// (function() {
|
||||
// var hm = document.createElement("script");
|
||||
// hm.src = "https://hm.baidu.com/hm.js?7e2def1fe918f15f9f1c5c061f69b256";
|
||||
// var s = document.getElementsByTagName("script")[0];
|
||||
// s.parentNode.insertBefore(hm, s);
|
||||
|
||||
})();
|
||||
// })();
|
||||
window.onload=function(){
|
||||
$(".newContainer").delegate("a.anchors","click",function(){
|
||||
let h = $(this).offset().top - 180;
|
||||
|
|
12
src/App.js
12
src/App.js
|
@ -140,10 +140,10 @@ const SoftBot = Loadable({
|
|||
loading: Loading,
|
||||
})
|
||||
|
||||
const WebIDE = Loadable({
|
||||
loader: () => import('./forge/Newfile/webIDE'),
|
||||
loading: Loading,
|
||||
});
|
||||
// const WebIDE = Loadable({
|
||||
// loader: () => import('./forge/Newfile/webIDE'),
|
||||
// loading: Loading,
|
||||
// });
|
||||
|
||||
const Badge = Loadable({
|
||||
loader: () => import('./forge/Badge/Index'),
|
||||
|
@ -351,11 +351,11 @@ class App extends Component {
|
|||
} />
|
||||
|
||||
{/* webIDE */}
|
||||
<Route path="/:owner/:projectsId/webIDE/tree/:branchName"
|
||||
{/* <Route path="/:owner/:projectsId/webIDE/tree/:branchName"
|
||||
render={
|
||||
(props) => (<WebIDE {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
></Route> */}
|
||||
|
||||
{/* 项目PR */}
|
||||
<Route path="/:owner/:projectsId/compare"
|
||||
|
|
|
@ -509,12 +509,12 @@ function CoderDepot(props){
|
|||
<a>文件 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-grey-6 mr-5"></i></a>
|
||||
</Dropdown>
|
||||
}
|
||||
{
|
||||
{/* {
|
||||
checkIfLogin && checkIfLogin()?
|
||||
<a className='newBtn' onClick={()=>eventTrack(`/${owner}/${projectsId}/webIDE/tree/${branchName||defaultBranch}`)}>Web IDE <div className='newBtnImg'></div></a>
|
||||
:
|
||||
<a className='newBtn' onClick={()=>{showLoginDialog(`/${owner}/${projectsId}`)}}>Web IDE <div className='newBtnImg'></div></a>
|
||||
}
|
||||
} */}
|
||||
|
||||
<Dropdown overlay={downloadMenu} placement="bottomRight" trigger={['click']}>
|
||||
<Button type={'primary'}>下载 <i className="iconfont icon-sanjiaoxing-down ml3 font-14 color-white mr-3"></i></Button>
|
||||
|
|
|
@ -5,7 +5,7 @@ import 'codemirror/mode/javascript/javascript.js';
|
|||
import 'codemirror/mode/clike/clike';
|
||||
import 'codemirror/mode/css/css';
|
||||
import UserSubmitComponent from "./UserSubmitComponent";
|
||||
import CloudIDE from "./cloudIDE";
|
||||
// import CloudIDE from "./cloudIDE";
|
||||
import { Base64 } from "js-base64";
|
||||
|
||||
import "./index.css";
|
||||
|
@ -68,8 +68,8 @@ class m_editor extends Component {
|
|||
value={editorValue}
|
||||
options={editor_options}
|
||||
onChange={this.changeEditor}
|
||||
/> :
|
||||
<CloudIDE download_url={download_url} value={editorValue} params={params} filepath={filepath&&filepath.startsWith('/')?filepath.slice(1):filepath}/>
|
||||
/> : ''
|
||||
// <CloudIDE download_url={download_url} value={editorValue} params={params} filepath={filepath&&filepath.startsWith('/')?filepath.slice(1):filepath}/>
|
||||
}
|
||||
</div>
|
||||
{!readOnly && (
|
||||
|
|
|
@ -41,7 +41,7 @@ const CLANew = Loadable({
|
|||
export default (( props )=>{
|
||||
const pathname = props.location.pathname;
|
||||
const OIdentifier = props.match.params.OIdentifier;
|
||||
const {organizeDetail, enterpriseOpened} = props;
|
||||
const {organizeDetail, enterpriseOpened, mygetHelmetapi} = props;
|
||||
useEffect(()=>{
|
||||
if(organizeDetail){
|
||||
const {nickname} = organizeDetail;
|
||||
|
@ -68,7 +68,7 @@ export default (( props )=>{
|
|||
const array = {list:[
|
||||
{name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/setting`},
|
||||
{name:'组织首页管理',icon:"icon-huabanfuben",href:`/${OIdentifier}/setting/index`},
|
||||
{name:'组织成员管理',icon:"icon-zuzhichengyuan",href: enterpriseOpened ? `https://testpm.trustie.net/${OIdentifier}/members` : `/${OIdentifier}/setting/member`},
|
||||
{name:'组织成员管理',icon:"icon-zuzhichengyuan",href: enterpriseOpened ? `${ mygetHelmetapi && mygetHelmetapi.common.zone }/${OIdentifier}/members` : `/${OIdentifier}/setting/member`},
|
||||
{name:'组织团队管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/setting/group`, hide: enterpriseOpened},
|
||||
// {name:'管理web钩子',icon:"icon-zhongqingdianxinicon10",href:`/${OIdentifier}/setting/hooks`}
|
||||
{name:'CLA管理',img:claIcon,href:`/${OIdentifier}/setting/agreement`,hide:organizeDetail && !organizeDetail.enabling_cla}
|
||||
|
|
|
@ -496,9 +496,9 @@ class NewHeader extends Component {
|
|||
}
|
||||
//获取数据为空的时候
|
||||
gettablogourlnull = () => {
|
||||
this.setState({
|
||||
settings: undefined
|
||||
});
|
||||
// this.setState({
|
||||
// settings: undefined
|
||||
// });
|
||||
var link = document.createElement('link'),
|
||||
oldLink = document.getElementById('dynamic-favicon');
|
||||
link.id = 'dynamic-favicon';
|
||||
|
|
|
@ -345,6 +345,24 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
return true
|
||||
}
|
||||
}
|
||||
|
||||
hideNavPath = (path) => {
|
||||
const hidePath = ['/statistics', '/projects', '/notice', '/organizes', '']
|
||||
let hide = false
|
||||
const {current_user} = this.state;
|
||||
hidePath.forEach(e => {
|
||||
if (path === `/${current_user && current_user.login}${e}`) {
|
||||
hide = true
|
||||
}
|
||||
})
|
||||
// 组织页不要
|
||||
console.log(this.props.pathType);
|
||||
if (this.props.pathType === 'Organization') hide = true
|
||||
// 设置页不要
|
||||
if (path === `/settings/profile`) hide = true
|
||||
return hide
|
||||
}
|
||||
|
||||
render() {
|
||||
let { isRender , current_user , giteaVisible , email ,
|
||||
completeProfile , showCP , showNotice , publicNav , mygetHelmetapi,
|
||||
|
@ -354,7 +372,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
checkIfLogin: this.checkIfLogin,
|
||||
resetUserInfo:this.fetchUsers,
|
||||
showCompeleteDialog:this.showCompeleteDialog,
|
||||
showNpsModal: this.showNpsModal
|
||||
showNpsModal: this.showNpsModal,
|
||||
};
|
||||
let path =this.props.location.pathname;
|
||||
let pathCheck = path.indexOf("/zone")>-1 && path.indexOf("/newdetail")>-1 && IsPC();
|
||||
|
@ -383,13 +401,13 @@ export function TPMIndexHOC(WrappedComponent) {
|
|||
{ !pathCheck && <Header {...this.state} {...this.props} {...common} publicNav={publicNav}></Header> }
|
||||
{!publicNav && <div style={{height:"7vh"}}></div> }
|
||||
<div className="flexTop">
|
||||
{ !(path === `/${current_user && current_user.login}` || path === `/settings/profile`) &&
|
||||
{ !(this.hideNavPath(path)) &&
|
||||
<ul className="navBox">
|
||||
{
|
||||
items.map((item, index) => {
|
||||
return <a
|
||||
className={`nav columnAlignCenter title1ColorSpan ${index===3? "active" :""}`}
|
||||
href={ `https://testpm.trustie.net/${ (companyList && companyList.length>0) &&companyList[0].enterpriseIdentifier}${item.path }` }
|
||||
href={ `${ mygetHelmetapi && mygetHelmetapi.common.zone }/${ (companyList && companyList.length>0) &&companyList[0].enterpriseIdentifier}${item.path }` }
|
||||
onMouseOver={() => this.setState({active:item.icon}) }
|
||||
onMouseLeave={() => this.setState({active:""}) }
|
||||
key={ index }
|
||||
|
|
Loading…
Reference in New Issue