Refactoring for landingpage support
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -21,7 +21,8 @@ export interface State {
|
||||
userPackages: IPackages,
|
||||
userSettingsRoot: IItem,
|
||||
accountMenuVisible: boolean,
|
||||
isOnline: boolean
|
||||
isOnline: boolean,
|
||||
isPageMode:boolean
|
||||
}
|
||||
|
||||
export const initialState: State = {
|
||||
@@ -36,7 +37,8 @@ export const initialState: State = {
|
||||
userPackages: {},
|
||||
userSettingsRoot: null,
|
||||
accountMenuVisible: false,
|
||||
isOnline: true
|
||||
isOnline: true,
|
||||
isPageMode: true
|
||||
}
|
||||
|
||||
export function reducer(state = initialState, action: appCommonActions.Actions ): State {
|
||||
@@ -130,6 +132,10 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
case appCommonActions.OFFLINE:{
|
||||
return tassign(state,{isOnline:false});
|
||||
}
|
||||
case appCommonActions.SETPAGEMODE: {
|
||||
let a = action as appCommonActions.SetPageMode;
|
||||
return tassign(state,{isPageMode:a.pageMode});
|
||||
}
|
||||
default: {
|
||||
return state;
|
||||
}
|
||||
@@ -148,6 +154,7 @@ export const getUserPackages = (state: State) => state.userPackages;
|
||||
export const getUserSettingsRoot = (state: State) => state.userSettingsRoot;
|
||||
export const getAccountMenuVisible = (state: State) => state.accountMenuVisible;
|
||||
export const getIsOnline = (state: State) => state.isOnline;
|
||||
export const getIsPageMode = (state: State) => state.isPageMode;
|
||||
|
||||
export const selectAppCommonState = createFeatureSelector<State>(MODULE_NAME);
|
||||
|
||||
@@ -163,4 +170,5 @@ export const SelectGetUserPackages = createSelector(selectAppCommonState,getUser
|
||||
export const SelectGetUserSettingsRoot = createSelector(selectAppCommonState,getUserSettingsRoot);
|
||||
export const SelectGetAccountMenuVisible = createSelector(selectAppCommonState,getAccountMenuVisible);
|
||||
export const SelectGetIsOnline = createSelector(selectAppCommonState,getIsOnline);
|
||||
export const SelectGetIsPageMode = createSelector(selectAppCommonState,getIsPageMode);
|
||||
|
||||
|
Reference in New Issue
Block a user