diff --git a/browser/app/js/browser/StorageInfo.js b/browser/app/js/browser/StorageInfo.js
index fff0f222e..162298b21 100644
--- a/browser/app/js/browser/StorageInfo.js
+++ b/browser/app/js/browser/StorageInfo.js
@@ -26,6 +26,7 @@ export class StorageInfo extends React.Component {
}
render() {
const { used } = this.props.storageInfo
+ var totalUsed = used.reduce((v1, v2) => v1 + v2, 0)
return (
@@ -34,7 +35,7 @@ export class StorageInfo extends React.Component {
-
Used:
- {humanize.filesize(used)}
+ {humanize.filesize(totalUsed)}
@@ -54,4 +55,7 @@ const mapDispatchToProps = dispatch => {
}
}
-export default connect(mapStateToProps, mapDispatchToProps)(StorageInfo)
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(StorageInfo)
diff --git a/browser/app/js/browser/__tests__/StorageInfo.test.js b/browser/app/js/browser/__tests__/StorageInfo.test.js
index 53be7b6c0..619d0d45b 100644
--- a/browser/app/js/browser/__tests__/StorageInfo.test.js
+++ b/browser/app/js/browser/__tests__/StorageInfo.test.js
@@ -21,10 +21,7 @@ import { StorageInfo } from "../StorageInfo"
describe("StorageInfo", () => {
it("should render without crashing", () => {
shallow(
-
+
)
})
@@ -32,7 +29,7 @@ describe("StorageInfo", () => {
const fetchStorageInfo = jest.fn()
shallow(
)
diff --git a/browser/app/js/browser/__tests__/actions.test.js b/browser/app/js/browser/__tests__/actions.test.js
index f871a4ce5..fc247a2da 100644
--- a/browser/app/js/browser/__tests__/actions.test.js
+++ b/browser/app/js/browser/__tests__/actions.test.js
@@ -20,7 +20,7 @@ import * as actionsCommon from "../actions"
jest.mock("../../web", () => ({
StorageInfo: jest.fn(() => {
- return Promise.resolve({ storageInfo: { Used: 60 } })
+ return Promise.resolve({ storageInfo: { Used: [60] } })
}),
ServerInfo: jest.fn(() => {
return Promise.resolve({
@@ -40,7 +40,7 @@ describe("Common actions", () => {
it("creates common/SET_STORAGE_INFO after fetching the storage details ", () => {
const store = mockStore()
const expectedActions = [
- { type: "common/SET_STORAGE_INFO", storageInfo: { used: 60 } }
+ { type: "common/SET_STORAGE_INFO", storageInfo: { used: [60] } }
]
return store.dispatch(actionsCommon.fetchStorageInfo()).then(() => {
const actions = store.getActions()
diff --git a/browser/app/js/browser/__tests__/reducer.test.js b/browser/app/js/browser/__tests__/reducer.test.js
index 2df34edb7..490499d32 100644
--- a/browser/app/js/browser/__tests__/reducer.test.js
+++ b/browser/app/js/browser/__tests__/reducer.test.js
@@ -22,8 +22,9 @@ describe("common reducer", () => {
expect(reducer(undefined, {})).toEqual({
sidebarOpen: false,
storageInfo: {
- total: 0,
- free: 0
+ total: [0],
+ free: [0],
+ used: [0]
},
serverInfo: {}
})
@@ -61,11 +62,11 @@ describe("common reducer", () => {
{},
{
type: actionsCommon.SET_STORAGE_INFO,
- storageInfo: { total: 100, free: 40 }
+ storageInfo: { total: [100], free: [40] }
}
)
).toEqual({
- storageInfo: { total: 100, free: 40 }
+ storageInfo: { total: [100], free: [40] }
})
})
diff --git a/browser/app/js/browser/reducer.js b/browser/app/js/browser/reducer.js
index 59d87f426..345b46b1d 100644
--- a/browser/app/js/browser/reducer.js
+++ b/browser/app/js/browser/reducer.js
@@ -19,7 +19,7 @@ import * as actionsCommon from "./actions"
export default (
state = {
sidebarOpen: false,
- storageInfo: { total: 0, free: 0 },
+ storageInfo: { total: [0], free: [0], used: [0] },
serverInfo: {}
},
action
diff --git a/browser/ui-assets.go b/browser/ui-assets.go
index b095fb194..354158b59 100644
--- a/browser/ui-assets.go
+++ b/browser/ui-assets.go
@@ -6,7 +6,7 @@
// production/favicon-96x96.png
// production/firefox.png
// production/index.html
-// production/index_bundle-2019-10-09T23-01-31Z.js
+// production/index_bundle-2019-10-10T06-01-52Z.js
// production/loader.css
// production/logo.svg
// production/safari.png
@@ -66,7 +66,7 @@ func productionChromePng() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/chrome.png", size: 3726, mode: os.FileMode(420), modTime: time.Unix(1570662115, 0)}
+ info := bindataFileInfo{name: "production/chrome.png", size: 3726, mode: os.FileMode(420), modTime: time.Unix(1570687319, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -83,7 +83,7 @@ func productionFavicon16x16Png() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/favicon-16x16.png", size: 14906, mode: os.FileMode(420), modTime: time.Unix(1570662115, 0)}
+ info := bindataFileInfo{name: "production/favicon-16x16.png", size: 14906, mode: os.FileMode(420), modTime: time.Unix(1570687319, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -100,7 +100,7 @@ func productionFavicon32x32Png() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/favicon-32x32.png", size: 16066, mode: os.FileMode(420), modTime: time.Unix(1570662115, 0)}
+ info := bindataFileInfo{name: "production/favicon-32x32.png", size: 16066, mode: os.FileMode(420), modTime: time.Unix(1570687319, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -117,7 +117,7 @@ func productionFavicon96x96Png() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/favicon-96x96.png", size: 17029, mode: os.FileMode(420), modTime: time.Unix(1570662115, 0)}
+ info := bindataFileInfo{name: "production/favicon-96x96.png", size: 17029, mode: os.FileMode(420), modTime: time.Unix(1570687319, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -134,7 +134,7 @@ func productionFirefoxPng() (*asset, error) {
return nil, err
}
- info := bindataFileInfo{name: "production/firefox.png", size: 4795, mode: os.FileMode(420), modTime: time.Unix(1570662115, 0)}
+ info := bindataFileInfo{name: "production/firefox.png", size: 4795, mode: os.FileMode(420), modTime: time.Unix(1570687319, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@@ -194,8 +194,8 @@ var _productionIndexHTML = []byte(`
-
-
+
+