![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/self/root/opt/mattermost/client/ |
Upload File : |
"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[5648],{97508:(e,t,n)=>{n.d(t,{V3:()=>c,gk:()=>d,iD:()=>i}),n(43813);var a=n(77798),l=n(23877),r=n(1418),o=n(28676),s=n(40693);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return async i=>{i({type:l.zO.LOGIN_REQUEST,data:null});try{const r=await s.mT.login(e,t,n);i((0,a.OJ)([{type:l.zO.LOGIN_SUCCESS},{type:l.zO.RECEIVED_ME,data:r}])),i((0,o.cF)(r.roles.split(" ")))}catch(e){return i({type:l.zO.LOGIN_FAILURE,error:e}),i((0,r.vV)(e)),{error:e}}return{data:!0}}}function c(e){return async t=>{t({type:l.zO.LOGIN_REQUEST,data:null});try{const n=await s.mT.loginWithDesktopToken(e);t((0,a.OJ)([{type:l.zO.LOGIN_SUCCESS},{type:l.zO.RECEIVED_ME,data:n}])),t((0,o.cF)(n.roles.split(" ")))}catch(e){return t({type:l.zO.LOGIN_FAILURE,error:e}),t((0,r.vV)(e)),{error:e}}return{data:!0}}}function d(e,t){return async n=>{n({type:l.zO.LOGIN_REQUEST,data:null});try{const r=await s.mT.loginById(e,t,"");n((0,a.OJ)([{type:l.zO.LOGIN_SUCCESS},{type:l.zO.RECEIVED_ME,data:r}])),n((0,o.cF)(r.roles.split(" ")))}catch(e){return n({type:l.zO.LOGIN_FAILURE,error:e}),n((0,r.vV)(e)),{error:e}}return{data:!0}}}},93692:(e,t,n)=>{n.d(t,{A:()=>w});var a=n(62688),l=n.n(a),r=(n(3188),n(30973),n(17046),n(36169),n(43813),n(10844),n(60473),n(59297),n(71633)),o=n.n(r),s=n(9241),i=n(97023),c=n.n(i),d=n(14778),u=n(23453),m=n(81911),p=n(97508),g=n(51881);const E="desktop_auth_client_token";var h=function(e){return e[e.None=0]="None",e[e.WaitingForBrowser=1]="WaitingForBrowser",e[e.LoggedIn=2]="LoggedIn",e[e.Authenticating=3]="Authenticating",e[e.Error=4]="Error",e}(h||{});const f=e=>{let{href:t,onLogin:n}=e;const a=(0,u.useDispatch)(),l=(0,m.useHistory)(),{search:r}=(0,m.useLocation)(),f=new URLSearchParams(r),w=f.get("server_token"),L=f.get("client_token"),v=sessionStorage.getItem(E),[C,k]=(0,i.useState)(w?h.LoggedIn:h.None),[M,_]=(0,i.useState)(),R=()=>{const e=new URL(window.location.href);let t="mattermost";e.searchParams.get("isDesktopDev")&&(t="mattermost-dev"),window.location.href=e.toString().replace(e.protocol,"".concat(t,":"))};let y,I,b;return(0,i.useEffect)((()=>{_(!1);const e=setTimeout((()=>{_(!0)}),1e4);return()=>{clearTimeout(e)}}),[C]),(0,i.useEffect)((()=>{w?v?(async()=>{if(!w||L!==v)return void k(h.Error);sessionStorage.removeItem(E);const{error:e}=await a((0,p.V3)(w));e&&e.server_error_id&&0!==e.server_error_id.length?k(h.Error):(k(h.LoggedIn),await n())})():R():(async()=>{const e="".concat(g.h.isDev()?"dev-":"").concat(s.randomBytes(32).toString("hex")).slice(0,64);sessionStorage.setItem(E,e);const n=new URL(t),a=new URLSearchParams(n.searchParams);a.set("desktop_token",e),window.open("".concat(n.origin).concat(n.pathname,"?").concat(a.toString())),k(h.WaitingForBrowser)})()}),[w]),C===h.WaitingForBrowser&&(y=c().createElement(d.FormattedMessage,{id:"desktop_auth_token.polling.redirectingToBrowser",defaultMessage:"Redirecting to browser..."}),I=c().createElement(d.FormattedMessage,{id:"desktop_auth_token.polling.awaitingToken",defaultMessage:"Authenticating in the browser, awaiting valid token."}),b=null),C===h.LoggedIn&&(y=c().createElement(d.FormattedMessage,{id:"desktop_auth_token.complete.youAreNowLoggedIn",defaultMessage:"You are now logged in"}),I=c().createElement(d.FormattedMessage,{id:"desktop_auth_token.complete.openMattermost",defaultMessage:"Click on <b>Open Mattermost</b> in the browser prompt to <a>launch the desktop app</a>",values:{a:e=>c().createElement("a",{onClick:R},e),b:e=>c().createElement("b",null,e)}}),b=c().createElement(d.FormattedMessage,{id:"desktop_auth_token.complete.havingTrouble",defaultMessage:"Having trouble logging in? <a>Open Mattermost in your browser</a>",values:{a:e=>c().createElement("a",{onClick:()=>l.push("/")},e)}})),C===h.Error&&(y=c().createElement(d.FormattedMessage,{id:"desktop_auth_token.error.somethingWentWrong",defaultMessage:"Something went wrong"}),I=c().createElement(d.FormattedMessage,{id:"desktop_auth_token.error.restartFlow",defaultMessage:"Click <a>here</a> to try again.",values:{a:e=>c().createElement("a",{onClick:()=>l.push("/")},e)}}),b=null),c().createElement("div",{className:"DesktopAuthToken"},c().createElement("h1",{className:"DesktopAuthToken__main"},y),c().createElement("p",{className:o()("DesktopAuthToken__sub",{complete:C===h.LoggedIn})},I),c().createElement("div",{className:"DesktopAuthToken__bottom"},M?b:null))};f.propTypes={href:l().string.isRequired,onLogin:l().func.isRequired};const w=f},11610:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(62688),l=n.n(a),r=n(71633),o=n.n(r),s=n(97023),i=n.n(s);const c=e=>{let{id:t,url:n,icon:a,label:l,style:r,direction:s="row",onClick:c}=e;return i().createElement("a",{id:t,className:o()("external-login-button",{"direction-column":"column"===s},t),href:n,style:r,onClick:c},a,i().createElement("span",{className:"external-login-button-label"},l))};c.propTypes={id:l().string.isRequired,url:l().string.isRequired,icon:l().node.isRequired,label:l().string.isRequired,direction:l().oneOf(["row","column"]),onClick:l().func.isRequired};const d=c},60824:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(62688),l=n.n(a),r=(n(3188),n(30973),n(71633)),o=n.n(r),s=n(97023),i=n.n(s),c=n(81911);const d=e=>{let{className:t,onClick:n=()=>{},alternateMessage:a,alternateLinkPath:l,alternateLinkLabel:r}=e;return a||l||r?i().createElement("div",{className:o()("alternate-link",t),"data-testid":"alternate-link"},a&&i().createElement("span",{className:"alternate-link__message"},a),l&&r&&i().createElement(c.Link,{className:"alternate-link__link",to:{pathname:l,search:location.search},onClick:n},r)):null};d.propTypes={className:l().string,onClick:l().func,alternateMessage:l().string,alternateLinkPath:l().string,alternateLinkLabel:l().string};const u=d},65844:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(62688),l=n.n(a),r=n(97023),o=n.n(r),s=n(78451);const i=e=>{let{title:t,message:n,SVGElement:a,extraContent:l,onEnterKeyDown:r}=e;return o().createElement("div",{className:"content-layout-column",onKeyDown:e=>{r&&e.key===s.Ay.KeyCodes.ENTER[0]&&r(e)},tabIndex:0},o().createElement("div",{className:"content-layout-column-svg"},a),o().createElement("h1",{className:"content-layout-column-title"},t),o().createElement("p",{className:"content-layout-column-message"},n),l&&o().createElement("div",{className:"content-layout-column-extra-content"},l))};i.propTypes={title:l().node.isRequired,message:l().node.isRequired,SVGElement:l().node,extraContent:l().node,onEnterKeyDown:l().func};const c=i},42970:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(97023),l=n.n(a);function r(e){return l().createElement("span",e,l().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l().createElement("path",{d:"M3.38 12.473c0.345 0.215 0.918 0.454 1.524 0.454 0.552 0 1.065 -0.16 1.49 -0.433l0.002 -0.001L8 11.491V15.111a1.387 1.387 0 0 1 -0.732 -0.208z",fill:"#225086"}),l().createElement("path",{d:"m6.98 1.34 -6.667 7.52c-0.515 0.581 -0.38 1.46 0.287 1.876l2.779 1.737c0.345 0.215 0.918 0.454 1.524 0.454 0.552 0 1.065 -0.16 1.49 -0.433l0.002 -0.001L8 11.491l-3.879 -2.425 3.88 -4.377V0.889c-0.377 0 -0.753 0.15 -1.02 0.451Z",fill:"#6df"}),l().createElement("path",{points:"4.636 10.199 4.688 10.231 9 12.927 9.001 12.927 9.001 12.927 9.001 5.276 9 5.275 4.636 10.199",fill:"#cbf8ff",d:"M4.121 9.066L4.167 9.094L8 11.491L8.001 11.491L8.001 11.491L8.001 4.69L8 4.689L4.121 9.066Z"}),l().createElement("path",{d:"M15.399 10.736c0.668 -0.417 0.802 -1.295 0.287 -1.876l-4.374 -4.934a2.756 2.756 0 0 0 -1.167 -0.259c-0.822 0 -1.557 0.355 -2.046 0.912l-0.097 0.109 3.879 4.377 -3.88 2.425v3.62c0.255 0 0.509 -0.069 0.732 -0.208l6.667 -4.167Z",fill:"#074793"}),l().createElement("path",{d:"M8.001 0.889v3.8l0.097 -0.109a2.711 2.711 0 0 1 2.046 -0.912c0.42 0 0.814 0.095 1.167 0.259l-2.292 -2.586A1.351 1.351 0 0 0 8 0.89Z",fill:"#0294e4"}),l().createElement("path",{points:"13.365 10.199 13.365 10.199 13.365 10.199 9.001 5.276 9.001 12.926 13.365 10.199",fill:"#96bcc2",d:"M11.88 9.066L11.88 9.066L11.88 9.066L8.001 4.69L8.001 11.49L11.88 9.066Z"})))}},74381:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(97023),l=n.n(a),r=n(14778);function o(e){const{formatMessage:t}=(0,r.useIntl)();return l().createElement("span",e,l().createElement("svg",{width:"12px",height:"13px",viewBox:"0 0 13 15",role:"presentation","aria-label":t({id:"generic_icons.channel.private",defaultMessage:"Private Channel Icon"})},l().createElement("g",{stroke:"none",strokeWidth:"1",fill:"inherit",fillRule:"evenodd"},l().createElement("g",{transform:"translate(-116.000000, -175.000000)",fillRule:"nonzero",fill:"inherit"},l().createElement("g",{transform:"translate(95.000000, 0.000000)"},l().createElement("g",{transform:"translate(20.000000, 113.000000)"},l().createElement("g",{transform:"translate(1.000000, 62.000000)"},l().createElement("path",{d:"M12.0714286,6.5 L11.1428571,6.5 L11.1428571,4.64285714 C11.1428571,2.07814286 9.06471429,0 6.5,0 C3.93528571,0 1.85714286,2.07814286 1.85714286,4.64285714 L1.85714286,6.5 L0.928571429,6.5 C0.415071429,6.5 0,7.00792857 0,7.52142857 L0,13.9285714 C0,14.4420714 0.415071429,14.8571429 0.928571429,14.8571429 L12.0714286,14.8571429 C12.5849286,14.8571429 13,14.4420714 13,13.9285714 L13,7.52142857 C13,7.00792857 12.5849286,6.5 12.0714286,6.5 Z M6.5,1.85714286 C8.03585714,1.85714286 9.28571429,3.107 9.28571429,4.64285714 L9.28571429,6.5 L8.35714286,6.5 L4.64285714,6.5 L3.71428571,6.5 L3.71428571,4.64285714 C3.71428571,3.107 4.96414286,1.85714286 6.5,1.85714286 Z"}))))))))}},24767:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(97023),l=n.n(a),r=n(14778);function o(e){const{formatMessage:t}=(0,r.useIntl)();return l().createElement("span",e,l().createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":t({id:"generic_icons.login.gitlab",defaultMessage:"Gitlab Icon"})},l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83325 15.4909L11.7793 6.45337H5.88745L8.83334 15.4909H8.83325Z",fill:"#E24329"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83339 15.4909L5.88737 6.45337H1.75854L8.83347 15.4908L8.83339 15.4909Z",fill:"#FC6D26"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75846 6.45329L0.863125 9.19966C0.781518 9.45021 0.870921 9.72467 1.08477 9.87941L8.83325 15.4908L1.75846 6.45325V6.45329Z",fill:"#FCA326"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.75859 6.45333H5.88742L4.11296 1.01011C4.02169 0.73003 3.62418 0.73003 3.53296 1.01011L1.75854 6.45333H1.75859Z",fill:"#E24329"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.83325 15.4909L11.7793 6.45337H15.9081L8.83334 15.4908L8.83325 15.4909Z",fill:"#FC6D26"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.908 6.45329L16.8034 9.19966C16.885 9.45021 16.7956 9.72467 16.5817 9.87941L8.83325 15.4908L15.908 6.45325V6.45329Z",fill:"#FCA326"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9081 6.45333H11.7793L13.5538 1.01011C13.6451 0.73003 14.0426 0.73003 14.1338 1.01011L15.9082 6.45333H15.9081Z",fill:"#E24329"})))}},44995:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(97023),l=n.n(a),r=n(14778);function o(e){const{formatMessage:t}=(0,r.useIntl)();return l().createElement("span",e,l().createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":t({id:"generic_icons.login.google",defaultMessage:"Google Icon"})},l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5787 8.16364C15.5787 7.6531 15.5329 7.16219 15.4478 6.69092H8.66675V9.47601H12.5417C12.3747 10.376 11.8675 11.1386 11.1049 11.6491V13.4556H13.4318C14.7933 12.2022 15.5787 10.3564 15.5787 8.16364Z",fill:"#4285F4"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.66685 15.2C10.6108 15.2 12.2407 14.5553 13.4319 13.4557L11.105 11.6491C10.4603 12.0811 9.63558 12.3364 8.66685 12.3364C6.79158 12.3364 5.2043 11.0699 4.63812 9.36804H2.23267V11.2335C3.41739 13.5866 5.8523 15.2 8.66685 15.2Z",fill:"#34A853"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.63807 9.36806C4.49407 8.93606 4.41225 8.4746 4.41225 8.00006C4.41225 7.52551 4.49407 7.06406 4.63807 6.63206V4.7666H2.23261C1.74498 5.7386 1.4668 6.83824 1.4668 8.00006C1.4668 9.16187 1.74498 10.2615 2.23261 11.2335L4.63807 9.36806Z",fill:"#FBBC05"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.66685 3.66369C9.72394 3.66369 10.673 4.02696 11.4192 4.74041L13.4843 2.67532C12.2374 1.5135 10.6076 0.800049 8.66685 0.800049C5.8523 0.800049 3.41739 2.4135 2.23267 4.76659L4.63812 6.63205C5.2043 4.93023 6.79158 3.66369 8.66685 3.66369Z",fill:"#EA4335"})))}},33081:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(97023),l=n.n(a),r=n(14778);function o(e){const{formatMessage:t}=(0,r.useIntl)();return l().createElement("span",e,l().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":t({id:"generic_icons.login.openid",defaultMessage:"OpenID Icon"})},l().createElement("path",{d:"M7.19995 1.2V15.2L9.59995 14V0L7.19995 1.2Z",fill:"#F48018"}),l().createElement("path",{d:"M15.6652 5.3302L16.0001 8.80002L11.313 7.85391",fill:"#AEB0B3"}),l().createElement("path",{d:"M10 4.61206V6.19484C11.015 6.37555 12.0439 6.71905 12.768 7.17939L14.4821 6.09046C13.3141 5.34815 11.686 4.82159 10 4.61206ZM2.42378 9.90251C2.42378 8.13669 4.2954 6.64895 6.84567 6.19484V4.61206C2.94414 5.09733 0 7.28065 0 9.90251C0 12.5244 3.08942 14.8262 7.2 15.2V13.6001C4.43386 13.2433 2.42378 11.7657 2.42378 9.90251Z",fill:"#AEB0B3"})))}},42392:(e,t,n)=>{n.d(t,{A:()=>d}),n(17046);var a=n(71633),l=n.n(a),r=n(97023),o=n.n(r),s=n(14778),i=n(78451),c=n(98566);const d=o().forwardRef(((e,t)=>{let{className:n,value:a,onChange:d,onBlur:u,onFocus:m,hasError:p,info:g,error:E,createMode:h,disabled:f,inputSize:w}=e;const{formatMessage:L}=(0,s.useIntl)(),[v,C]=(0,r.useState)(!1),k=E?{type:i.Kw.ERROR,value:E}:null,M=g?{type:i.Kw.INFO,value:g}:null,_=E?k:M,R=L(h?{id:"widget.passwordInput.createPassword",defaultMessage:"Choose a Password"}:{id:"widget.passwordInput.password",defaultMessage:"Password"});return o().createElement(c.A,{className:l()("password-input",n),wrapperClassName:"password-input-with-toggle",name:"password-input",type:v&&!f?"text":"password",inputSize:w,addon:o().createElement("button",{id:"password_toggle",type:"button","aria-label":L({id:"widget.passwordInput.passwordToggle",defaultMessage:"Show or hide password"}),className:"password-input-toggle",onClick:()=>C(!v),disabled:f},o().createElement("i",{className:v&&!f?"icon-eye-off-outline":"icon-eye-outline"})),value:a,onChange:d,onBlur:u,onFocus:m,placeholder:R,hasError:p,customMessage:E||g?_:void 0,disabled:f,ref:t})}))}}]); //# sourceMappingURL=5648.bad1b7e28b44ebab32d9.js.map