![]() 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 : |
{"version":3,"file":"1300.6cd4151b019c090f080d.js","mappings":"sSAqBA,MAAMA,EAAiBC,IACnB,MAAMC,GAAUC,EAAAA,EAAAA,SAAO,IAChBC,EAAOC,IAAYC,EAAAA,EAAAA,WAAS,IAEnCC,EAAAA,EAAAA,YAAU,KACNL,EAAQM,SAAU,EACX,KACHN,EAAQM,SAAU,CAAK,IAE5B,IAEH,MAAMC,GAAoBC,EAAAA,EAAAA,cAAYC,UAClC,MAAMC,EAASX,EAAMY,MAAMC,OAAOC,aAC5Bd,EAAMe,QAAQC,UAAUL,EAAQX,EAAMiB,SAAUjB,EAAMkB,eACxDjB,EAAQM,SACRH,GAAS,EACb,GACD,CAACJ,EAAMY,MAAMC,OAAOC,OAAQd,EAAMiB,SAAUjB,EAAMkB,cAAelB,EAAMe,UAQ1E,OANAT,EAAAA,EAAAA,YAAU,KACNa,SAASC,KAAKC,UAAUC,IAAI,aAC5Bd,GAAmB,GACpB,CAACA,IAGAL,GAASH,EAAMuB,WAAavB,EAAMwB,SAC3B,KAIPC,IAAAA,cAAA,OACIC,GAAG,cACHC,UAAU,gBACZ,EAER5B,EAAA6B,UAAA,CAjDEL,UAASM,IAAAA,OAAAC,WAMTb,SAAQY,IAAAA,OAAAC,WACRN,SAAQK,IAAAA,OACRd,QAAOc,IAAAA,MAAA,CACHb,UAASa,IAAAA,KAAAC,aAAAA,WAEbZ,cAAaW,IAAAA,OAAAC,YAwCjB,SAAeC,EAAAA,EAAAA,MAAKhC,GCpBpB,GAAeiC,EAAAA,EAAAA,UAtBf,SAAyBC,GACrB,MAAMC,GAAOC,EAAAA,EAAAA,IAAeF,GACtBG,GAAUC,EAAAA,EAAAA,IAAkBJ,GAC5Bf,GAAgBoB,EAAAA,EAAAA,IAAiBL,GAIvC,MAAO,CACHV,UAJca,EAAUA,EAAQV,GAAK,GAKrCF,SAJaU,EAAOA,EAAKK,KAAO,GAKhCrB,gBAER,IAEA,SAA4BsB,GACxB,MAAO,CACHzB,SAAS0B,EAAAA,EAAAA,oBAAmB,CACxBzB,UAASA,EAAAA,GACVwB,GAEX,GAEA,CAA4DzC,E","sources":["webpack://mattermost-webapp/./src/components/permalink_view/permalink_view.tsx","webpack://mattermost-webapp/./src/components/permalink_view/index.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport React, {useState, useEffect, useCallback, memo, useRef} from 'react';\nimport type {match} from 'react-router-dom';\n\ntype Props = {\n channelId: string;\n\n /*\n * Object from react-router\n */\n match: match<{postid: string}>;\n returnTo: string;\n teamName?: string;\n actions: {\n focusPost: (postId: string, returnTo: string, currentUserId: string) => void;\n };\n currentUserId: string;\n}\n\nconst PermalinkView = (props: Props) => {\n const mounted = useRef(false);\n const [valid, setValid] = useState(false);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n\n const doPermalinkAction = useCallback(async () => {\n const postId = props.match.params.postid;\n await props.actions.focusPost(postId, props.returnTo, props.currentUserId);\n if (mounted.current) {\n setValid(true);\n }\n }, [props.match.params.postid, props.returnTo, props.currentUserId, props.actions]);\n\n useEffect(() => {\n document.body.classList.add('app__body');\n doPermalinkAction();\n }, [doPermalinkAction]);\n\n // it is returning null because main idea of this component is to fire focusPost redux action\n if (valid && props.channelId && props.teamName) {\n return null;\n }\n\n return (\n <div\n id='app-content'\n className='app__content'\n />\n );\n};\n\nexport default memo(PermalinkView);\n","// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {connect} from 'react-redux';\nimport {bindActionCreators} from 'redux';\nimport type {Dispatch} from 'redux';\n\nimport type {GlobalState} from '@mattermost/types/store';\n\nimport {getCurrentChannel} from 'mattermost-redux/selectors/entities/channels';\nimport {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams';\nimport {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';\n\nimport {focusPost} from './actions';\nimport PermalinkView from './permalink_view';\n\nfunction mapStateToProps(state: GlobalState) {\n const team = getCurrentTeam(state);\n const channel = getCurrentChannel(state);\n const currentUserId = getCurrentUserId(state);\n const channelId = channel ? channel.id : '';\n const teamName = team ? team.name : '';\n\n return {\n channelId,\n teamName,\n currentUserId,\n };\n}\n\nfunction mapDispatchToProps(dispatch: Dispatch) {\n return {\n actions: bindActionCreators({\n focusPost,\n }, dispatch),\n };\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PermalinkView);\n"],"names":["PermalinkView","props","mounted","useRef","valid","setValid","useState","useEffect","current","doPermalinkAction","useCallback","async","postId","match","params","postid","actions","focusPost","returnTo","currentUserId","document","body","classList","add","channelId","teamName","React","id","className","propTypes","_pt","isRequired","memo","connect","state","team","getCurrentTeam","channel","getCurrentChannel","getCurrentUserId","name","dispatch","bindActionCreators"],"sourceRoot":""}