forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
789e84211c
commit
16dff252c0
|
@ -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) {}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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')(
|
||||
<Checkbox checked={ignoreFlag} onChange={(e)=>this.setState({ignoreFlag:e.target.checked})}>.gitignore</Checkbox>
|
||||
<Checkbox checked={ignoreFlag} onChange={(e)=>this.showIgnoreFunc(e)}>.gitignore</Checkbox>
|
||||
)}
|
||||
</Form.Item>
|
||||
{ ignoreFlag &&
|
||||
|
@ -499,7 +524,7 @@ class Index extends Component {
|
|||
className="privatePart"
|
||||
>
|
||||
{getFieldDecorator('licenseFlag')(
|
||||
<Checkbox checked={licenseFlag} onChange={(e)=>this.setState({licenseFlag:e.target.checked})}>开源许可证</Checkbox>
|
||||
<Checkbox checked={licenseFlag} onChange={(e)=>this.showLicenseFunc(e)}>开源许可证</Checkbox>
|
||||
)}
|
||||
</Form.Item>
|
||||
{ licenseFlag &&
|
||||
|
@ -546,7 +571,7 @@ class Index extends Component {
|
|||
className="privatePart"
|
||||
>
|
||||
{getFieldDecorator('categoreFlag')(
|
||||
<Checkbox checked={categoreFlag} onChange={(e)=>this.setState({categoreFlag:e.target.checked})}>项目类别</Checkbox>
|
||||
<Checkbox checked={categoreFlag} onChange={(e)=>this.showCateFunc(e)}>项目类别</Checkbox>
|
||||
)}
|
||||
</Form.Item>
|
||||
{categoreFlag &&
|
||||
|
@ -575,7 +600,7 @@ class Index extends Component {
|
|||
className="privatePart"
|
||||
>
|
||||
{getFieldDecorator('languageFlag')(
|
||||
<Checkbox checked={languageFlag} onChange={(e)=>this.setState({languageFlag:e.target.checked})}>项目语言</Checkbox>
|
||||
<Checkbox checked={languageFlag} onChange={(e)=>this.showLanguageFunc(e)}>项目语言</Checkbox>
|
||||
)}
|
||||
</Form.Item>
|
||||
{languageFlag &&
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
flex:1;
|
||||
p{
|
||||
margin:0px;
|
||||
max-width: 660px;
|
||||
}
|
||||
.notifyInfos{
|
||||
margin-bottom: 8px;
|
||||
|
|
|
@ -165,6 +165,9 @@ form{
|
|||
.normal{
|
||||
width: 100%;
|
||||
}
|
||||
#root{
|
||||
width: 1200px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1000px){
|
||||
.main{
|
||||
|
|
|
@ -22,7 +22,7 @@ class Shixunauthority extends Component {
|
|||
className="color-blue">返回首页</a>
|
||||
,或者
|
||||
<a target="_blank"
|
||||
href="//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd"
|
||||
href="https://qm.qq.com/cgi-bin/qm/qr?k=YVGUhY7uK8ovpyd7tG_lHe2qGZ63LOij&jump_from=webapi"
|
||||
className="color-blue">QQ反馈>></a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@ class http500 extends Component {
|
|||
className="color-blue">返回首页</a>
|
||||
,或者
|
||||
<a target="_blank"
|
||||
href="//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd"
|
||||
href="https://qm.qq.com/cgi-bin/qm/qr?k=YVGUhY7uK8ovpyd7tG_lHe2qGZ63LOij&jump_from=webapi"
|
||||
className="color-blue">QQ反馈>></a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@ class Shixunnopage extends Component {
|
|||
className="color-blue">返回首页</a>
|
||||
,或者
|
||||
<a target="_blank"
|
||||
href="//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd"
|
||||
href="https://qm.qq.com/cgi-bin/qm/qr?k=YVGUhY7uK8ovpyd7tG_lHe2qGZ63LOij&jump_from=webapi"
|
||||
className="color-blue">QQ反馈>></a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue