build/static/js/79.dc3a4ce4.chunk.js

1 line
22 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[79],{"/oTB":function(e,t,n){},"85A0":function(e,t,n){},"9hAI":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=h(n("W9HT")),r=h(n("diRs")),i=h(n("2fM7")),o=h(n("NUBc")),l=h(n("BvKs")),c=h(n("5rEg")),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();n("T2oS"),n("Q9mQ"),n("OaEy"),n("DjyN"),n("lUTK"),n("5NDa");var p=n("cDcd"),u=h(p);h(n("OS56")),n("sYIF"),n("tyWD"),n("K7k0"),n("7dqz"),n("85A0"),n("/oTB");var f=h(n("z+6C")),g=h(n("vDqi")),m=(h(n("lbbv")),h(n("FPGT")),h(n("bFaK")),h(n("aqs5")));function h(e){return e&&e.__esModule?e:{default:e}}var x=c.default.Search,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.componentDidMount=function(){var e=n.state,t=e.page,a=e.limit,r=e.search,i=e.sort,o=e.project_type,l=e.category_id,c=e.languageId;n.getListData(t,a,r,i,o,l,c),n.getType(),n.getCategory(),n.getLanguage(),document.title="开源项目"},n.getLanguage=function(){g.default.get("/project_languages.json").then((function(e){e&&n.setState({languageList:e.data.project_languages})})).catch((function(e){}))},n.getRecommand=function(){g.default.get("/projects/recommend.json").then((function(e){e&&n.setState({recommendList:e.data})})).catch((function(e){}))},n.getRecommandOri=function(){g.default.get("/organizations/recommend.json").then((function(e){e&&n.setState({recommendOriList:e.data.organizations})})).catch((function(e){}))},n.getListData=function(e,t,a,r,i,o,l){var c=n.props.current_user;g.default.get("/projects.json",{params:{user_id:c&&c.user_id,page:e,limit:t,search:a,sort_by:r,project_type:i,category_id:o,language_id:l}}).then((function(e){e&&n.setState({projectsList:e.data.projects,total:e.data.total_count,isSpin:!1})})).catch((function(e){}))},n.getType=function(){g.default.get("/projects/group_type_list.json").then((function(e){e&&e.data&&n.setState({typeList:e.data})})).catch((function(e){}))},n.changeType=function(e){n.setState({isSpin:!0,project_type:e},(function(){var t=n.state,a=t.page,r=t.limit,i=t.sort,o=t.languageId,l=t.search,c=t.category_id;n.getListData(a,r,l,i,e,c,o)}))},n.getCategory=function(){g.default.get("/project_categories/group_list.json").then((function(e){e&&e.data&&n.setCategoryList(e.data,void 0)})).catch((function(e){}))},n.setCategoryList=function(e){n.setState({CategoryList:e})},n.changeCategory=function(e){n.setState({category_id:e,page:1},(function(){var t=n.state,a=t.limit,r=t.sort,i=t.project_type,o=t.languageId,l=t.search;n.getListData(1,a,l,r,i,e,o)}))},n.ChangeSoryBy=function(e){n.setState({sort:e.key,page:1,isSpin:!0});var t=n.state,a=t.limit,r=t.search,i=t.project_type,o=t.category_id,l=t.languageId;n.getListData(1,a,r,e.key,i,o,l)},n.searchFun=function(e){-1!==n.props.location.search.indexOf("search")&&n.props.history.push(n.props.location.pathname),n.setState({page:1,search:e,isSpin:!0});var t=n.state,a=t.limit,r=t.sort,i=t.category_id,o=t.languageId,l=t.project_type;n.getListData(1,a,e,r,l,i,o)},n.changeSearchValue=function(e){n.setState({search:e.target.value})},n.ChangePage=function(e){n.setState({page:e});var t=n.state,a=t.limit,r=t.search,i=t.sort,o=t.project_type,l=t.category_id,c=t.languageId;n.getListData(e,a,r,i,o,l,c)},n.getoDetail=function(e,t){n.props.history.push("/"+e+"/"+t)},n.changeLanguage=function(e){n.setState({isSpin:!0,languageId:0===e?void 0:e});var t=n.state,a=t.page,r=t.limit,i=t.sort,o=t.project_type,l=t.category_id,c=t.search;n.getListData(a,r,c,i,o,l,0===e?void 0:e)},n.menu=function(){var e=n.state.sort;return u.default.createElement(l.default,{onClick:n.ChangeSoryBy,selectedKeys:[e]},u.default.createElement(l.default.Item,{key:"updated_on"},"更新时间排序"),u.default.createElement(l.default.Item,{key:"created_on"},"创建时间排序"),u.default.createElement(l.default.Item,{key:"forked_count"},"fork数量排序"),u.default.createElement(l.default.Item,{key:"praises_count"},"点赞数量排序"))},n.newItem=function(){return u.default.createElement("ul",null,u.default.createElement("li",null,u.default.createElement(m.default,s({},n.props,{sureFunc:function(){n.props.history.push("/projects/deposit/new")}}),"新建项目")),u.default.createElement("li",null,u.default.createElement(m.default,s({},n.props,{sureFunc:function(){n.props.history.push("/projects/mirror/new")}}),"导入项目")))},n.pagination=function(e,t,a){return e&&e>t?u.default.createElement("div",{className:"edu-txt-center pt30 mb30 border-top-grey"},u.default.createElement(o.default,{simple:!0,defaultCurrent:a,total:e,pageSize:t,onChange:n.ChangePage})):""};var a=new URLSearchParams(e.location.search.substring(1));return n.state={projectsList:void 0,page:1,limit:15,search:a.get("search"),sort:void 0,total:0,isSpin:!0,project_type:void 0,category_id:void 0,typeList:void 0,categoryList:void 0,recommendList:void 0,recommendOriList:void 0,languageList:void 0,languageId:void 0,CategoryList:void 0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),d(t,[{key:"render",value:function(){var e=this,t=this.props.current_user,n=this.state,o=n.projectsList,l=(n.recommendList,n.languageList),c=n.languageId,d=n.isSpin,p=n.total,g=n.search,m=n.limit,h=n.page,b=n.typeList,y=(n.categoryList,n.recommendOriList,n.CategoryList),v=n.category_id,A=n.project_type;return u.default.createElement("div",null,u.default.createElement("div",{className:"ProjectListIndex"},u.default.createElement("div",{className:"list-left"},u.default.createElement("ul",{className:"list-l-Menu",style:{padding:0}},u.default.createElement("li",{className:"MenuTitle",onClick:function(){e.changeType(void 0)}},u.default.createElement("i",{className:"iconfont icon-xiangmuleixing color-grey-9 font-15 mr5"}),"项目类型"),b&&b.map((function(t,n){return u.default.createElement("li",{key:n,className:A&&A===t.project_type?"active":"",onClick:function(){e.changeType(""+t.project_type)}},u.default.createElement("p",null,u.default.createElement("span",{className:"font-16"},t.name),u.default.createElement("span",{className:"color-blue"},t.projects_count)))}))),u.default.createElement("ul",{className:"list-l-Menu mt20",style:{padding:0}},u.default.createElement("li",{className:"MenuTitle",onClick:function(){return e.changeCategory(void 0)}},u.default.createElement("i",{className:"iconfont icon-xiangmuleibie color-grey-9 font-15 mr5"}),"项目类别"),y&&y.length>0?y.map((function(t,n){return u.default.createElement("li",{key:n,className:v&&parseInt(v)===t.id?"active":"",onClick:function(){return e.changeCategory(""+t.id)}},u.default.createElement("p",null,u.default.createElement("span",{className:"font-16"},t.name),u.default.createElement("span",{className:"color-blue"},t.projects_count)))})):"")),u.default.createElement("div",{className:"list-right boxShandow radius-2",style:{padding:0}},u.default.createElement(a.default,{spinning:d},u.default.createElement("div",{className:"list-r-operation"},u.default.createElement("div",null,u.default.createElement(i.default,{showSearch:!0,placeholder:"请选择语言",style:{width:"150px",marginRight:"20px"},size:"large",onChange:this.changeLanguage,value:c,allowClear:!0,optionFilterProp:"children",filterOption:function(e,t){return t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0}},u.default.createElement(i.default.Option,{key:0,value:0},"请选择语言"),l&&l.length>0&&l.map((function(e,t){return u.default.createElement(i.default.Option,{key:e.id,value:e.id},e.name)}))),u.default.createElement(x,{placeholder:"输入关键字进行搜索",enterButton:"搜索",size:"large",onSearch:this.searchFun,className:"list-r-Search",value:g,onChange:this.changeSearchValue,allowClear:!0})),u.default.createElement("div",null,t&&t.login&&u.default.createElement(r.default,{overlayClassName:"newPopUl",content:this.newItem(),trigger:["click"],placement:"bottom",className:"mr50"},u.default.createElement("a",{className:"ant-dropdown-link"},u.default.createElement("span",{className:"color-blue font-16"},u.default.createElement("i",{className:"iconfont icon-xinjian1 font-14"})," 新建"))),u.default.createElement(r.default,{content:this.menu(),trigger:["click"],placement:"bottom"},u.default.createElement("a",{className:"ant-dropdown-link"},u.default.createElement("span",{className:"color-blue font-16"},"排序 ",u.default.createElement("i",{className:"iconfont icon-sanjiaoxing-down"})))))),u.default.createElement(f.default,s({},this.props,this.state,{projects:o})),this.pagination(p,m,h)))))}}]),t}(p.Component);t.default=b},FPGT:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAJCAYAAADkZNYtAAAA0UlEQVQoU4XPsUpCARTG8f9nOESLLYVdoVVy6RGiB+gJahZ0USebxKmGUBeD5nqBeoDoEVoUH+DeoBZdpEHyi6so11A72znndz44Ctp+Bi74v16UvfNxaocesLfFj6c/FBSDXMt1i5tNWOY6rOl2hnlwOvfNu83J3wOJfrjLKUVN5jhOb/vM8AosZ4AF52FVb7FJLghafkRcLtPNU1TT1aJfwQcdH6bNAMgAo4nIf1X0uRbHw6OOSzJdi/JHRffJH1aSZ4uGU8E+3WhImaamSfwLSmg7J0wuJwcAAAAASUVORK5CYII="},K7k0:function(e,t,n){},bFaK:function(e,t,n){"use strict";n.r(t),t.default=n.p+"static/media/banner_list.e02c5e16.jpg"},la1e:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAABs0lEQVQ4T5WSsWtUQRCHv5m9s4kSG7XzTwgWioQoYhCMhSJRXt5pEgx2QYgpIlppkSIQQrARLLQIwr13YkAQRBJstLExEJLOQm2sDw0W3puR9y4eOT1MbovdZWbnm9/MjrC9PA0V3KZA+oAt4A1qDwq3aX6eB3rA1xF9KCNZNXdJvnmii+CD4DMo74BeXEcxZgqAMo/YM6COcRpkHuStxDYtXguXMJtjy0/KTb7/UVSAa6VTRZao8b7N/oQD9MgHVO+KJ7IK+kjibHnno93unoRhsEnxROuoHZWI+m5B7eroxfRrDviJ2iGJ+NElYD+m33LAJtiYxHzsCpBwAeSeeKr3cQ7mHe0KkMoKplXxJQ6zTzfAhvaqwpMwATbFET/enIPnYZjMF3E7IxU+/0+J10r9mL2kZGflKpsFoPnnegvzaco+KFf40gniaWkAbBnRUYkaK61JbEESncS5Q7BzEvGp7duS8gk8e5VPqFxrBv8DKJRUww3EZ/FwUSq/1gpbntntBciExNnrneBWCW3Z0nAZ/DHIbSCAL4Bel5HG6t+ldQQ0e1I+hjWebndoXGI2OvXlN28Np9vm0kEpAAAAAElFTkSuQmCC"},lbbv:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAVCAYAAABCIB6VAAABeElEQVRIS82VzStEURjGf88dUgqRjWEskFJ2ko3s5I9RuL4WNrJQ5OPiP7C3sLBTLCRlY6FsUBYuG987H3de3VujmTBXM0PO5tT5+J2n5zzvOWr0zCi+PZo4kLHgu9oJcSoROCPNEBP+iJY+wL4rFSo8uWj1SjBkMCWQQV9JwBlBSc/mBZPARknBqTVrTQecGVyUFNy0bHUmbhG3vw8GDgu9vI9IiISMrhzFxUJz9mdbIaOnWHgaqiW2/8bjQgokSoHDGHAXVhvT5jTV0foSEBSViuZlawnEOeLcH1FbtpX/Bxy+CyQYjF4wqAWGQysM1qIx48kflaekZ6+CMv+Bcmb0FpeMBs86HDjJs+7Sd5UKrTgF2gx6r1ztx4F/rLhxxWYxpoDjZxi4cXUdB8/M57282jmrqayIyrkduAe2zKL+y6YEm/6wdsPJvOBwQb1nDRViHaM/Vq0YjzILfMpx1uacXyO1ap1BQLfjUPXdAWmHvashHcUJeAfhzNAdCh13ggAAAABJRU5ErkJggg=="},spEH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupProjectBackgroup=t.Content=t.Cancel=t.GreenUnder=t.NumUl=t.Redback=t.Blueback=t.Greenback=t.Greenline=t.Redline=t.Blueline=t.WhiteBack=t.Gap=t.Short=t.ShortWidth=t.Long=t.LongWidth=t.Box=t.AlignAJBottom=t.AlignTop=t.AlignCenter=t.FlexAJ=t.AlignCenterBetween=t.Banner=void 0;var a,r=S(["{\n padding:20px 25px;\n color:#333;\n font-size:18px;\n border-bottom:1px solid #eee;\n background-color:#fff;\n border-radius:5px 5px 0px 0px;\n justify-content: space-between;\n display: flex;\n}"],["{\n padding:20px 25px;\n color:#333;\n font-size:18px;\n border-bottom:1px solid #eee;\n background-color:#fff;\n border-radius:5px 5px 0px 0px;\n justify-content: space-between;\n display: flex;\n}"]),i=S(["{\n display:flex;\n align-items: center;\n padding: 14px 14px 14px 20px;\n justify-content: space-between;\n border-bottom:1px solid #eee;\n}"],["{\n display:flex;\n align-items: center;\n padding: 14px 14px 14px 20px;\n justify-content: space-between;\n border-bottom:1px solid #eee;\n}"]),o=S(["{\n display:flex;\n align-items: center;\n justify-content: space-between;\n}"],["{\n display:flex;\n align-items: center;\n justify-content: space-between;\n}"]),l=S(["{\n display:flex;\n align-items: center;\n}"],["{\n display:flex;\n align-items: center;\n}"]),c=S(["{\n display:flex;\n align-items: flex-start;\n}"],["{\n display:flex;\n align-items: flex-start;\n}"]),s=S(["{\n display:flex;\n justify-content: space-between;\n align-items: flex-end;\n}"],["{\n display:flex;\n justify-content: space-between;\n align-items: flex-end;\n}"]),d=S(["{\n display:flex;\n align-items:flex-start;\n}"],["{\n display:flex;\n align-items:flex-start;\n}"]),p=S(["{\n flex:1;\n width:0;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n flex:1;\n width:0;\n border-radius:5px;\n margin-bottom:30px;\n}"]),u=S(["{\n width:78%;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n width:78%;\n border-radius:5px;\n margin-bottom:30px;\n}"]),f=S(["{\n width:300px;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n width:300px;\n border-radius:5px;\n margin-bottom:30px;\n}"]),g=S(["{\n flex:1;\n border-radius:5px;\n margin-bottom:30px;\n}"],["{\n flex:1;\n border-radius:5px;\n margin-bottom:30px;\n}"]),m=S(["{\n padding-left:20px;\n box-sizing:border-box;\n}"],["{\n padding-left:20px;\n box-sizing:border-box;\n}"]),h=S(["{\n background-color:#fff;\n border-radius:5px;\n}"],["{\n background-color:#fff;\n border-radius:5px;\n}"]),x=S(["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #466AFF;\n color:#466AFF;\n padding:0px 12px;\n display:inline-block;\n}"],["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #466AFF;\n color:#466AFF;\n padding:0px 12px;\n display:inline-block;\n}"]),b=S(["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #F73030;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"],["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #F73030;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"]),y=S(["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #28BD6C;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"],["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid #28BD6C;\n color:"," !important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n background:",";\n}"]),v=S(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#28BD6C;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"],["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#28BD6C;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),A=S(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n // background-color:rgba(80,145,255,1);\n background-color:#466AFF;\n color:#fff!important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"],["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n // background-color:rgba(80,145,255,1);\n background-color:#466AFF;\n color:#fff!important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),k=S(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#F73030;\n color:#fff!important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"],["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#F73030;\n color:#fff!important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),E=S(["{\n padding-left: 20px;\n & > li{\n list-style-type: decimal;\n color:#888;\n height:24px;\n line-height:24px;\n }\n}"],["{\n padding-left: 20px;\n & > li{\n list-style-type: decimal;\n color:#888;\n height:24px;\n line-height:24px;\n }\n}"]),w=S(["{\n color:#28BD6C!important;\n position:relative;\n &:after{\n position:absolute;\n bottom:-2px;\n left:0px;\n width:100%;\n height:1px;\n content:'';\n background:#28BD6C;\n }\n}"],["{\n color:#28BD6C!important;\n position:relative;\n &:after{\n position:absolute;\n bottom:-2px;\n left:0px;\n width:100%;\n height:1px;\n content:'';\n background:#28BD6C;\n }\n}"]),j=S(["{\n height:32px;\n line-height:32px;\n border-radius:2px;\n background-color:#BBBBBB;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:64px;\n text-align:center;\n letter-spacing: 4px;\n}"],["{\n height:32px;\n line-height:32px;\n border-radius:2px;\n background-color:#BBBBBB;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:64px;\n text-align:center;\n letter-spacing: 4px;\n}"]),B=S(["{\n width:1200px;\n margin:20px auto;\n text-align:center;\n display:flex;\n align-Items:center;\n background-color:#fff;\n justify-content: center;\n}"],["{\n width:1200px;\n margin:20px auto;\n text-align:center;\n display:flex;\n align-Items:center;\n background-color:#fff;\n justify-content: center;\n}"]),_=S(["{\n background:#fafafa;\n padding:20px 30px;\n width:100%;\n}"],["{\n background:#fafafa;\n padding:20px 30px;\n width:100%;\n}"]),C=(a=n("vOnD"))&&a.__esModule?a:{default:a};function S(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}t.Banner=C.default.div(r),t.AlignCenterBetween=C.default.div(i),t.FlexAJ=C.default.div(o),t.AlignCenter=C.default.div(l),t.AlignTop=C.default.div(c),t.AlignAJBottom=C.default.div(s),t.Box=C.default.div(d),t.LongWidth=C.default.div(p),t.Long=C.default.div(u),t.ShortWidth=C.default.div(f),t.Short=C.default.div(g),t.Gap=C.default.div(m),t.WhiteBack=C.default.div(h),t.Blueline=C.default.a(x),t.Redline=C.default.a(b,(function(e){return e.bold?"#fff":"#F73030"}),(function(e){return e.bold?"#F73030":"#fff"})),t.Greenline=C.default.a(y,(function(e){return e.bold?"#fff":"#28BD6C"}),(function(e){return e.bold?"#28BD6C":"#fff"})),t.Greenback=C.default.a(v),t.Blueback=C.default.a(A),t.Redback=C.default.a(k),t.NumUl=C.default.ul(E),t.GreenUnder=C.default.a(w),t.Cancel=C.default.a(j),t.Content=C.default.div(B),t.GroupProjectBackgroup=C.default.div(_)},tyWD:function(e,t,n){},"z+6C":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("3S7+")),r=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();n("5Dmo");var i=n("cDcd"),o=u(i),l=n("sYIF"),c=n("spEH"),s=n("eO8H");n("7dqz");var d=u(n("2CTR"));n("85A0");var p=u(n("la1e"));function u(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){function t(){var e,n,a;f(this,t);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=a=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),a.TurnToDetail=function(e,t){a.props.history.push({pathname:t,state:e})},g(a,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this.props.projects;return o.default.createElement("div",{className:"project-list minH-670",style:{padding:"0px 20px"}},e&&e.length>0?e.map((function(e,t){return o.default.createElement("div",{className:"p-r-Item",key:t},"educoder"===e.platform?o.default.createElement("a",{href:"javascript:void(0)",style:{cursor:"default"},className:"show-user-link"},o.default.createElement("img",{className:"p-r-photo",alt:"",src:e.author&&e.author.image_url})):o.default.createElement(s.Link,{to:"/"+(e.author&&e.author.login),className:"show-user-link"},o.default.createElement("img",{className:"p-r-photo",alt:"",src:(0,l.getImageUrl)("/"+(e.author&&e.author.image_url))})),o.default.createElement("div",{className:"p-r-Infos"},o.default.createElement("div",{className:"p-r-name"},o.default.createElement(c.AlignCenter,null,o.default.createElement(s.Link,{to:"/"+e.author.login+"/"+e.identifier,target:"_blank",title:e.author.name+"/"+e.name,className:"color-grey-3 font-18 task-hide ",style:{maxWidth:470}},e.author.name,"/",e.name),!e.is_public&&o.default.createElement("span",{className:"privateTag"},"私有"),e.forked_from_project_id?o.default.createElement(a.default,{title:"该项目是一个fork仓库",className:"ml5"},o.default.createElement("i",{className:"iconfont icon-fork font-18 color-orange"})):"",e.type&&2===e.type?o.default.createElement(a.default,{title:"该项目是一个同步镜像仓库",className:"ml5"},o.default.createElement("i",{className:"iconfont icon-banbenku font-18 color-green"})):""),o.default.createElement("span",{className:"p-r-tags"},e.praises_count&&e.praises_count>0?o.default.createElement("span",{className:"pariseTag"},o.default.createElement("img",{src:p.default,alt:"",className:"pariseImg"}),"赞 ",e.praises_count):"",e.forked_count&&e.forked_count>0?o.default.createElement("span",null,o.default.createElement("i",{className:"iconfont icon-fork mr3 font-16 color-blue"}),"fork ",e.forked_count):"")),o.default.createElement("p",{className:"break_word task-hide-2 mt10",style:{maxHeight:"44px",lineHeight:"22px"}},e.description),o.default.createElement("div",{className:"p-r-about"},o.default.createElement("span",{className:"p-r-detail"},e.last_update_time?o.default.createElement("span",null,o.default.createElement("label",null,"更新于"),e.time_ago):"",e.language&&e.language.id?o.default.createElement("span",{className:"color-grey-3"},e.language.name):""))))})):o.default.createElement(d.default,{_html:"暂无数据~"}))}}]),t}(i.Component);t.default=m}}]);