Add remote mount

This commit is contained in:
2019-10-06 21:39:14 -05:00
parent 3359ff5357
commit d52a2f7291
8 changed files with 188 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
import * as Constants from '../../constants';
import {createReducer} from 'redux-starter-kit';
import {
addRemoteMount2,
DISPLAY_CONFIGURATION,
removeRemoteMount3,
RESET_MOUNTS_STATE,
@@ -56,6 +57,27 @@ export const createMountReducer = state => {
ProviderState: providerState,
RemoteMounts: state.RemoteMounts ? state.RemoteMounts : ['Remotelocalhost:20000'],
}, {
[addRemoteMount2]: (state, action) => {
let mountState = {...state.MountState};
mountState[action.payload] = {
AllowMount: false,
DriveLetters: [],
Mounted: false,
};
let providerState = {...state.ProviderState};
providerState[action.payload] = {
AutoMount: false,
AutoRestart: false,
MountLocation: '',
};
return {
...state,
MountState: mountState,
ProviderState: providerState,
RemoteMounts: [...state.RemoteMounts, action.payload],
}
},
[DISPLAY_CONFIGURATION]: (state, action) => {
return {
...state,