Prettier support

This commit is contained in:
2021-03-10 21:14:32 -06:00
parent c51b527707
commit 0924490a6f
99 changed files with 5504 additions and 3979 deletions

View File

@@ -1,71 +1,66 @@
import {createReducer} from '@reduxjs/toolkit';
import { createReducer } from '@reduxjs/toolkit';
import {
DISPLAY_CONFIRM_YES_NO,
NOTIFY_APPLICATION_BUSY,
notifyRebootRequired,
SET_DISPLAY_SELECT_APPPLATFORM,
setAllowMount,
setApplicationReady,
setLinuxAppPlatform,
SET_DISPLAY_SELECT_APPPLATFORM
} from '../actions/common_actions';
export const createCommonReducer = (platformInfo, version) => {
return createReducer({
AllowMount: false,
AppBusy: false,
AppBusyTransparent: 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,
}
return createReducer(
{
AllowMount: false,
AppBusy: false,
AppBusyTransparent: false,
AppPlatform: platformInfo.AppPlatform,
AppReady: false,
DisplayConfirmYesNo: false,
ConfirmTitle: null,
DisplaySelectAppPlatform: false,
Platform: platformInfo.Platform,
RebootRequired: false,
Version: version,
},
[SET_DISPLAY_SELECT_APPPLATFORM]: (state, action) => {
return {
...state,
DisplaySelectAppPlatform: action.payload,
}
},
[setAllowMount]: (state, action) => {
return {
...state,
AllowMount: action.payload,
}
},
[setApplicationReady]: (state, action) => {
return {
...state,
AppReady: action.payload,
};
},
[setLinuxAppPlatform]: (state, action) => {
return {
...state,
AppPlatform: action.payload,
}
},
[NOTIFY_APPLICATION_BUSY]: (state, action) => {
return {
...state,
AppBusy: action.payload.busy,
AppBusyTransparent: action.payload.busy && action.payload.transparent,
};
},
[notifyRebootRequired]: (state, action) => {
return {
...state,
RebootRequired: action.payload,
};
},
});
{
[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, DisplaySelectAppPlatform: action.payload };
},
[setAllowMount]: (state, action) => {
return { ...state, AllowMount: action.payload };
},
[setApplicationReady]: (state, action) => {
return {
...state,
AppReady: action.payload,
};
},
[setLinuxAppPlatform]: (state, action) => {
return { ...state, AppPlatform: action.payload };
},
[NOTIFY_APPLICATION_BUSY]: (state, action) => {
return {
...state,
AppBusy: action.payload.busy,
AppBusyTransparent: action.payload.busy && action.payload.transparent,
};
},
[notifyRebootRequired]: (state, action) => {
return {
...state,
RebootRequired: action.payload,
};
},
}
);
};