diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index 2be264d0..34e1c551 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index daace22b..110dab01 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index 9cc49e6d..a20e8d6e 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 0d745f37..da12c36a 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -55,28 +55,6 @@ class NewHeader extends Component { this.geturlsdata(); window._header_componentHandler = this; - //下拉框的显示隐藏 - // var hoverTimeout; - // var hoveredPanel; - // $(".edu-menu-panel").hover(function () { - // if (hoverTimeout) { // 一次只显示一个panel - // if (hoveredPanel && hoveredPanel !== this) { - // $(hoveredPanel).find(".edu-menu-list").hide() - // } - // clearTimeout(hoverTimeout); - // hoverTimeout = null; - // } - // hoveredPanel = this; - // $(this).find(".edu-menu-list").show(); - // }, function () { - // var that = this; - // // 延迟hide - // hoverTimeout = setTimeout(function () { - // $(that).find(".edu-menu-list").hide(); - // }, 800) - - // }); - //获取游览器地址 try { window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href)) } catch (e) {} diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 66822ddb..880b24a9 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -242,6 +242,7 @@ class Detail extends Component { } else if (result.data.mirror_status === 2) { this.deleteProjectBack(); } else { + this.getBanner(); this.getDetail(); this.setState({ firstSync: false, @@ -287,6 +288,7 @@ class Detail extends Component { this.deleteProjectBack(); } this.getDetail(); + this.getBanner(); } this.setState({ firstSync: false, @@ -317,7 +319,6 @@ class Detail extends Component { getDetail = () => { const { projectsId, owner } = this.props.match.params; - this.getBanner(); const url = `/${owner}/${projectsId}/detail.json`; axios.get(url).then((result) => { if (result && result.data) { diff --git a/src/forge/New/Index.js b/src/forge/New/Index.js index edc655a4..0898683f 100644 --- a/src/forge/New/Index.js +++ b/src/forge/New/Index.js @@ -56,14 +56,6 @@ class Index extends Component { componentDidMount = () => { // 获取拥有者列表 this.getOwner(); - // 获取项目类别 - this.getCategory(); - // 获取项目语言 - this.getLanguage(); - // 获取Gitignore - this.getGitignore(); - // 获取开源许可证 - this.getLicenses(); //判断是否为删除新建项目失败后返回,并执行对应逻辑 this.isDeleteProjectBack(); } @@ -307,6 +299,39 @@ class Index extends Component { }) } + showCateFunc =(e)=>{ + const { CategoryList } = this.state; + this.setState({categoreFlag:e.target.checked}); + // 获取项目类别 + if(e.target.checked && (!CategoryList || (CategoryList && CategoryList.length===0))){ + this.getCategory(); + } + } + showLanguageFunc =(e)=>{ + const { LanguageList } = this.state; + this.setState({languageFlag:e.target.checked}); + // 获取项目语言 + if(e.target.checked && (!LanguageList || (LanguageList && LanguageList.length===0))){ + this.getLanguage(); + } + } + showIgnoreFunc =(e)=>{ + const { GitignoreList } = this.state; + this.setState({ignoreFlag:e.target.checked}) + if(e.target.checked && (!GitignoreList || (GitignoreList && GitignoreList.length===0))){ + // 获取Gitignore + this.getGitignore(); + } + } + showLicenseFunc =(e)=>{ + const { LicensesList } = this.state; + this.setState({licenseFlag:e.target.checked}) + if(e.target.checked && (!LicensesList || (LicensesList && LicensesList.length===0))){ + // 获取开源许可证 + this.getLicenses(); + } + } + render() { const { getFieldDecorator } = this.props.form; // 项目类型:deposit-托管项目,mirror-镜像项目 @@ -472,7 +497,7 @@ class Index extends Component { className="privatePart" > {getFieldDecorator('ignoreFlag')( - this.setState({ignoreFlag:e.target.checked})}>.gitignore + this.showIgnoreFunc(e)}>.gitignore )} { ignoreFlag && @@ -499,7 +524,7 @@ class Index extends Component { className="privatePart" > {getFieldDecorator('licenseFlag')( - this.setState({licenseFlag:e.target.checked})}>开源许可证 + this.showLicenseFunc(e)}>开源许可证 )} { licenseFlag && @@ -546,7 +571,7 @@ class Index extends Component { className="privatePart" > {getFieldDecorator('categoreFlag')( - this.setState({categoreFlag:e.target.checked})}>项目类别 + this.showCateFunc(e)}>项目类别 )} {categoreFlag && @@ -575,7 +600,7 @@ class Index extends Component { className="privatePart" > {getFieldDecorator('languageFlag')( - this.setState({languageFlag:e.target.checked})}>项目语言 + this.showLanguageFunc(e)}>项目语言 )} {languageFlag && diff --git a/src/forge/Notice/Index.scss b/src/forge/Notice/Index.scss index b00e18a5..ff43ac11 100644 --- a/src/forge/Notice/Index.scss +++ b/src/forge/Notice/Index.scss @@ -48,6 +48,7 @@ flex:1; p{ margin:0px; + max-width: 660px; } .notifyInfos{ margin-bottom: 8px; diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index a19619d7..d529a219 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -56,7 +56,7 @@ ul,ol,dl{ } @media screen and (max-width: 1200px){ .main{ - width:1000px; + width:100%; margin:10px auto; } } @@ -158,13 +158,24 @@ form{ margin-bottom: 20px; } } +@media screen and (max-width: 1200px){ + .main{ + width: 100%; + } + .normal{ + width: 100%; + } + #root{ + width: 1200px; + } +} @media screen and (max-width: 1000px){ .main{ - width: 750px; + width: 100%; margin:1rem auto; } .normal{ - width: 750px; + width: 100%; } } @media screen and (max-width: 750px){ diff --git a/src/modules/403/Shixunauthority.js b/src/modules/403/Shixunauthority.js index a16ef32a..835eb2a6 100644 --- a/src/modules/403/Shixunauthority.js +++ b/src/modules/403/Shixunauthority.js @@ -1,37 +1,23 @@ import React, { Component } from 'react'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; - -import Loading from '../../Loading'; - -import Loadable from 'react-loadable'; - import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; - -import { SnackbarHOC,getImageUrl } from 'educoder'; +import { SnackbarHOC, getImageUrl } from 'educoder'; class Shixunauthority extends Component { render() { return (
-
- {/*mt100 mb100*/} - -

- 您可以稍后尝试 返回首页 - ,或者  - QQ反馈>> -

-
- {/*
*/} - {/**/} - {/**/} +
+ +

+ 您可以稍后尝试 返回首页 + ,或者  + QQ反馈>> +

+
); } } -export default SnackbarHOC() (TPMIndexHOC ( Shixunauthority )); +export default SnackbarHOC()(TPMIndexHOC(Shixunauthority)); diff --git a/src/modules/404/Shixunnopage.js b/src/modules/404/Shixunnopage.js index af1ad958..8a0bc16e 100644 --- a/src/modules/404/Shixunnopage.js +++ b/src/modules/404/Shixunnopage.js @@ -1,37 +1,23 @@ import React, { Component } from 'react'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; - -import Loading from '../../Loading'; - -import Loadable from 'react-loadable'; - import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; - -import { SnackbarHOC,getImageUrl } from 'educoder'; +import { SnackbarHOC, getImageUrl } from 'educoder'; class http500 extends Component { render() { return (
-
- {/*mt100 mb100*/} - -

- 您可以稍后尝试 返回首页 - ,或者  - QQ反馈>> -

-
- {/*
*/} - {/**/} - {/**/} +
+ +

+ 您可以稍后尝试 返回首页 + ,或者  + QQ反馈>> +

+
); } } -export default SnackbarHOC() (TPMIndexHOC ( http500 )); +export default SnackbarHOC()(TPMIndexHOC(http500)); diff --git a/src/modules/500/http500.js b/src/modules/500/http500.js index 89e1baa5..b27c44b3 100644 --- a/src/modules/500/http500.js +++ b/src/modules/500/http500.js @@ -1,37 +1,22 @@ import React, { Component } from 'react'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; - -import Loading from '../../Loading'; - -import Loadable from 'react-loadable'; - import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; - -import { SnackbarHOC,getImageUrl } from 'educoder'; - +import { SnackbarHOC, getImageUrl } from 'educoder'; class Shixunnopage extends Component { render() { return (
-
- {/*mt100 mb100*/} - -

- 您可以稍后尝试 返回首页 - ,或者  - QQ反馈>> -

-
- {/*
*/} - {/**/} - {/**/} +
+ +

+ 您可以稍后尝试 返回首页 + ,或者  + QQ反馈>> +

+
); } } -export default SnackbarHOC() (TPMIndexHOC ( Shixunnopage )); +export default SnackbarHOC()(TPMIndexHOC(Shixunnopage));