fix open browser button
This commit is contained in:
parent
f5c40d54ff
commit
09684200e4
@ -246,7 +246,7 @@ class App extends Component {
|
|||||||
if (browserFs === null) browserFs = ["", ""]
|
if (browserFs === null) browserFs = ["", ""]
|
||||||
if (currentPath === null) currentPath = ["/", "/"]
|
if (currentPath === null) currentPath = ["/", "/"]
|
||||||
|
|
||||||
if (name) {
|
if (typeof name === "string") {
|
||||||
browserFs[0] = name
|
browserFs[0] = name
|
||||||
currentPath[0] = name
|
currentPath[0] = name
|
||||||
}
|
}
|
||||||
@ -353,7 +353,7 @@ class App extends Component {
|
|||||||
|
|
||||||
render = () => {
|
render = () => {
|
||||||
const { stats, version, endPointAvailable } = this.state
|
const { stats, version, endPointAvailable } = this.state
|
||||||
const { elapsedTime, transfers, totalTransfers, bytes, errors, lastError } = stats
|
const { elapsedTime, transfers, bytes, errors, lastError, transferring } = stats
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
@ -399,10 +399,10 @@ class App extends Component {
|
|||||||
<p> { this.renderLiveSpeed() } </p>
|
<p> { this.renderLiveSpeed() } </p>
|
||||||
|
|
||||||
<p> Active transfers </p>
|
<p> Active transfers </p>
|
||||||
<p> { (transfers ? transfers : 0) + (transfers === 1 ? " file" : " files" )} </p>
|
<p> { (transferring?.length ? transferring.length : 0) + (transferring?.length === 1 ? " file" : " files" )} </p>
|
||||||
|
|
||||||
<p> Total transfered files </p>
|
<p> Total transfered files </p>
|
||||||
<p> { (totalTransfers ? totalTransfers : 0) + (totalTransfers === 1 ? " file" : " files" )} </p>
|
<p> { (transfers ? transfers : 0) + (transfers === 1 ? " file" : " files" )} </p>
|
||||||
|
|
||||||
<p> Total transferred data </p>
|
<p> Total transferred data </p>
|
||||||
<p> { bytesToString(bytes, {}) } </p>
|
<p> { bytesToString(bytes, {}) } </p>
|
||||||
|
@ -18,13 +18,13 @@ const Button = styled(normalButton)`
|
|||||||
gap: 0 .3rem;
|
gap: 0 .3rem;
|
||||||
`
|
`
|
||||||
|
|
||||||
const Navigation = ({ info }) => {
|
const Navigation = ({ info, openBrowser }) => {
|
||||||
const { errors, lastError } = info
|
const { errors, lastError } = info
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavigationContainer>
|
<NavigationContainer>
|
||||||
<Error errorCount={errors} lastError={lastError} />
|
<Error errorCount={errors} lastError={lastError} />
|
||||||
<Button>
|
<Button onClick={openBrowser}>
|
||||||
<img src={BrowserSingle} alt="file browser" width="18" height="18" />
|
<img src={BrowserSingle} alt="file browser" width="18" height="18" />
|
||||||
File Browser
|
File Browser
|
||||||
</Button>
|
</Button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user