{"version":3,"sources":["pages/Elfinder/components/TransferResult.tsx","pages/Elfinder/components/Transferring.tsx","pages/Elfinder/components/TransferBtn.tsx","pages/Elfinder/components/TransferFiles.tsx","pages/Layout/selectors.ts","pages/Layout/container.tsx"],"names":["TransferResult","props","file","transferHistory","onBack","onChangeTransferHistory","data","total","_useState","useState","_useState2","Object","slicedToArray","current","setCurrent","react_default","a","createElement","className","tooltip","title","intl","get","overlayClassName","icon","type","onClick","name","length","react_custom_scrollbars_lib","autoHeight","autoHide","autoHeightMax","map","item","key","id","file_src","state","style","color","error","pagination","size","defaultPageSize","onChange","page","Transferring","allClusters","transferFiles","onViewCompleted","onCancelFile","onChangeTransferring","currentPage","setCurrentPage","_useState3","_useState4","currentFile","setCurrentFile","getFileType","filePath","handleFileName","names","split","indexOf","some","toLowerCase","paths","Fragment","keys","i","index","concat","onMouseEnter","onMouseLeave","popconfirm","okText","cancelText","onConfirm","file_uuid_src","newSize","MB","KB","GB","TB","Number","toFixed","handleFileSize","file_size","seconds","update_time","start_time","handleSpeed","file_size_transfered","TransferBtn","_this","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","root","node","timer","resize","_this$props$height","height","offsetWidth","parentNode","setState","radio","renderChart","_this$props","percent","_this$props$color","cancelAnimationFrame","canvas","ctx","getContext","canvasWidth","width","canvasHeight","radius","cR","beginPath","lineWidth","axisLength","unit","currRange","xOffset","sp","currData","arcStack","bR","circleOffset","Math","PI","circleLock","push","cos","sin","cStartPoint","shift","strokeStyle","moveTo","render","currentTimer","clearRect","temp","lineTo","stroke","globalCompositeOperation","arc","save","restore","clip","shadowColor","fillStyle","range","sinStack","x","y","dx","dy","startPoint","gradient","createLinearGradient","addColorStop","fill","drawSin","requestAnimationFrame","confirmExit","window","removeEventListener","exitTransmission","_this2","addEventListener","passive","_this3","_this$props2","_this$props2$height","exitVisible","clickBth","leaveCircle","hiddenConfirmExit","visible","placement","onCancel","ref","n","onContextMenu","transform","React","Component","statusInTransit","TransferFiles","enterFlag","endTransferTimer","formatTransfferingParams","states","start","transferringPage","viewCompleted","test","authorizedClusters","filter","params","cluster_uuid","uuid","fileResult","actions","getTransferHistory","handleTransferHistoryChange","closeTransferInfo","transferringVisible","enterLists","ids","forEach","f","s","cancelTransferFile","fileUUID","closeTransfer","e","preventDefault","setTimeout","cancelFile","hanldeChangeTransferring","getTransferFiles","showTransferring","transferBtnDom","document","getElementById","transferAreaDom","offsetLeft","left","offsetTop","top","speed","mean","drag","Drag","repeat","_this$state","transferSpeed","dest_cluster_name","react_addons_css_transition_group_default","transitionName","transitionEnterTimeout","transitionLeaveTimeout","components_TransferResult","components_Transferring","components_TransferBtn","enhance","compose","connect","transferFilesSelector","dispatch","bindActionCreators","elfinderActions","getTransferList","changeTransfer","ToJS","createSelector","getEnableMultiCluster","getSwitchClusterInfo","getIsMultiClusterUser","getTransferVisible","getIsExternalClusterUser","getEnableNewClusterWindow","enableMultiCluster","switchClusterInfo","isMultiClusterUser","transferVisible","isExternalClusterUser","enableNewClusterWindow","scriptLoader","require","default","process","selector","_ref","SwitchClusterVisible","contentVisible","useEffect","eth","ethereum","isScriptLoadSucceed","setInterval","web3Option","Web3","determineAddress","clearInterval","backLogin","removeListener","handleChainChange","handleAccountChange","_ref2","asyncToGenerator","regenerator_default","mark","_callee","web3","wrap","_context","prev","next","getAccounts","then","accounts","web3Info","localStorage","getItem","JSON","parse","address","determineChain","chain_id","stop","_x","apply","arguments","_ref3","_callee2","chain","chainId","_context2","request","method","sent","utils","numberToHex","on","_x2","checkAccount","_ref4","_callee3","msg","_context3","location","href","abrupt","chainID","_x3","ClusterManage","Header","Toolbar","Apps","Windows","components_TransferFiles"],"mappings":"8aA+FeA,EAhFuC,SAACC,GAAU,IAE7DC,EAIED,EAJFC,KACAC,EAGEF,EAHFE,gBACAC,EAEEH,EAFFG,OACAC,EACEJ,EADFI,wBAEMC,EAAgBH,EAAhBG,KAAMC,EAAUJ,EAAVI,MAPiDC,EAQjCC,mBAAiB,GARgBC,EAAAC,O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H,EAAAC,EAAAC,cAAA,OAAKC,UAAU,qBACbH,EAAAC,EAAAC,cAACyU,EAAA,EAAD,CAASxU,UAAU,8BACnBH,EAAAC,EAAAC,cAACY,EAAA,WAAD,CAAYC,YAAU,EAACC,UAAQ,EAACb,UAAU,+BACxCH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,+BACbH,EAAAC,EAAAC,cAAC0U,EAAA,EAAD,SAIN5U,EAAAC,EAAAC,cAAC2U,EAAA,EAAD,MACA7U,EAAAC,EAAAC,cAACyU,EAAA,EAAD,MACCzE,GAAmBlQ,EAAAC,EAAAC,cAAC4U,EAAD","file":"static/js/4.dd70d282.chunk.js","sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\nimport intl from 'react-intl-universal';\nimport { Icon, Tooltip, Pagination } from 'antd';\nimport {\n TransferHistoryResp\n} from '../../../modules/const';\nimport { Scrollbars } from 'react-custom-scrollbars';\n\ninterface TransferResultProps {\n file: any;\n transferHistory: { data: TransferHistoryResp[]; total: number };\n onBack(): void;\n onChangeTransferHistory(page: number): void;\n}\n\nconst TransferResult: React.FC = (props) => {\n const {\n file,\n transferHistory,\n onBack,\n onChangeTransferHistory\n } = props;\n const { data, total } = transferHistory;\n const [current, setCurrent] = useState(1);\n\n const changeTransferHistory = (page: number) => {\n setCurrent(page);\n onChangeTransferHistory(page);\n };\n\n return
\n
\n \n \n \n
\n {file.name}\n
\n
\n {\n data.length > 0 ? \n
\n
    \n {data.map((item: TransferHistoryResp) => (\n
  • \n \n \n {\n item.state === 10 ? \n {intl.get('complete')} :\n \n \n {intl.get('failure')}\n \n \n }\n \n
  • \n ))}\n
\n
\n
: {intl.get('noData')}
\n }\n {\n total && total > 20 ?
\n \n
: null\n }\n ;\n};\n\nexport default TransferResult;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport intl from 'react-intl-universal';\nimport { Icon, Tooltip, Pagination, Popconfirm } from 'antd';\nimport { keys } from 'lodash';\nimport {\n TransferHistoryResp,\n TransferListResp\n} from '../../../modules/const';\nimport { Scrollbars } from 'react-custom-scrollbars';\n\ninterface TransferResultProps {\n allClusters: any;\n transferFiles: { data: TransferHistoryResp[]; total: number };\n onViewCompleted(params: string): void;\n onCancelFile(UUID: string): void;\n onChangeTransferring(page: number): void;\n getTransferFiles(params: any): void;\n}\n\nconst Transferring: React.FC = (props) => {\n const {\n allClusters,\n transferFiles,\n onViewCompleted,\n onCancelFile,\n onChangeTransferring\n } = props;\n const [currentPage, setCurrentPage] = useState(1);\n const [currentFile, setCurrentFile] = useState(-1);\n const getFileType = (filePath: string) => {\n let name: any = handleFileName(filePath);\n let names = name.split('.');\n const zipType = ['rar', 'cab', 'iso', 'jar', 'ace',\n '7z', 'tar', 'gz', 'arj', 'lzh', 'uue', 'bz2', 'z'];\n if (name.indexOf('.') > -1) {\n if (zipType.some((item) => item === (names[names.length - 1]).toLowerCase())) {\n return 'file-zip';\n }\n return 'file-text';\n }\n return 'folder';\n };\n\n const handleFileName = (filePath: string) => {\n const paths = filePath.split('/');\n return paths[paths.length - 1] || filePath;\n };\n\n const handleSpeed = (file: TransferListResp) => {\n const seconds = file.update_time - file.start_time;\n\n if (file.state === 0) {\n return intl.get('TransferData.init');\n } else if (file.state === 1) {\n return intl.get('TransferData.checking');\n } else if (file.state === 2 || seconds === 0) {\n return intl.get('TransferData.waiting');\n }\n\n if (file.file_size > 1024) {\n if (file.file_size > (1024 * 1024)) {\n return `${(file.file_size / 1024 / 1024 / seconds).toFixed(2)}MB/s`;\n }\n return `${(file.file_size / 1024 / seconds).toFixed(2)}kB/s`;\n } else {\n return `${(file.file_size / seconds).toFixed(2)}b/s`;\n }\n };\n\n const handleFileSize = (size: number) => {\n let newSize: any = size + 'b';\n const KB = 1024;\n const MB = KB * 1024;\n const GB = MB * 1024;\n const TB = GB * 1024;\n if (size >= TB) {\n newSize = Number((size / TB).toFixed(2)) + 'TB';\n } else if (size >= GB) {\n newSize = Number((size / GB).toFixed(2)) + 'GB';\n } else if (size >= MB) {\n newSize = Number((size / MB).toFixed(2)) + 'MB';\n } else if (size >= KB) {\n newSize = Number((size / KB).toFixed(2)) + 'KB';\n }\n return newSize;\n };\n\n const changeTransferring = (page: number) => {\n setCurrentPage(page);\n onChangeTransferring(page);\n };\n\n return <>\n \n
\n {\n keys(allClusters).map((item) => {\n return
\n
\n \n
onViewCompleted(item)}\n >\n {intl.get('TransferData.viewResults')}\n
\n
\n {\n allClusters[item].map((i: TransferListResp, index: number) => {\n return
setCurrentFile(i.id)}\n onMouseLeave={() => setCurrentFile(-1)}\n >\n
\n \n \n
\n {handleFileName(i.file_src)}\n
\n \n {\n onCancelFile(i.file_uuid_src);\n }}\n >\n \n \n {currentFile === i.id && }\n \n \n \n
\n \n {handleFileSize(i.file_size)}\n \n \n {handleSpeed(i)}\n \n \n {i.state === 5 ? ((i.file_size_transfered / i.file_size * 100).toFixed(2) + '%') : '-'}\n \n
;\n })\n }\n
;\n })\n }\n
\n
\n {\n transferFiles.total > 20 && \n \n \n }\n ;\n};\n\nexport default Transferring;\n","import React from 'react';\nimport { Badge, Popconfirm } from 'antd';\nimport intl from 'react-intl-universal';\n\ninterface WaterWaveProps {\n height: number;\n percent: number;\n color?: string;\n exitVisible: boolean;\n clickBth(e: any): void;\n leaveCircle(): void;\n exitTransmission(): void;\n hiddenConfirmExit(): void;\n}\n\nclass TransferBtn extends React.Component {\n private root?: any;\n private node?: any;\n private timer?: any;\n public constructor(props: any) {\n super(props);\n this.state = {\n radio: 1\n };\n this.root = null;\n this.node = null;\n this.timer = null;\n }\n\n public componentDidMount() {\n this.renderChart('');\n this.resize();\n window.addEventListener(\n 'resize',\n () => {\n requestAnimationFrame(() => this.resize());\n },\n { passive: true }\n );\n }\n\n public componentDidUpdate(props: any) {\n const { percent } = this.props;\n if (props.percent !== percent) {\n this.renderChart('update');\n }\n }\n\n public componentWillUnmount() {\n this.confirmExit('leave');\n }\n\n public resize = () => {\n if (this.root) {\n const { height = 1 } = this.props;\n const { offsetWidth } = this.root.parentNode;\n this.setState({\n radio: offsetWidth < height ? offsetWidth / height : 1\n });\n }\n };\n\n public renderChart = (type: any) => {\n const { percent, color = '#1890FF' } = this.props;\n const data = percent / 100;\n let currentTimer = this.timer;\n cancelAnimationFrame(this.timer);\n\n if (!this.node || (data !== 0 && !data)) {\n return;\n }\n\n const canvas = this.node;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return;\n }\n const canvasWidth = canvas.width;\n const canvasHeight = canvas.height;\n const radius = canvasWidth / 2;\n const lineWidth = 2;\n const cR = radius - lineWidth;\n\n ctx.beginPath();\n ctx.lineWidth = lineWidth * 2;\n\n const axisLength = canvasWidth - lineWidth;\n const unit = axisLength / 8;\n const range = 0.2;\n let currRange = range;\n const xOffset = lineWidth;\n let sp = 0;\n let currData = 0;\n const waveupsp = 0.005;\n\n let arcStack: any[] = [];\n const bR = radius - lineWidth;\n const circleOffset = -(Math.PI / 2);\n let circleLock = true;\n\n for (\n let i = circleOffset;\n i < circleOffset + 2 * Math.PI;\n i += 1 / (8 * Math.PI)\n ) {\n arcStack.push([radius + bR * Math.cos(i), radius + bR * Math.sin(i)]);\n }\n\n const cStartPoint = arcStack.shift();\n ctx.strokeStyle = color;\n ctx.moveTo(cStartPoint[0], cStartPoint[1]);\n\n function drawSin() {\n if (!ctx) {\n return;\n }\n ctx.beginPath();\n ctx.save();\n\n const sinStack = [];\n for (let i = xOffset; i <= xOffset + axisLength; i += 20 / axisLength) {\n const x = sp + (xOffset + i) / unit;\n const y = Math.sin(x) * currRange;\n const dx = i;\n const dy = 2 * cR * (1 - currData) + (radius - cR) - unit * y;\n\n ctx.lineTo(dx, dy);\n sinStack.push([dx, dy]);\n }\n\n const startPoint = sinStack.shift();\n\n ctx.lineTo(xOffset + axisLength, canvasHeight);\n ctx.lineTo(xOffset, canvasHeight);\n ctx.lineTo(startPoint && startPoint[0], startPoint && startPoint[1]);\n\n const gradient = ctx.createLinearGradient(0, 0, 0, canvasHeight);\n gradient.addColorStop(0, '#ffffff');\n gradient.addColorStop(1, color);\n ctx.shadowColor = 'none';\n ctx.fillStyle = gradient;\n ctx.fill();\n ctx.restore();\n }\n\n const render = (currentTimer: any) => {\n if (!ctx) {\n return;\n }\n ctx.clearRect(0, 0, canvasWidth, canvasHeight);\n if (circleLock && type !== 'update') {\n if (arcStack.length) {\n const temp = arcStack.shift();\n ctx.lineTo(temp[0], temp[1]);\n ctx.stroke();\n } else {\n circleLock = false;\n ctx.lineTo(cStartPoint[0], cStartPoint[1]);\n ctx.stroke();\n arcStack = [];\n\n ctx.globalCompositeOperation = 'destination-over';\n ctx.beginPath();\n ctx.lineWidth = lineWidth;\n ctx.arc(radius, radius, bR, 0, 2 * Math.PI, true);\n\n ctx.beginPath();\n ctx.save();\n ctx.arc(radius, radius, radius - 3 * lineWidth, 0, 2 * Math.PI, true);\n\n ctx.restore();\n ctx.clip();\n ctx.shadowColor = 'none';\n ctx.fillStyle = color;\n }\n } else {\n if (data >= 0.85) {\n if (currRange > range / 4) {\n const t = range * 0.01;\n currRange -= t;\n }\n } else if (data <= 0.1) {\n if (currRange < range * 1.5) {\n const t = range * 0.01;\n currRange += t;\n }\n } else {\n if (currRange <= range) {\n const t = range * 0.01;\n currRange += t;\n }\n if (currRange >= range) {\n const t = range * 0.01;\n currRange -= t;\n }\n }\n if (data - currData > 0) {\n currData += waveupsp;\n }\n if (data - currData < 0) {\n currData -= waveupsp;\n }\n\n sp += 0.07;\n drawSin();\n }\n this.timer = requestAnimationFrame(render);\n };\n render(currentTimer);\n };\n\n public confirmExit = (type: string) => {\n cancelAnimationFrame(this.timer);\n window.removeEventListener('resize', this.resize);\n this.root = null;\n this.node = null;\n this.timer = null;\n if (!type) {\n this.props.exitTransmission();\n }\n };\n\n public render() {\n const { radio } = this.state;\n const {\n percent,\n height = 1,\n exitVisible,\n clickBth,\n leaveCircle,\n hiddenConfirmExit\n } = this.props;\n\n return (\n this.confirmExit('')}\n onCancel={hiddenConfirmExit}\n okText={intl.get('confirm')}\n cancelText={intl.get('cancel')}\n >\n (this.root = n)}\n onContextMenu={clickBth}\n onMouseLeave={leaveCircle}\n style={{ transform: `scale(${radio})` }}\n >\n
\n (this.node = n)}\n width={height * 2}\n height={height * 2}\n />\n
\n
\n {!percent ? intl.get('TransferData.waitingForTransfer') :\n percent.toFixed(2) + '%'}\n
\n \n \n );\n }\n}\n\nexport default TransferBtn;\n","import React, { useState, useEffect, useCallback } from 'react';\nimport intl from 'react-intl-universal';\nimport { connect } from 'react-redux';\nimport { mean } from 'lodash';\nimport ToJS from '../../../components/ToJS';\nimport ReactCSSTransitionGroup from 'react-addons-css-transition-group';\nimport { bindActionCreators } from 'redux';\nimport { Badge, Popconfirm } from 'antd';\nimport elfinderActions from '../models/actions';\nimport {\n TransferHistoryResp,\n ClusterListResp\n} from '../../../modules/const';\nimport Drag from '../../../components/Drag';\nimport { transferFilesSelector } from '../selector';\nimport { repeat, compose } from '../../../modules/util';\nimport './style.scss';\nimport TransferResult from './TransferResult';\nimport Transferring from './Transferring';\nimport TransferBtn from './TransferBtn';\n\nconst statusInTransit = [0, 2, 5];\n\ninterface TransferFilesProps {\n transferFiles: { data: TransferHistoryResp[]; total: number };\n transferHistory: { data: TransferHistoryResp[]; total: number };\n authorizedClusters: ClusterListResp[];\n actions: {\n getTransferFiles: (payload: any) => void;\n getTransferHistory: (payload: any) => void;\n closeTransfer: (payload: { type: boolean }) => void;\n cancelTransferFile: (payload: { fileUUID: string | string[] }) => void;\n };\n}\n\nclass TransferFiles extends React.Component {\n private enterFlag = 0;\n public constructor(props: any) {\n super(props);\n this.state = {\n drag: null,\n transferringVisible: false,\n exitVisible: false,\n fileResult: null,\n transferringPage: 1\n };\n }\n public endTransferTimer: any = () => { };\n\n public componentDidMount() {\n this.setState({\n drag: new Drag('ct-Transfer-btn-id')\n });\n this.endTransferTimer = repeat(() => {\n this.props.actions.getTransferFiles(this.formatTransfferingParams());\n }, 5000);\n }\n\n public componentWillUnmount() {\n this.endTransferTimer();\n this.enterFlag = 0;\n this.setState({\n exitVisible: false,\n transferringVisible: false,\n fileResult: null\n });\n }\n\n public formatTransfferingParams = () => {\n const { transferringPage } = this.state;\n return {\n states: [0, 1, 2, 5],\n start: 20 * (transferringPage - 1),\n length: 20\n };\n };\n\n public viewCompleted = (item: string) => {\n const test = this.props.authorizedClusters.filter((i) => i.name === item);\n const params = {\n states: [10, 15],\n start: 0,\n length: 20,\n cluster_uuid: test[0].uuid\n };\n this.setState({\n fileResult: test[0]\n });\n this.props.actions.getTransferHistory(params);\n };\n\n public handleTransferHistoryChange = (page: number) => {\n const { fileResult } = this.state;\n const params = {\n states: [10, 15],\n start: 20 * (page - 1),\n length: 20,\n cluster_uuid: fileResult.uuid\n };\n this.props.actions.getTransferHistory(params);\n };\n\n public closeTransferInfo = () => {\n this.enterFlag = 0;\n this.setState({\n transferringVisible: false,\n fileResult: null\n });\n };\n\n public enterLists = () => {\n this.enterFlag = 1;\n };\n\n public exitTransmission = () => {\n const { transferFiles, actions } = this.props;\n this.endTransferTimer();\n this.setState({\n exitVisible: false,\n transferringVisible: false,\n fileResult: null\n });\n this.enterFlag = 0;\n\n let ids: any[] = [];\n if (transferFiles.data && transferFiles.data.length > 0) {\n transferFiles.data.forEach((f: TransferHistoryResp) => {\n if (statusInTransit.some((s) => s === f.state)) {\n if (f.file_uuid_src) {\n ids.push(f.file_uuid_src);\n }\n }\n });\n }\n if (ids.length > 0) {\n this.props.actions.cancelTransferFile({\n fileUUID: ids\n });\n }\n actions.closeTransfer({ type: false });\n };\n\n public hiddenConfirmExit = () => {\n this.setState({ exitVisible: false });\n };\n\n public clickBth = (e: any) => {\n e.preventDefault();\n this.setState({\n exitVisible: true\n });\n };\n\n public leaveCircle = () => {\n this.enterFlag = 0;\n setTimeout(() => {\n if (!this.enterFlag) {\n this.setState({\n transferringVisible: false,\n fileResult: null\n });\n }\n }, 1000);\n };\n\n public cancelFile = (fileUUID: string) => {\n this.props.actions.cancelTransferFile({\n fileUUID\n });\n };\n\n public hanldeChangeTransferring = (page: any) => {\n this.setState({\n transferringPage: page\n });\n };\n\n public getTransferFiles = (params: any) => {\n this.props.actions.getTransferFiles(params);\n };\n\n public showTransferring = () => {\n this.enterFlag = 1;\n this.setState({\n transferringVisible: true\n }, () => {\n const transferBtnDom = document.getElementById('ct-Transfer-btn-id');\n const transferAreaDom = document.getElementById('ct-Transfer-id');\n if (transferBtnDom && transferAreaDom) {\n if (transferBtnDom.offsetLeft > 460) {\n transferAreaDom.style.left = transferBtnDom.offsetLeft - 460 + 'px';\n } else {\n transferAreaDom.style.left = transferBtnDom.offsetLeft + 60 + 'px';\n }\n if (transferBtnDom.offsetTop > 300) {\n transferAreaDom.style.top = transferBtnDom.offsetTop - 300 + 'px';\n } else {\n transferAreaDom.style.top = transferBtnDom.offsetTop + 60 + 'px';\n }\n }\n });\n };\n\n public handleSpeed = () => {\n const { transferFiles } = this.props;\n let speed: any[] = [];\n if (transferFiles.data && transferFiles.data.length > 0) {\n transferFiles.data.forEach((f: TransferHistoryResp) => {\n if (f.state === 5) {\n const s = (f.file_size_transfered / f.file_size * 100);\n speed.push(s);\n }\n });\n }\n if (speed.length > 0) {\n return mean(speed);\n }\n return 0;\n }\n\n public render() {\n const { transferFiles, transferHistory, authorizedClusters } = this.props;\n const { transferringVisible, fileResult, exitVisible } = this.state;\n const transferSpeed = this.handleSpeed();\n let allClusters: any = {};\n authorizedClusters.forEach((item) => {\n allClusters[item.name] = [];\n });\n const data = transferFiles.data || [];\n data.forEach((item: TransferHistoryResp) => {\n if (!allClusters[item.dest_cluster_name]) {\n allClusters[item.dest_cluster_name] = [item];\n } else {\n allClusters[item.dest_cluster_name].push(item);\n }\n });\n\n return \n \n {\n transferringVisible && \n
\n
\n {intl.get('TransferData.transferring')}\n
\n {\n !fileResult ? : this.setState({ fileResult: null })}\n />\n }\n
\n \n }\n \n \n ;\n }\n}\n\nfunction mapStateToProps(state: any) {\n return transferFilesSelector(state);\n}\n\nfunction mapDispatchToProps(dispatch: any) {\n return {\n actions: bindActionCreators(\n {\n getTransferFiles: elfinderActions.getTransferList,\n getTransferHistory: elfinderActions.getTransferHistory,\n closeTransfer: elfinderActions.changeTransfer,\n cancelTransferFile: elfinderActions.cancelTransferFile\n },\n dispatch\n )\n };\n}\n\nconst enhance = compose(connect(mapStateToProps, mapDispatchToProps), ToJS);\n\nexport default enhance(TransferFiles);\n","import { createSelector } from 'reselect';\nimport {\n getEnableMultiCluster,\n getSwitchClusterInfo,\n getIsMultiClusterUser,\n getTransferVisible,\n getIsExternalClusterUser,\n getEnableNewClusterWindow\n} from '../../selectors';\n\nexport default createSelector(\n [\n getEnableMultiCluster,\n getSwitchClusterInfo,\n getIsMultiClusterUser,\n getTransferVisible,\n getIsExternalClusterUser,\n getEnableNewClusterWindow\n ],\n (\n enableMultiCluster,\n switchClusterInfo,\n isMultiClusterUser,\n transferVisible,\n isExternalClusterUser,\n enableNewClusterWindow\n ) => {\n return {\n enableMultiCluster,\n switchClusterInfo,\n isMultiClusterUser,\n transferVisible,\n isExternalClusterUser,\n enableNewClusterWindow\n };\n }\n);\n","import React, { useEffect } from 'react';\nimport intl from 'react-intl-universal';\nimport { connect } from 'react-redux';\nimport { Scrollbars } from 'react-custom-scrollbars';\nimport { view as Apps } from '../Apps';\nimport { view as Header } from '../Header';\nimport { Toolbar, AppArea } from '../Toolbar';\nimport TransferFiles from '../Elfinder/components/TransferFiles';\nimport { view as Windows } from '../Windows';\nimport { SwitchCluster } from '../ClusterManage';\nimport { backLogin } from '../../modules/util';\nimport selector from './selectors';\nimport './style.scss';\n\n// tslint:disable-next-line: no-var-requires\nconst scriptLoader = require('react-async-script-loader');\n\ninterface LayoutProps {\n enableMultiCluster: boolean;\n switchClusterInfo: Map;\n isMultiClusterUser: boolean;\n isExternalClusterUser: boolean;\n transferVisible: boolean;\n}\n\nconst Layout: React.FC = ({\n enableMultiCluster,\n switchClusterInfo,\n isMultiClusterUser,\n transferVisible,\n isExternalClusterUser\n}) => {\n const SwitchClusterVisible = enableMultiCluster &&\n (isMultiClusterUser || isExternalClusterUser);\n const contentVisible = !switchClusterInfo.get('token');\n\n useEffect(() => {\n const eth = (window as any).ethereum;\n if (eth) {\n let isScriptLoadSucceed = setInterval(() => {\n let web3Option = (window as any).Web3;\n if (web3Option) {\n determineAddress(new web3Option(eth));\n clearInterval(isScriptLoadSucceed);\n }\n }, 200);\n\n } else {\n setTimeout(() => {\n backLogin(intl.get('wallet.connectWalletTip'));\n }, 4000);\n }\n\n return () => {\n if (eth) {\n eth.removeListener('chainChanged', handleChainChange);\n eth.removeListener('accountsChanged', handleAccountChange);\n }\n };\n }, []);\n\n const determineAddress = async (web3: any) => {\n await web3.eth.getAccounts().then((accounts: any) => {\n if (accounts && accounts.length === 0) {\n backLogin(intl.get('wallet.noAccount'));\n return;\n }\n let web3Info: any = localStorage.getItem('web3');\n if (web3Info) {\n web3Info = JSON.parse(web3Info);\n }\n if (web3Info && accounts[0] !== web3Info.address) {\n backLogin(intl.get('wallet.changeAccount'));\n return;\n }\n determineChain((web3Info && web3Info.chain_id) || 0);\n });\n };\n\n const determineChain = async (chain: number) => {\n const chainId = await (window as any).ethereum.request({ method: 'eth_chainId' });\n if ((window as any).Web3.utils.numberToHex(chain) !== chainId) {\n backLogin(`${intl.get('wallet.changeChain')}${chain}`);\n } else {\n (window as any).ethereum.on('chainChanged', handleChainChange);\n (window as any).ethereum.on('accountsChanged', handleAccountChange);\n }\n };\n\n const handleChainChange = () => {\n checkAccount('chain');\n };\n\n const handleAccountChange = () => {\n checkAccount('account');\n };\n\n const checkAccount = async (type: string) => {\n let path = window.location.href.split('#')[1];\n if (path !== '/app/user') {\n return;\n }\n let web3Info: any = localStorage.getItem('web3');\n if (web3Info) {\n web3Info = JSON.parse(web3Info);\n }\n const msg = type === 'account' ? intl.get('wallet.changeAccount') :\n (intl.get('wallet.changeChain') + (web3Info && web3Info.chainID) || '');\n backLogin(msg);\n };\n\n return (\n
\n {\n SwitchClusterVisible &&\n \n }\n {\n contentVisible && <>\n
\n
\n \n \n
\n \n
\n
\n
\n \n \n {transferVisible && }\n \n }\n
\n );\n};\n\nfunction mapStateToProps(state: any) {\n return selector(state);\n}\n\nexport default scriptLoader.default(\n `${process.env.PUBLIC_URL}/thirdparty/Web3/web3@4.0.2.min.js`\n)(connect(mapStateToProps, null)(Layout));\n"],"sourceRoot":""}