mirror of
https://github.com/pgsty/minio.git
synced 2026-10-06 17:55:59 +03:00
Browser: Update UI with new components and elements (#5671)
This commit is contained in:
@@ -19,26 +19,32 @@ import * as actionsCommon from "./actions"
|
||||
export default (
|
||||
state = {
|
||||
sidebarOpen: false,
|
||||
storageInfo: { total: 0, free: 0 },
|
||||
serverInfo: {}
|
||||
storageInfo: {
|
||||
total: 0,
|
||||
free: 0,
|
||||
},
|
||||
serverInfo: {},
|
||||
},
|
||||
action
|
||||
action,
|
||||
) => {
|
||||
switch (action.type) {
|
||||
case actionsCommon.TOGGLE_SIDEBAR:
|
||||
return Object.assign({}, state, {
|
||||
sidebarOpen: !state.sidebarOpen
|
||||
sidebarOpen: !state.sidebarOpen,
|
||||
})
|
||||
case actionsCommon.CLOSE_SIDEBAR:
|
||||
return Object.assign({}, state, {
|
||||
sidebarOpen: false
|
||||
sidebarOpen: false,
|
||||
})
|
||||
case actionsCommon.SET_STORAGE_INFO:
|
||||
return Object.assign({}, state, {
|
||||
storageInfo: action.storageInfo
|
||||
storageInfo: action.storageInfo,
|
||||
})
|
||||
case actionsCommon.SET_SERVER_INFO:
|
||||
return { ...state, serverInfo: action.serverInfo }
|
||||
return {
|
||||
...state,
|
||||
serverInfo: action.serverInfo,
|
||||
}
|
||||
default:
|
||||
return state
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user