mirror of
https://github.com/pgsty/minio.git
synced 2026-10-07 02:05:58 +03:00
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:
committed by
Harshavardhana
parent
6a42727e00
commit
bb0adea494
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user