You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
10 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[366],{72579:function(He,W,r){r.r(W),r.d(W,{default:function(){return be}});var K=r(15009),F=r.n(K),Q=r(97857),L=r.n(Q),X=r(99289),B=r.n(X),Y=r(5574),J=r.n(Y),w=r(39418),q=r(48357),_=r(87547),l=r(1413),P=r(67294),ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},ne=ee,te=r(91146),k=function(t,e){return P.createElement(te.Z,(0,l.Z)((0,l.Z)({},t),{},{ref:e,icon:ne}))};k.displayName="LockOutlined";var re=P.forwardRef(k),T=r(91),oe=r(10915),ae=r(28459),le=r(93967),se=r.n(le),ie=r(34994),I=r(4942),de=r(98082),ue=function(t){return(0,I.Z)((0,I.Z)({},t.componentCls,{"&-container":{display:"flex",flex:"1",flexDirection:"column",height:"100%",paddingInline:32,paddingBlock:24,overflow:"auto",background:"inherit"},"&-top":{textAlign:"center"},"&-header":{display:"flex",alignItems:"center",justifyContent:"center",height:"44px",lineHeight:"44px",a:{textDecoration:"none"}},"&-title":{position:"relative",insetBlockStart:"2px",color:"@heading-color",fontWeight:"600",fontSize:"33px"},"&-logo":{width:"44px",height:"44px",marginInlineEnd:"16px",verticalAlign:"top",img:{width:"100%"}},"&-desc":{marginBlockStart:"12px",marginBlockEnd:"40px",color:t.colorTextSecondary,fontSize:t.fontSize},"&-main":{minWidth:"328px",maxWidth:"580px",margin:"0 auto","&-other":{marginBlockStart:"24px",lineHeight:"22px",textAlign:"start"}}}),"@media (min-width: @screen-md-min)",(0,I.Z)({},"".concat(t.componentCls,"-container"),{paddingInline:0,paddingBlockStart:32,paddingBlockEnd:24,backgroundRepeat:"no-repeat",backgroundPosition:"center 110px",backgroundSize:"100%"}))};function ce(o){return(0,de.Xj)("LoginForm",function(t){var e=(0,l.Z)((0,l.Z)({},t),{},{componentCls:".".concat(o)});return[ue(e)]})}var n=r(85893),ve=["logo","message","contentStyle","title","subTitle","actions","children","containerStyle","otherStyle"];function ge(o){var t,e=o.logo,i=o.message,d=o.contentStyle,c=o.title,u=o.subTitle,y=o.actions,g=o.children,j=o.containerStyle,v=o.otherStyle,a=(0,T.Z)(o,ve),R=(0,oe.YB)(),Z=a.submitter===!1?!1:(0,l.Z)((0,l.Z)({searchConfig:{submitText:R.getMessage("loginForm.submitText","\u767B\u5F55")}},a.submitter),{},{submitButtonProps:(0,l.Z)({size:"large",style:{width:"100%"}},(t=a.submitter)===null||t===void 0?void 0:t.submitButtonProps),render:function(O,G){var E,ke=G.pop();if(typeof(a==null||(E=a.submitter)===null||E===void 0?void 0:E.render)=="function"){var A,b;return a==null||(A=a.submitter)===null||A===void 0||(b=A.render)===null||b===void 0?void 0:b.call(A,O,G)}return ke}}),h=(0,P.useContext)(ae.ZP.ConfigContext),f=h.getPrefixCls("pro-form-login"),p=ce(f),S=p.wrapSSR,s=p.hashId,m=function(O){return"".concat(f,"-").concat(O," ").concat(s)},z=(0,P.useMemo)(function(){return e?typeof e=="string"?(0,n.jsx)("img",{src:e}):e:null},[e]);return S((0,n.jsxs)("div",{className:se()(m("container"),s),style:j,children:[(0,n.jsxs)("div",{className:"".concat(m("top")," ").concat(s).trim(),children:[c||z?(0,n.jsxs)("div",{className:"".concat(m("header")),children:[z?(0,n.jsx)("span",{className:m("logo"),children:z}):null,c?(0,n.jsx)("span",{className:m("title"),children:c}):null]}):null,u?(0,n.jsx)("div",{className:m("desc"),children:u}):null]}),(0,n.jsxs)("div",{className:m("main"),style:(0,l.Z)({width:328},d),children:[(0,n.jsxs)(ie.A,(0,l.Z)((0,l.Z)({isKeyPressSubmit:!0},a),{},{submitter:Z,children:[i,g]})),y?(0,n.jsx)("div",{className:m("main-other"),style:v,children:y}):null]})]}))}var H=r(97685),fe=r(21770),he=r(8232),pe=r(55241),me=r(97435),C=r(26440),xe=["fieldProps","proFieldProps"],ye=["fieldProps","proFieldProps"],M="text",Pe=function(t){var e=t.fieldProps,i=t.proFieldProps,d=(0,T.Z)(t,xe);return(0,n.jsx)(C.Z,(0,l.Z)({valueType:M,fieldProps:e,filedConfig:{valueType:M},proFieldProps:i},d))},Se=function(t){var e=(0,fe.Z)(t.open||!1,{value:t.open,onChange:t.onOpenChange}),i=(0,H.Z)(e,2),d=i[0],c=i[1];return(0,n.jsx)(he.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(y){var g,j=y.getFieldValue(t.name||[]);return(0,n.jsx)(pe.Z,(0,l.Z)((0,l.Z)({getPopupContainer:function(a){return a&&a.parentNode?a.parentNode:a},onOpenChange:c,content:(0,n.jsxs)("div",{style:{padding:"4px 0"},children:[(g=t.statusRender)===null||g===void 0?void 0:g.call(t,j),t.strengthText?(0,n.jsx)("div",{style:{marginTop:10},children:(0,n.jsx)("span",{children:t.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},t.popoverProps),{},{open:d,children:t.children}))}})},je=function(t){var e=t.fieldProps,i=t.proFieldProps,d=(0,T.Z)(t,ye),c=(0,P.useState)(!1),u=(0,H.Z)(c,2),y=u[0],g=u[1];return e!=null&&e.statusRender&&d.name?(0,n.jsx)(Se,{name:d.name,statusRender:e==null?void 0:e.statusRender,popoverProps:e==null?void 0:e.popoverProps,strengthText:e==null?void 0:e.strengthText,open:y,onOpenChange:g,children:(0,n.jsx)("div",{children:(0,n.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:(0,l.Z)((0,l.Z)({},(0,me.Z)(e,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(v){var a;e==null||(a=e.onBlur)===null||a===void 0||a.call(e,v),g(!1)},onClick:function(v){var a;e==null||(a=e.onClick)===null||a===void 0||a.call(e,v),g(!0)}}),proFieldProps:i,filedConfig:{valueType:M}},d))})}):(0,n.jsx)(C.Z,(0,l.Z)({valueType:"password",fieldProps:e,proFieldProps:i,filedConfig:{valueType:M}},d))},N=Pe;N.Password=je,N.displayName="ProFormComponent";var U=N,V=r(22270),Ze=r(84567),Fe=r(83607),Ce=["options","fieldProps","proFieldProps","valueEnum"],Te=P.forwardRef(function(o,t){var e=o.options,i=o.fieldProps,d=o.proFieldProps,c=o.valueEnum,u=(0,T.Z)(o,Ce);return(0,n.jsx)(C.Z,(0,l.Z)({ref:t,valueType:"checkbox",valueEnum:(0,V.h)(c,void 0),fieldProps:(0,l.Z)({options:e},i),lightProps:(0,l.Z)({labelFormatter:function(){return(0,n.jsx)(C.Z,(0,l.Z)({ref:t,valueType:"checkbox",mode:"read",valueEnum:(0,V.h)(c,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,l.Z)({options:e},i),proFieldProps:d},u))}},u.lightProps),proFieldProps:d},u))}),Me=P.forwardRef(function(o,t){var e=o.fieldProps,i=o.children;return(0,n.jsx)(Ze.Z,(0,l.Z)((0,l.Z)({ref:t},e),{},{children:i}))}),Ae=(0,Fe.G)(Me,{valuePropName:"checked"}),$=Ae;$.Group=Te;var Le=$,x=r(35312),Be=r(2453),Ie=r(13169),Ne=r(98257),Re=r(73935),ze=r(67610),D=(0,Ne.kc)(function(o){var t=o.token;return{action:{marginLeft:"8px",color:"rgba(0, 0, 0, 0.2)",fontSize:"24px",verticalAlign:"middle",cursor:"pointer",transition:"color 0.3s","&:hover":{color:t.colorPrimaryActive}},lang:{width:42,height:42,lineHeight:"42px",position:"fixed",right:16,borderRadius:t.borderRadius,":hover":{backgroundColor:t.colorBgTextHover}},container:{display:"flex",flexDirection:"column",height:"100vh",overflow:"auto",backgroundImage:"url('https://mdn.alipayobjects.com/yuyan_qk0oxh/afts/img/V-_oS6r-i7wAAAAAAAAAAAAAFl94AQBr')",backgroundSize:"100% 100%"}}}),Oe=function(){var t=D(),e=t.styles;return(0,n.jsx)("div",{className:e.lang,"data-lang":!0,children:x.SelectLang&&(0,n.jsx)(x.SelectLang,{})})},Ee=function(){var t=(0,P.useState)("account"),e=J()(t,2),i=e[0],d=e[1],c=(0,x.useModel)("@@initialState"),u=c.initialState,y=c.setInitialState,g=D(),j=g.styles,v=(0,x.useIntl)(),a=function(){var Z=B()(F()().mark(function h(){var f,p;return F()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,u==null||(f=u.fetchUserInfo)===null||f===void 0?void 0:f.call(u);case 2:p=s.sent,p&&(0,Re.flushSync)(function(){y(function(m){return L()(L()({},m),{},{currentUser:p})})});case 4:case"end":return s.stop()}},h)}));return function(){return Z.apply(this,arguments)}}(),R=function(){var Z=B()(F()().mark(function h(f){var p;return F()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,(0,q.$g)(L()({},f));case 3:return p=v.formatMessage({id:"pages.login.success",defaultMessage:"\u767B\u5F55\u6210\u529F\uFF01"}),Be.ZP.success(p),s.next=7,a();case 7:x.history.push("/"),s.next=12;break;case 10:s.prev=10,s.t0=s.catch(0);case 12:case"end":return s.stop()}},h,null,[[0,10]])}));return function(f){return Z.apply(this,arguments)}}();return(0,n.jsxs)("div",{className:j.container,children:[(0,n.jsx)(x.Helmet,{children:(0,n.jsxs)("title",{children:[v.formatMessage({id:"menu.login",defaultMessage:"\u767B\u5F55\u9875"}),"- ",ze.Z.title]})}),(0,n.jsx)(Oe,{}),(0,n.jsx)("div",{style:{flex:"1",padding:"32px 0"},children:(0,n.jsxs)(ge,{contentStyle:{minWidth:280,maxWidth:"75vw"},logo:(0,n.jsx)("img",{alt:"logo",src:"/logo.svg"}),title:"Matrix",initialValues:{autoLogin:!0},onFinish:function(){var Z=B()(F()().mark(function h(f){return F()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,R(f);case 2:case"end":return S.stop()}},h)}));return function(h){return Z.apply(this,arguments)}}(),children:[(0,n.jsx)(Ie.Z,{activeKey:i,onChange:d,centered:!0,items:[{key:"account",label:v.formatMessage({id:"pages.login.accountLogin.tab",defaultMessage:"\u8D26\u6237\u5BC6\u7801\u767B\u5F55"})}]}),i==="account"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(U,{name:"name",fieldProps:{size:"large",prefix:(0,n.jsx)(_.Z,{onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})},placeholder:v.formatMessage({id:"pages.login.username.placeholder",defaultMessage:"\u7528\u6237\u540D"}),rules:[{required:!0,message:(0,n.jsx)(x.FormattedMessage,{id:"pages.login.username.required",defaultMessage:"\u8BF7\u8F93\u5165\u7528\u6237\u540D!"})}]}),(0,n.jsx)(U.Password,{name:"pwd",fieldProps:{size:"large",prefix:(0,n.jsx)(re,{onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})},placeholder:v.formatMessage({id:"pages.login.password.placeholder",defaultMessage:"\u5BC6\u7801"}),rules:[{required:!0,message:(0,n.jsx)(x.FormattedMessage,{id:"pages.login.password.required",defaultMessage:"\u8BF7\u8F93\u5165\u5BC6\u7801\uFF01"})}]})]}),(0,n.jsx)("div",{style:{marginBottom:24},children:(0,n.jsx)(Le,{noStyle:!0,name:"autoLogin",children:(0,n.jsx)(x.FormattedMessage,{id:"pages.login.rememberMe",defaultMessage:"\u81EA\u52A8\u767B\u5F55"})})})]})}),(0,n.jsx)(w.$_,{})]})},be=Ee}}]);