build/static/js/122.d0d45210.chunk.js

1 line
16 KiB
JavaScript
Raw Permalink Normal View History

2022-12-08 16:50:44 +08:00
(this.webpackJsonp=this.webpackJsonp||[]).push([[122],{"6P6j":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=x(t("NUBc")),i=x(t("W9HT")),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("YQTV"),t("04bd"),t("k994");var l=t("q1tI"),c=x(l),p=x(t("2CTR")),d=t("spEH"),u=t("eO8H"),s=t("sYIF"),f=x(t("vDqi"));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),g=x[0],b=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),j=w[0],E=w[1],C=(0,l.useState)(!0),B=a(C,2),O=B[0],_=B[1];function N(){var e="/users/"+n+"/applied_transfer_projects.json";f.default.get(e,{params:{page:y,per_page:15}}).then((function(e){e&&(b(e.data.applied_transfer_projects),E(e.data.total_count),_(!1))})).catch((function(e){}))}return(0,l.useEffect)((function(){n&&(_(!0),N())}),[n,y]),c.default.createElement("div",null,c.default.createElement(i.default,{spinning:O},c.default.createElement("div",null,g&&g.length>0?c.default.createElement("ul",{className:"notifyList"},g.map((function(t,r){return c.default.createElement("li",{key:r},c.default.createElement(u.Link,{to:"/"+(t.user&&t.user.login)},c.default.createElement("img",{src:(0,s.getImageUrl)("/"+(t.user&&t.user.image_url)),alt:"",className:"notifyImg"})),c.default.createElement("div",{className:"notifyFlex"},c.default.createElement("p",{className:"notifyInfos"},c.default.createElement(u.Link,{to:"/"+(t.user&&t.user.login),className:"font-15 mr20"},t.user&&t.user.name),c.default.createElement("span",{className:"color-grey-9"},t.time_ago)),c.default.createElement(d.FlexAJ,null,c.default.createElement("p",{className:"color-grey-6"},"请求将仓库【",c.default.createElement(u.Link,{to:"/"+(t.project&&t.project.owner&&t.project.owner.login)+"/"+(t.project&&t.project.identifier)},t.project&&t.project.name),"】 转移给【",c.default.createElement(u.Link,{to:"/"+(t.owner&&t.owner.login)},t.owner&&t.owner.name),"】,是否接受?"),"common"===t.status&&c.default.createElement("span",null,c.default.createElement(o.default,{title:"确定接受仓库"+(t.project&&t.project.name)+"",okText:"确定",cancelText:"取消",onConfirm:function(){return r=t.id,i="/users/"+n+"/applied_transfer_projects/"+r+"/accept.json",void f.default.post(i).then((function(n){n&&n.data&&(N(),e&&e.deleteEvent("undo",1))})).catch((function(e){}));var r,i}},c.default.createElement("a",{className:"color-blue"},"接受")),c.default.createElement(o.default,{title:"确定拒绝接受仓库"+(t.project&&t.project.name)+"",okText:"确定",cancelText:"取消",onConfirm:function(){return r=t.id,i="/users/"+n+"/applied_transfer_projects/"+r+"/refuse.json",void f.default.post(i).then((function(n){n&&n.data&&(N(),e&&e.deleteEvent("undo",1))})).catch((function(e){}));var r,i}},c.default.createElement("a",{className:"color-red ml20"},"拒绝"))),"canceled"===t.status&&c.default.createElement("span",{className:"color-grey-9"},"对方已取消转移"),"accept"===t.status&&c.default.createElement("span",{className:"color-grey-9"},"已接受"),"refused"===t.status&&c.default.createElement("span",{className:"color-grey-9"},"已拒绝"))))}))):"")),g&&0===g.length&&c.default.createElement(p.default,{_html:"暂无接收信息"}),j>15&&c.default.createElement("div",{className:"edu-txt-center pt20 pb20"},c.default.createElement(r.default,{simple:!0,pageSize:15,total:j,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"),c=t("YMnH"),p=t("ZvpZ"),d=t("H84U");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return