Refactor browser dropdown links and components (#5562)

* refactor browser links and about modal

Moved about modal to separate component and added unit tests.

* refactor change password modal component

* added unit tests for ChangePasswordModal

* fix logout function in browser dropdown

* remove older unused BrowserDropdown component

* remove unused variables from BrowserDropdown component

* show BrowserDropdown and StorageInfo only for LoggedIn users

Non-loggedIn users will see a 'Login' button
This commit is contained in:
Kanagaraj M
2018-02-22 07:30:00 +05:30
committed by Harshavardhana
parent 6a42727e00
commit bb0adea494
17 changed files with 823 additions and 318 deletions
+7 -1
View File
@@ -17,7 +17,11 @@
import * as actionsCommon from "./actions"
export default (
state = { sidebarOpen: false, storageInfo: { total: 0, free: 0 } },
state = {
sidebarOpen: false,
storageInfo: { total: 0, free: 0 },
serverInfo: {}
},
action
) => {
switch (action.type) {
@@ -33,6 +37,8 @@ export default (
return Object.assign({}, state, {
storageInfo: action.storageInfo
})
case actionsCommon.SET_SERVER_INFO:
return { ...state, serverInfo: action.serverInfo }
default:
return state
}