forked from Gitlink/forgeplus
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(this.webpackJsonp=this.webpackJsonp||[]).push([[79],{Hsgt:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r(n("5rEg"));n("1vPl");var l=r(n("q1tI"));function r(e){return e&&e.__esModule?e:{default:e}}var i=a.default.Search;t.default=function(e){var t=e.placeholder,n=e.onSearch,a=e.onChange;return l.default.createElement(i,{allowClear:!0,placeholder:t,enterButton:"搜索",onSearch:n,width:"300px",onChange:a})}},Lr7t:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=c(["{\n display:flex;\n align-item:center;\n }"],["{\n display:flex;\n align-item:center;\n }"]),l=c(["{\n display:flex;\n align-item:center;\n margin-left:30px;\n padding:0px 12px;\n border-radius:13px;\n background-color:#EBF4FE;\n height:24px;\n line-height:24px;\n font-size:12px;\n }"],["{\n display:flex;\n align-item:center;\n margin-left:30px;\n padding:0px 12px;\n border-radius:13px;\n background-color:#EBF4FE;\n height:24px;\n line-height:24px;\n font-size:12px;\n }"]),r=c(["{\n display:flex;\n align-items:center;\n margin-left:30px;\n padding:0px 12px;\n border-radius:13px;\n background-color:#FFF3DC;\n height:24px;\n line-height:24px;\n font-size:12px;\n }"],["{\n display:flex;\n align-items:center;\n margin-left:30px;\n padding:0px 12px;\n border-radius:13px;\n background-color:#FFF3DC;\n height:24px;\n line-height:24px;\n font-size:12px;\n }"]),i=o(n("q1tI")),u=o(n("vOnD"));function o(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}t.default=function(e){var t=e.fork,n=e.parise,o=u.default.div(a),c=u.default.span(l),d=u.default.span(r);return i.default.createElement(o,null,t||0===t?i.default.createElement(c,null,i.default.createElement("i",{className:"iconfont icon-fork font-15 mr3",style:{color:"#1B8FFF"}}),"fork(",t,")"):"",n||0===n?i.default.createElement(d,null,i.default.createElement("i",{className:"iconfont icon-guanzhu font-14 mr3",style:{color:"#FFA802"}}),"点赞(",n,")"):"")}},POMS:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("3S7+"));n("TfFZ");var l=u(n("q1tI")),r=u(n("Lr7t")),i=n("eO8H");function u(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.item,n=e.key,u=e.OIdentifier;return l.default.createElement("div",{className:"team_project",key:n},l.default.createElement("p",{className:"t_p_title"},l.default.createElement("span",{className:"flex1"},l.default.createElement(i.Link,{to:"/"+u+"/"+t.identifier,className:"name"},t.name),t.forked_from_project_id&&l.default.createElement("i",{className:"iconfont icon-fork font-18 color-orange ml8"}),t.type&&0!==t.type?2===t.type?l.default.createElement(a.default,{title:"该项目是一个镜像",className:"ml8"},l.default.createElement("i",{className:"iconfont icon-banbenku font-18 color-green"})):l.default.createElement("span",{className:"ml8"},l.default.createElement("i",{className:"iconfont icon-jingxiang font-18 color-green"})):""),l.default.createElement(r.default,{fork:t.forked_count,parise:t.praises_count})),l.default.createElement("div",{className:"desc"},t.description),l.default.createElement("div",{className:"infos"},l.default.createElement("span",{className:"font-12 color-grey-8"},"更新于",t.time_ago)))}},"r5/a":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,l=!1,r=void 0;try{for(var i,u=e[Symbol.iterator]();!(a=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&u.return&&u.return()}finally{if(l)throw r}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=x(["{\n color:#888;\n font-size:12px;\n margin-right:10px;\n}"],["{\n color:#888;\n font-size:12px;\n margin-right:10px;\n}"]),r=x(["{\n display:flex;\n aligin:center;\n}"],["{\n display:flex;\n aligin:center;\n}"]),i=x(["{\n font-size:14px;\n color:#333;\n margin-bottom:8px;\n height:18px;\n line-height:18px;\n}"],["{\n font-size:14px;\n color:#333;\n margin-bottom:8px;\n height:18px;\n line-height:18px;\n}"]),u=x(["{\n color:#5091FF;\n font-size:14px;\n margin-bottom:8px;\n height:18px;\n line-height:18px;\n}"],["{\n color:#5091FF;\n font-size:14px;\n margin-bottom:8px;\n height:18px;\n line-height:18px;\n}"]),o=x(["{\n border-radius:50%;\n width:45px;\n height:45px;\n margin-right:12px;\n}"],["{\n border-radius:50%;\n width:45px;\n height:45px;\n margin-right:12px;\n}"]),c=n("q1tI"),d=v(c),f=v(n("vOnD")),s=v(n("yQnu")),m=v(n("vDqi")),p=n("sYIF"),g=n("eO8H"),h=v(n("2CTR")),E=v(n("aqs5"));function v(e){return e&&e.__esModule?e:{default:e}}function x(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var y=f.default.span(l),_=f.default.div(r),b=f.default.div(i),N=f.default.div(u),k=f.default.img(o);t.default=function(e){var t=e.OIdentifier,n=e.history,l=e.admin,r=e.showCompeleteDialog,i=e.completeProfile,u=(0,c.useState)(void 0),o=a(u,2),f=o[0],v=o[1],x=(0,c.useState)(void 0),j=a(x,2),O=j[0],w=j[1];return(0,c.useEffect)((function(){var e;t&&(e="/organizations/"+t+"/organization_users.json",m.default.get(e,{params:{limit:5}}).then((function(e){e&&e.data&&v(e.data)})).catch((function(e){})),function(e){var t="/organizations/"+e+"/teams.json";m.default.get(t,{params:{limit:5}}).then((function(e){e&&e.data&&w(e.data)})).catch((function(e){}))}(t))}),[t]),d.default.createElement("div",{className:"list-r"},f&&f.organization_users&&f.organization_users.length>0?d.default.createElement(s.default,{name:"组织成员",count:f&&f.total_count,url:"/"+t+"/members"},f.organization_users.map((function(e,t){return d.default.createElement("div",{className:"teammembers",key:t},d.default.createElement(g.Link,{to:"/"+(e.user&&e.user.login)},d.default.createElement(k,{src:(0,p.getImageUrl)("/"+(e.user&&e.user.image_url)),alt:"",className:"m-img"})),d.default.createElement("div",null,d.default.createElement(g.Link,{to:"/"+(e.user&&e.user.login)},d.default.createElement(b,null,e.user&&e.user.name)),d.default.createElement(_,null,d.default.createElement("i",{className:"iconfont icon-shijian color-green mr3 font-13"}),d.default.createElement(y,null,"加入时间:",e.created_at))))}))):"",d.default.createElement(s.default,{name:"组织团队",count:O&&O.total_count,bottom:l&&d.default.createElement(E.default,{showCompeleteDialog:r,completeProfile:i,sureFunc:function(){return n.push("/"+t+"/teams/new")},className:"ant-btn ant-btn-primary"},"新建团队"),url:"/"+t+"/teams"},O&&O.teams&&O.teams.length>0?d.default.createElement(d.default.Fragment,null,O.teams.map((function(e,n){return d.default.createElement("div",{className:"teammembers",key:n},d.default.createElement("div",null,e.is_admin||e.is_member?d.default.createElement(g.Link,{to:"/"+t+"/teams/"+e.id},d.default.createElement(N,null,e.nickname)):d.default.createElement(N,null,e.name),d.default.createElement(_,null,d.default.createElement(y,null,e.num_users,"名成员"),d.default.createElement(y,null,e.num_projects,"个仓库"))))}))):d.default.createElement(h.default,{_html:"暂无团队",small:!0})))}},wZuH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=v(n("NUBc")),l=v(n("W9HT")),r=v(n("jsC+")),i=v(n("BvKs")),u=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},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,l=!1,r=void 0;try{for(var i,u=e[Symbol.iterator]();!(a=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{!a&&u.return&&u.return()}finally{if(l)throw r}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("YQTV"),n("04bd"),n("aIZi"),n("2WkQ");var c=n("q1tI"),d=v(c),f=(n("eO8H"),v(n("Hsgt"))),s=v(n("y6GU"));n("VUSe");var m=v(n("POMS")),p=v(n("r5/a")),g=v(n("2CTR")),h=v(n("aqs5")),E=v(n("vDqi"));function v(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=(0,c.useState)(void 0),n=o(t,2),v=n[0],x=n[1],y=(0,c.useState)(!1),_=o(y,2),b=_[0],N=_[1],k=(0,c.useState)(void 0),j=o(k,2),O=j[0],w=j[1],F=(0,c.useState)(void 0),z=o(F,2),I=z[0],S=z[1],P=(0,c.useState)(1),C=o(P,2),M=C[0],q=C[1],D=(0,c.useState)("updated_on"),B=o(D,2),H=B[0],A=B[1],L=e.match.params.OIdentifier,T=e.organizeDetail;(0,c.useEffect)((function(){var e;L&&(N(!0),e="/organizations/"+L+"/projects.json",E.default.get(e,{params:{search:I,page:M,limit:15,sort_by:H,sort_direction:"desc"}}).then((function(e){e&&e.data&&(x(e.data.projects),w(e.data.total_count)),N(!1)})).catch((function(e){N(!1)})))}),[L,H,M,I]);var U=d.default.createElement(i.default,{onClick:function(e){return A(e.key)}},d.default.createElement(i.default.Item,{key:"updated_on"},"更新时间排序"),d.default.createElement(i.default.Item,{key:"created_on"},"创建时间排序"),d.default.createElement(i.default.Item,{key:"praises_count"},"点赞数排序"),d.default.createElement(i.default.Item,{key:"forked_count"},"fork数排序")),Q=d.default.createElement("ul",null,d.default.createElement("li",null,d.default.createElement(h.default,u({},e,{sureFunc:function(){e.history.push("/projects/deposit/new/"+L)}}),"新建项目")),d.default.createElement("li",null,d.default.createElement(h.default,u({},e,{sureFunc:function(){e.history.push("/projects/mirror/new/"+L)}}),"导入项目")));return d.default.createElement("div",{className:"list"},d.default.createElement("div",{className:"list-l"},d.default.createElement("div",null,d.default.createElement("div",{className:"head"},d.default.createElement("div",{style:{width:"370px"}},d.default.createElement(f.default,{placeholder:"输入仓库名称进行搜索",onSearch:function(e){S(e)}})),d.default.createElement("p",null,T&&T.can_create_project?d.default.createElement(s.default,{menu:Q,overlayClassName:"newPopUl"},d.default.createElement("a",{className:"addBtn mr30"},"+ 新建项目")):"",d.default.createElement(r.default,{overlay:U},d.default.createElement("a",{className:"color-blue"},"排序",d.default.createElement("i",{className:"iconfont icon-sanjiaoxing-down ml3 font-14"}))))),d.default.createElement(l.default,{spinning:b},d.default.createElement("div",{className:"team"},v&&v.length>0?v.map((function(e,t){return d.default.createElement(m.default,{item:e,keu:t,OIdentifier:L})})):d.default.createElement(g.default,{_html:"暂无数据"})))),O>15&&d.default.createElement("div",{className:"mb20 mt20",style:{textAlign:"center"}},d.default.createElement(a.default,{simple:!0,current:M,total:O,onChange:function(e){return q(e)}}))),d.default.createElement(p.default,{admin:T&&T.is_admin,OIdentifier:L,showCompeleteDialog:e.showCompeleteDialog,completeProfile:e.completeProfile,history:e.history}))}},y6GU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r(n("diRs"));n("Aosp");var l=r(n("q1tI"));function r(e){return e&&e.__esModule?e:{default:e}}n("KkuB"),t.default=function(e){var t=e.menu,n=e.children,r=e.overlayClassName;return l.default.createElement(a.default,{content:t,trigger:["click"],placement:"bottom",overlayClassName:r},n)}},yQnu:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,l=n("q1tI"),r=(a=l)&&a.__esModule?a:{default:a},i=n("eO8H");t.default=function(e){var t=e.name,n=e.count,a=e.bottom,l=e.children,u=e.url;return r.default.createElement("div",{className:"box"},r.default.createElement("div",{className:"head"},r.default.createElement("span",{className:"font-16"},t),r.default.createElement(i.Link,{to:u},n,r.default.createElement("i",{className:"iconfont icon-youjiantou font-12 ml3"}))),r.default.createElement("div",{className:"content"},l),a?r.default.createElement("div",{className:"foot"},a):"")}}}]); |