11 lines
20 KiB
JavaScript
11 lines
20 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[96],{83187:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){var _Users_cdle_Desktop_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(54689),_Users_cdle_Desktop_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Users_cdle_Desktop_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0__),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(81308),_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(48989),antd__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(79112),lodash__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(32699),lodash__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(50959),_submit__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(87474),_umijs_max__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(86195),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(11527);__webpack_exports__.Z=function(props){for(var _props$data$script,content=(_props$data$script=props.data.script)!==null&&_props$data$script!==void 0?_props$data$script:props.editorRef.current?props.editorRef.current.getValue().replace(/\r\n/g,`
|
|
`):"",formRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(),result=[],keys=[],_i=0,_arr=[/@form\s+({[^*]+?})/g,/Form\(([\s\S]+?)\)/g];_i<_arr.length;_i++){var pattern=_arr[_i],matches=content.matchAll(pattern),_iterator=_Users_cdle_Desktop_sillyPage_node_modules_pnpm_babel_runtime_7_21_0_node_modules_babel_runtime_helpers_createForOfIteratorHelper_js__WEBPACK_IMPORTED_MODULE_0___default()(matches),_step;try{var _loop=function _loop(){var match=_step.value;try{var _a=function(d){for(var a in d)d[a].dataIndex&&(d[a].key=d[a].dataIndex),d[a].key&&keys.push(d[a].key),d[a].required&&!d[a].formItemProps&&(d[a].formItemProps={rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879"}]}),d[a].columns&&(d[a].columns=_a(d[a].columns));return d},formObject=eval("(".concat(match[1],")"));(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isArray)(formObject)||(formObject=[formObject]),result=result.concat(formObject),keys=[],result=_a(result)}catch(g){console.log("form\u8868\u5355\u89E3\u6790\u9519\u8BEF",g)}};for(_iterator.s();!(_step=_iterator.n()).done;)_loop()}catch(g){_iterator.e(g)}finally{_iterator.f()}}return(0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function(){(0,_umijs_max__WEBPACK_IMPORTED_MODULE_4__.request)("/api/storage",{params:{keys:keys.join(",")}}).then(function(g){if(g&&g.data){var d;for(var a in g.data)g.data[a]=="false"&&(g.data[a]=!1),g.data[a]==""&&delete g.data[a];(d=formRef.current)===null||d===void 0||d.setFieldsValue(g.data)}})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__.Z,{title:"\u53C2\u6570\u914D\u7F6E",open:props.open,onCancel:props.onCancel,onOk:function g(){var d,a=formRef==null||(d=formRef.current)===null||d===void 0?void 0:d.getFieldsValue();(0,_submit__WEBPACK_IMPORTED_MODULE_3__.Z)(a).finally(function(){props.onCancel()})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_7__.A,{formRef,submitter:!1,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_ant_design_pro_components__WEBPACK_IMPORTED_MODULE_8__.Z,{layoutType:"Embed",columns:result})})})}},50115:function(g,d,a){a.r(d),a.d(d,{default:function(){return qe}});var oe=a(25359),A=a.n(oe),de=a(49811),Q=a.n(de),B=a(54306),v=a.n(B),ce=a(83187),ue=a(79112),o=a(50959),H=a(70458),k=a(21946),F=a(84875),R=a.n(F),b=a(7489),Pe=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(l[n[s]]=e[n[s]]);return l},q=e=>{var{prefixCls:t,className:l,color:n="blue",dot:s,pending:Z=!1,position:U,label:S,children:I}=e,j=Pe(e,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:W}=o.useContext(H.E_),f=W("timeline",t),M=R()({[`${f}-item`]:!0,[`${f}-item-pending`]:Z},l),$=/blue|red|green|gray/.test(n||"")?void 0:n,D=R()({[`${f}-item-head`]:!0,[`${f}-item-head-custom`]:!!s,[`${f}-item-head-${n}`]:!$});return o.createElement("li",Object.assign({},j,{className:M}),S&&o.createElement("div",{className:`${f}-item-label`},S),o.createElement("div",{className:`${f}-item-tail`}),o.createElement("div",{className:D,style:{borderColor:$,color:$}},s),o.createElement("div",{className:`${f}-item-content`},I))},E=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(l[n[s]]=e[n[s]]);return l},_e=e=>{var{prefixCls:t,className:l,pending:n=!1,children:s,items:Z,rootClassName:U,reverse:S=!1,direction:I,hashId:j,pendingDot:W,mode:f=""}=e,M=E(e,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const $=(u,L)=>f==="alternate"?u==="right"?`${t}-item-right`:u==="left"?`${t}-item-left`:L%2===0?`${t}-item-left`:`${t}-item-right`:f==="left"?`${t}-item-left`:f==="right"?`${t}-item-right`:u==="right"?`${t}-item-right`:"",D=(0,k.Z)(Z||[]),ae=typeof n=="boolean"?null:n;n&&D.push({pending:!!n,dot:W||o.createElement(b.Z,null),children:ae}),S&&D.reverse();const x=D.length,ne=`${t}-item-last`,he=D.filter(u=>!!u).map((u,L)=>{var z;const G=L===x-2?ne:"",V=L===x-1?ne:"",{className:ve}=u,re=E(u,["className"]);return o.createElement(q,Object.assign({},re,{className:R()([ve,!S&&n?G:V,$((z=u==null?void 0:u.position)!==null&&z!==void 0?z:"",L)]),key:(u==null?void 0:u.key)||L}))}),w=D.some(u=>!!(u!=null&&u.label)),X=R()(t,{[`${t}-pending`]:!!n,[`${t}-reverse`]:!!S,[`${t}-${f}`]:!!f&&!w,[`${t}-label`]:w,[`${t}-rtl`]:I==="rtl"},l,U,j);return o.createElement("ul",Object.assign({},M,{className:X}),he)},me=a(77515);function Te(e,t){return e&&Array.isArray(e)?e:(0,me.Z)(t).map(l=>{var n,s;return Object.assign({children:(s=(n=l==null?void 0:l.props)===null||n===void 0?void 0:n.children)!==null&&s!==void 0?s:""},l.props)})}var Ae=Te,Be=a(97624),Re=a(74074),Ze=a(49272);const We=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign({},(0,Ze.Wf)(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${t}-alternate,
|
|
&${t}-right,
|
|
&${t}-label`]:{[`${t}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${e.marginXXS}px`,"&-custom":{marginInlineStart:e.timeLineItemTailWidth/2}},"&-left":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${e.marginXXS}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${t}-item-content`]:{width:`calc(50% - ${e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail,
|
|
${t}-item-head,
|
|
${t}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(e.timeLineItemHeadSize+e.timeLineItemTailWidth)/2}px)`},[`${t}-item-content`]:{width:`calc(100% - ${e.timeLineItemHeadSize+e.marginXS}px)`}}},[`&${t}-pending
|
|
${t}-item-last
|
|
${t}-item-tail`]:{display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`&${t}-reverse
|
|
${t}-item-last
|
|
${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${t}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var Ke=(0,Be.Z)("Timeline",e=>{const t=(0,Re.TS)(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[We(t)]}),Ue=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(l[n[s]]=e[n[s]]);return l};const Ce=e=>{const{getPrefixCls:t,direction:l}=o.useContext(H.E_),{prefixCls:n,children:s,items:Z}=e,U=Ue(e,["prefixCls","children","items"]),S=t("timeline",n),[I,j]=Ke(S),W=Ae(Z,s);return I(o.createElement(_e,Object.assign({},U,{prefixCls:S,direction:l,items:W,hashId:j})))};Ce.Item=q;var ze=Ce,He=ze,i=a(11527),Fe=function(e){var t;return(0,i.jsx)(ue.Z,{title:"\u5F02\u5E38\u6536\u96C6 - "+((t=e.data.title)!==null&&t!==void 0?t:""),open:e.id!="",onOk:e.onOk,onCancel:e.onCancel,okButtonProps:{danger:!0},okText:"\u6E05\u7A7A",children:(0,i.jsx)(He,{mode:"alternate",items:e.data.messages})})},fe=a(87474),Ie=a(45645),Ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},we=Ne,Xe=a(26087),Ge=function(t,l){return o.createElement(Xe.Z,(0,Ie.Z)((0,Ie.Z)({},t),{},{ref:l,icon:we}))},Ve=o.forwardRef(Ge),Ye=a(12472),Je=a(52445),Qe=a(55147),pe=a(86195),ke=a(44901),O=a(4050),C=a(68243),te=a(21362),ge="",qe=function(){var e=(0,o.useState)([]),t=v()(e,2),l=t[0],n=t[1],s=(0,pe.useModel)("@@initialState"),Z=s.refresh,U=(0,o.useState)(""),S=v()(U,2),I=S[0],j=S[1],W=(0,o.useState)({id:"",messages:[]}),f=v()(W,2),M=f[0],$=f[1],D=(0,o.useState)("tab1"),ae=v()(D,2),x=ae[0],ne=ae[1],he=(0,o.useState)(0),w=v()(he,2),X=w[0],u=w[1],L=(0,o.useState)(0),z=v()(L,2),G=z[0],V=z[1],ve=(0,o.useState)(0),re=v()(ve,2),Se=re[0],be=re[1],et=(0,o.useState)({}),$e=v()(et,2),tt=$e[0],at=$e[1],nt=(0,o.useState)("\u5168\u90E8"),De=v()(nt,2),xe=De[0],rt=De[1],it=(0,o.useState)(""),je=v()(it,2),st=je[0],lt=je[1],ie=(0,o.useRef)(),se=function(_){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,i.jsx)(ke.Z,{count:_,overflowCount:1e4,style:{marginBlockStart:-2,marginInlineStart:4,color:r?"#1890FF":"#999",backgroundColor:r?"#E6F7FF":"#eee"}})};return(0,i.jsxs)(Ye._z,{children:[M.id!=""&&(0,i.jsx)(Fe,{data:M,onCancel:function(){$({id:"",messages:[]})},onOk:function(){var _={};_["plugin_messages."+M.id]="",(0,fe.Z)(_).finally(function(){$({id:"",messages:[]}),n(l.map(function(r){return r.id==M.id&&(r.messages=[]),r}))})}}),I!=""&&(0,i.jsx)(ce.Z,{data:{script:I},open:I,onCancel:function(){j("")}}),(0,i.jsx)(Je.Z,{menu:{activeKey:x,items:Object.entries(tt).map(function(h){return{key:h[0],label:(0,i.jsxs)("span",{children:[h[0],se(h[1],h[0]==xe)]})}}),onChange:function(_){var r;rt(_),(r=ie.current)===null||r===void 0||r.reload()}}}),(0,i.jsx)(Qe.Rs,{actionRef:ie,toolbar:{menu:{activeKey:x,items:[{key:"tab1",label:(0,i.jsxs)("span",{children:["\u5DF2\u5B89\u88C5",se(X,x==="tab1")]})},{key:"tab2",label:(0,i.jsxs)("span",{children:["\u672A\u5B89\u88C5",se(G,x==="tab2")]})},{key:"tab3",label:(0,i.jsxs)("span",{children:["\u53EF\u5347\u7EA7",se(Se,x==="tab3")]})}],onChange:function(_){var r;ne(_),(r=ie.current)===null||r===void 0||r.reload()}},search:{onSearch:function(_){var r;(r=ie.current)===null||r===void 0||r.reload(),lt(_)}}},search:{filterType:"light"},rowKey:"name",dataSource:l,request:Q()(A()().mark(function h(){var _,r=arguments;return A()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return _=r.length>0&&r[0]!==void 0?r[0]:{},_.activeKey=x,_.keyword=st,_.class=xe,ge!=""?_.init=ge:ge="false",p.abrupt("return",(0,pe.request)("/api/plugins/list.json",{params:_}).then(function(c){u(c.tab1),V(c.tab2),be(c.tab3),at(c.classes);var y=new Date,P=new Date(y);P.setDate(y.getDate()-1);var Me="\u4ECA\u5929 ",m="\u6628\u5929 ",J=function(ye){var Ee,dt=(Ee=c.data[ye].messages)!==null&&Ee!==void 0?Ee:[],ct=dt.sort(function(T,K){return K.unix-T.unix}),ut=ct.map(function(T){var K=new Date(T.unix*1e3),Le=K.toLocaleDateString(),Oe=K.toLocaleTimeString("zh-CN",{hour12:!1}),le;return Le===y.toLocaleDateString()?le=Me+Oe:Le===P.toLocaleDateString()?le=m+Oe:le=K.getFullYear()+"-"+(K.getMonth()+1).toString().padStart(2,"0")+"-"+K.getDate().toString().padStart(2,"0")+" "+Oe,{color:T.class==="warn"?"yellow":"red",label:le,children:(0,i.jsxs)(i.Fragment,{children:[T.version&&(0,i.jsx)(O.Z,{color:T.version==c.data[ye].version?"cyan":"",children:T.version}),T.content]})}});c.data[ye].messages=ut};for(var ot in c.data)J(ot);return c}));case 6:case"end":return p.stop()}},h)})),onDataSourceChange:n,pagination:{defaultPageSize:10,pageSizeOptions:["10","20","50","100"]},showActions:"hover",metas:{avatar:{dataIndex:"icon",search:!1},title:{dataIndex:"title",search:!1},description:{dataIndex:"description",search:!1},subTitle:{render:function(_,r){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)(O.Z,{color:r.identified?"gold":"grey",children:r.organization==""?"\u672A\u8BA4\u8BC1\u6765\u6E90":r.organization},r.organization)}),(0,i.jsx)(C.Z,{size:0,children:(0,i.jsxs)(O.Z,{color:"cyan",children:[r.downloads," \u4E0B\u8F7D"]},"downloads")}),r.module&&(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)(O.Z,{color:"purple",children:"\u6A21\u5757"},"module")}),r.web&&(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)(O.Z,{color:"brown",children:"\u7F51\u7EDC\u670D\u52A1"},"web")}),r.encrypt&&(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)(O.Z,{color:"orange",children:"\u52A0\u5BC6\u811A\u672C"},"encrypt")}),r.status==1&&(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsx)(O.Z,{color:"pink",onClick:function(){var p={};p["plugins."+r.id]="install",(0,fe.Z)(p,"\u6B63\u5728\u5904\u7406\u8BF7\u6C42...","","").then(function(c){var y=c==null?void 0:c.errors["plugins."+r.id];if(y){te.ZP.warning(y,2);return}else be(Se-1),te.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);n(l.map(function(P){return P.id==r.id&&(P.status=2),P}))})},children:"\u5347\u7EA7"},r.status)})}),r.has_form&&(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsx)(O.Z,{color:"blue",onClick:function(){var p="plugins."+r.id;(0,pe.request)("/api/storage",{params:{keys:[p].join(",")}}).then(function(c){c!=null&&c.data&&c.data[p]&&j(c.data[p])})},children:"\u914D\u7F6E"},r.status)})}),r.running&&(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)(O.Z,{icon:(0,i.jsx)(Ve,{spin:!0}),color:"processing",children:"\u8FD0\u884C\u4E2D"},"running")}),r.messages.length!=0&&(0,i.jsx)(C.Z,{size:0,children:(0,i.jsx)("a",{children:(0,i.jsxs)(O.Z,{color:"red",onClick:function(){$({id:r.id,messages:r.messages,title:r.title})},children:["\u5F02\u5E38 ",r.messages.length]},"messages")})})]})},search:!1},actions:{render:function(_,r){return[(0,i.jsx)("a",{onClick:Q()(A()().mark(function Y(){var p,c,y,P;return A()().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:p=0,c={},m.t0=r.status,m.next=m.t0===0?5:m.t0===6?8:m.t0===1||m.t0===2?10:13;break;case 5:return p=2,c["plugins."+r.id]="install",m.abrupt("break",13);case 8:return m.abrupt("return");case 10:return p=0,c["plugins."+r.id]="",m.abrupt("break",13);case 13:return m.next=15,(0,fe.Z)(c,"\u6B63\u5728\u5904\u7406\u8BF7\u6C42...","","");case 15:if(y=m.sent,P=y==null?void 0:y.errors["plugins."+r.id],!P){m.next=22;break}return te.ZP.warning(P,2),m.abrupt("return");case 22:p==0?(u(X-1),V(G+1),r.status==1&&be(Se-1)):(u(X+1),V(G-1)),te.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01",1);case 24:n(l.map(function(J){return J.id==r.id&&(J.status=p),J})),Z();case 26:case"end":return m.stop()}},Y)})),target:"_blank",rel:"noopener noreferrer",children:r.status==0?"\u5B89\u88C5":r.status==6?"\u539F\u521B":"\u5378\u8F7D"},"link")]},search:!1}}})]})}},87474:function(g,d,a){var oe=a(25359),A=a.n(oe),de=a(49811),Q=a.n(de),B=a(21362),v=a(86195),ce=function(){var ue=Q()(A()().mark(function o(H){var k,F,R,b=arguments;return A()().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return k=b.length>1&&b[1]!==void 0?b[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",F=b.length>2&&b[2]!==void 0?b[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",R=b.length>3&&b[3]!==void 0?b[3]:"\u63D0\u4EA4\u5931\u8D25",k&&B.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),N.abrupt("return",new Promise(function(q){(0,v.request)("/api/storage",{method:"put",data:H}).then(function(E){var ee;if(B.ZP.destroy(),(E==null||(ee=E.data)===null||ee===void 0?void 0:ee.isLogin)==!1){B.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var _e=new URL(window.location.href).searchParams,me=_e.get("redirect");window.location.pathname!=="/user/login"&&!me&&v.history.replace({pathname:"/user/login"});return}E!=null&&E.success?F&&B.ZP.success(F,1):R&&B.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),q(E)})}));case 5:case"end":return N.stop()}},o)}));return function(H){return ue.apply(this,arguments)}}();d.Z=ce}}]);
|