Added remove remote mount
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {createReducer} from 'redux-starter-kit';
|
||||
import {
|
||||
DISPLAY_CONFIRM_YES_NO,
|
||||
notifyRebootRequired,
|
||||
setAllowMount,
|
||||
setApplicationReady,
|
||||
@@ -12,11 +13,20 @@ export const createCommonReducer = (platformInfo, version) => {
|
||||
AllowMount: false,
|
||||
AppPlatform: platformInfo.AppPlatform,
|
||||
AppReady: false,
|
||||
DisplayConfirmYesNo: false,
|
||||
ConfirmTitle: null,
|
||||
DisplaySelectAppPlatform: false,
|
||||
Platform: platformInfo.Platform,
|
||||
RebootRequired: false,
|
||||
Version: version,
|
||||
}, {
|
||||
[DISPLAY_CONFIRM_YES_NO]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
DisplayConfirmYesNo: action.payload.show,
|
||||
ConfirmTitle: action.payload.show ? action.payload.title : null,
|
||||
}
|
||||
},
|
||||
[SET_DISPLAY_SELECT_APPPLATFORM]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as Constants from '../../constants';
|
||||
import {createReducer} from 'redux-starter-kit';
|
||||
import {
|
||||
DISPLAY_CONFIGURATION,
|
||||
removeRemoteMount3,
|
||||
RESET_MOUNTS_STATE,
|
||||
SET_ALLOW_MOUNT,
|
||||
setAutoMountProcessed,
|
||||
@@ -62,6 +63,16 @@ export const createMountReducer = state => {
|
||||
DisplayRemoteConfiguration: action.payload.remote,
|
||||
};
|
||||
},
|
||||
[removeRemoteMount3]: (state, action) => {
|
||||
let providerState = {...state.ProviderState};
|
||||
delete providerState[action.payload];
|
||||
const remoteMounts = state.RemoteMounts.filter(i => i !== action.payload);
|
||||
return {
|
||||
...state,
|
||||
ProviderState: providerState,
|
||||
RemoteMounts: remoteMounts,
|
||||
};
|
||||
},
|
||||
[RESET_MOUNTS_STATE]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user