forgeplus/public/react/build/static/js/99.a319c9e2.chunk.js

1 line
15 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[99,132],{Fu44:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=x(t("W9HT")),i=x(t("NUBc")),o=x(t("NJEC")),a=function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,n){var t=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return t}(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t("04bd"),t("YQTV"),t("k994");var l=t("q1tI"),p=x(l),c=x(t("vDqi")),d=t("eO8H"),u=t("sYIF"),s=x(t("2CTR")),f=t("spEH");function x(e){return e&&e.__esModule?e:{default:e}}n.default=function(e){var n=e.match.params.username,t=(0,l.useState)(void 0),x=a(t,2),b=x[0],g=x[1],m=(0,l.useState)(1),h=a(m,2),y=h[0],v=h[1],k=(0,l.useState)(0),w=a(k,2),C=w[0],E=w[1],j=(0,l.useState)(!0),B=a(j,2),O=B[0],N=B[1];function P(){var e="/users/"+n+"/applied_projects.json";c.default.get(e).then((function(e){e&&(g(e.data.applied_projects),E(e.data.total_count),N(!1))})).catch((function(e){}))}return(0,l.useEffect)((function(){n&&(N(!0),P())}),[n]),p.default.createElement("div",null,p.default.createElement(r.default,{spinning:O},p.default.createElement("div",{style:{minHeight:"400px"}},b&&b.length>0?p.default.createElement("ul",{className:"notifyList"},b.map((function(t,r){return p.default.createElement("li",{key:r},p.default.createElement(d.Link,{to:"/"+(t.user&&t.user.login)},p.default.createElement("img",{src:(0,u.getImageUrl)("/"+(t.user&&t.user.image_url)),alt:"",className:"notifyImg"})),p.default.createElement("div",{className:"notifyFlex"},p.default.createElement("p",{className:"notifyInfos"},p.default.createElement(d.Link,{to:"/"+(t.user&&t.user.login),className:"font-15 mr20"},t.user&&t.user.name),p.default.createElement("span",{className:"color-grey-9"},t.time_ago)),p.default.createElement(f.FlexAJ,null,p.default.createElement("p",null,"申请以【","developer"===t.role?"开发者":"manager"===t.role?"管理者":"报告者","】身份加入【",t.project&&t.project.name,"】项目。是否同意?"),"common"===t.status&&p.default.createElement("span",null,p.default.createElement(o.default,{title:"确定同意"+(t.user&&t.user.name)+"加入【"+(t.project&&t.project.name)+"】项目?",okText:"确定",cancelText:"取消",onConfirm:function(){return r=t.id,i="/users/"+n+"/applied_projects/"+r+"/accept.json",void c.default.post(i).then((function(n){n&&n.data&&(P(),e&&e.deleteEvent("apply",1))})).catch((function(e){}));var r,i}},p.default.createElement("a",{className:"color-blue"},"同意")),p.default.createElement(o.default,{title:"确定拒绝"+(t.user&&t.user.name)+"加入【"+(t.project&&t.project.name)+"】项目?",okText:"确定",cancelText:"取消",onConfirm:function(){return r=t.id,i="/users/"+n+"/applied_projects/"+r+"/refuse.json",void c.default.post(i).then((function(n){n&&n.data&&(P(),e&&e.deleteEvent("apply",1))})).catch((function(e){}));var r,i}},p.default.createElement("a",{className:"color-red ml20"},"拒绝"))),"accepted"===t.status&&p.default.createElement("span",{className:"color-grey-9"},"已接受"),"refused"===t.status&&p.default.createElement("span",{className:"color-grey-9"},"已拒绝"))))}))):"",b&&0===b.length&&p.default.createElement(s.default,{_html:"暂无成员申请"}),C>15&&p.default.createElement("div",{className:"edu-txt-center pt20 pb20"},p.default.createElement(i.default,{simple:!0,pageSize:15,total:C,current:y,onChange:function(e){v(e)}})))))}},NJEC:function(e,n,t){"use strict";t.r(n);var r=t("q1tI"),i=t("VCL8"),o=t("3S7+"),a=t("CtXQ"),l=t("2/Rp"),p=t("YMnH"),c=t("ZvpZ"),d=t("H84U");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){return(s=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function f(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,n){return(x=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function b(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=h(e);if(n){var i=h(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return g(this,t)}}function g(e,n){return!n||"object"!==u(n)&&"function"!=typeof n?m(e):n}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t},v=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&x(e,n)}(u,e);var n,t,i,a=b(u);function u(e){var n;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,u),(n=a.call(this,e)).onConfirm=function(e){n.setVisible(!1,e);var t=n.props.onConfirm;t&&t.call(m(n),e)},n.onCancel=function(e){n.setVisible(!1,e);var t=n.props.onCancel;t&&t.call(m(n),e)},n.onVisibleChange=function(e){n.props.disabled||n.setVisible(e)},n.saveTooltip=function(e){n.tooltip=e},n.renderOverlay=function(e,t){var i=n.props,o=i.okButtonProps,a=i.cancelButtonProps,p=i.title,c=i.cancelText,d=i.okText,u=i.okType,f=i.icon;return r.createElement("div",null,r.createElement("div",{className:"".concat(e,"-inner-content")},r.createElement("div",{className:"".concat(e,"-message")},f,r.createElement("div",{className:"".concat(e,"-message-title")},p)),r.createElement("div",{className:"".concat(e,"-buttons")},r.createElement(l.default,s({onClick:n.onCancel,size:"small"},a),c||t.cancelText),r.createElement(l.default,s({onClick:n.onConfirm,type:u,size:"small"},o),d||t.okText))))},n.renderConfirm=function(e){var t=e.getPrefixCls,i=n.props,a=i.prefixCls,l=i.placement,d=y(i,["prefixCls","placement"]),u=t("popover",a),f=r.createElement(p.a,{componentName:"Popconfirm",defaultLocale:c.a.Popconfirm},(function(e){return n.renderOverlay(u,e)}));return r.createElement(o.default,s({},d,{prefixCls:u,placement:l,onVisibleChange:n.onVisibleChange,visible:n.state.visible,overlay:f,ref:n.saveTooltip}))},n.state={visible:e.visible},n}return n=u,i=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:"defaultVisible"in e?{visible:e.defaultVisible}:null}}],(t=[{key:"getPopupDomNode",value:function(){return this.tooltip.getPopupDomNode()}},{key:"setVisible",value:function(e,n){var t=this.props;"visible"in t||this.setState({visible:e});var r=t.onVisibleChange;r&&r(e,n)}},{key:"render",value:function(){return r.createElement(d.a,null,this.renderConfirm)}}])&&f(n.prototype,t),i&&f(n,i),u}(r.Component);v.defaultProps={transitionName:"zoom-big",placement:"top",trigger:"click",okType:"primary",icon:r.createElement(a.default,{type:"exclamation-circle",theme:"filled"}),disabled:!1},Object(i.polyfill)(v),n.default=v},k994:function(e,n,t){"use strict";t.r(n);t("SchZ"),t("Aosp"),t("L/Qf")},spEH:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GroupProjectBackgroup=n.Content=n.Cancel=n.GreenUnder=n.NumUl=n.Redback=n.Blueback=n.Greenback=n.Greenline=n.Redline=n.Blueline=n.WhiteBack=n.Gap=n.Short=n.ShortWidth=n.Long=n.LongWidth=n.Box=n.AlignAJBottom=n.AlignTop=n.AlignCenter=n.FlexAJ=n.AlignCenterBetween=n.Banner=void 0;var r,i=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}"],["{\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}"]),o=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}"]),a=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}"]),p=S(["{\n display:flex;\n align-items: flex-start;\n}"],["{\n display:flex;\n align-items: flex-start;\n}"]),c=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}"]),u=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}"]),s=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}"]),x=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}"]),b=S(["{\n padding-left:20px;\n box-sizing:border-box;\n}"],["{\n padding-left:20px;\n box-sizing:border-box;\n}"]),g=S(["{\n background-color:#fff;\n border-radius:5px;\n}"],["{\n background-color:#fff;\n border-radius:5px;\n}"]),m=S(["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid rgba(80,145,255,1);\n color:rgba(80,145,255,1);\n padding:0px 12px;\n display:inline-block;\n}"],["{\n height:30px;\n line-height:28px;\n border-radius:2px;\n border:1px solid rgba(80,145,255,1);\n color:rgba(80,145,255,1);\n padding:0px 12px;\n display:inline-block;\n}"]),h=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}"]),k=S(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:rgba(80,145,255,1);\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 color:#fff!important;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),w=S(["{\n height:30px;\n line-height:30px;\n border-radius:2px;\n background-color:#F73030;\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:#F73030;\n color:#fff;\n padding:0px 12px;\n display:inline-block;\n min-width:80px;\n text-align:center;\n}"]),C=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}"]),E=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}"]),O=S(["{\n background:#fafafa;\n padding:20px 30px;\n width:100%;\n}"],["{\n background:#fafafa;\n padding:20px 30px;\n width:100%;\n}"]),N=t("vOnD"),P=(r=N)&&r.__esModule?r:{default:r};function S(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}n.Banner=P.default.div(i),n.AlignCenterBetween=P.default.div(o),n.FlexAJ=P.default.div(a),n.AlignCenter=P.default.div(l),n.AlignTop=P.default.div(p),n.AlignAJBottom=P.default.div(c),n.Box=P.default.div(d),n.LongWidth=P.default.div(u),n.Long=P.default.div(s),n.ShortWidth=P.default.div(f),n.Short=P.default.div(x),n.Gap=P.default.div(b),n.WhiteBack=P.default.div(g),n.Blueline=P.default.a(m),n.Redline=P.default.a(h,(function(e){return e.bold?"#fff":"#F73030"}),(function(e){return e.bold?"#F73030":"#fff"})),n.Greenline=P.default.a(y,(function(e){return e.bold?"#fff":"#28BD6C"}),(function(e){return e.bold?"#28BD6C":"#fff"})),n.Greenback=P.default.a(v),n.Blueback=P.default.a(k),n.Redback=P.default.a(w),n.NumUl=P.default.ul(C),n.GreenUnder=P.default.a(E),n.Cancel=P.default.a(j),n.Content=P.default.div(B),n.GroupProjectBackgroup=P.default.div(O)}}]);