diff --git a/src/app/pages/home/home-page.component.html b/src/app/pages/home/home-page.component.html index def5a0d..925468b 100644 --- a/src/app/pages/home/home-page.component.html +++ b/src/app/pages/home/home-page.component.html @@ -5,8 +5,10 @@ - - + +
diff --git a/src/app/pages/home/home-page.component.ts b/src/app/pages/home/home-page.component.ts index 91ef296..daa0dce 100644 --- a/src/app/pages/home/home-page.component.ts +++ b/src/app/pages/home/home-page.component.ts @@ -24,6 +24,7 @@ import { DiscoverySession } from '../../core/discovery/discovery-session'; export class HomePageComponent implements OnInit, OnDestroy { showWelcomPage$: Observable; + blockPagesContent$ = this.store.pipe(select(AppStore.UISelector.LayoutSelector.selectBlockPagesContent)); constructor( private probeService: ProbeService, diff --git a/src/app/store/ui/layout/layout.action.ts b/src/app/store/ui/layout/layout.action.ts index 6aa8db7..e588d99 100644 --- a/src/app/store/ui/layout/layout.action.ts +++ b/src/app/store/ui/layout/layout.action.ts @@ -1,9 +1,16 @@ import { Action } from '@ngrx/store'; export enum ActionType { + ChangeBlockAppContent = '[app.ui.layout] ChangeBlockAppContent', ChangeBlockPagesContent = '[app.ui.layout] ChangeBlockPagesContent', } +export class ChangeBlockAppContent implements Action { + readonly type = ActionType.ChangeBlockAppContent; + + constructor(public payload: { blockAppContent: boolean }) { } +} + export class ChangeBlockPagesContent implements Action { readonly type = ActionType.ChangeBlockPagesContent; @@ -11,6 +18,7 @@ export class ChangeBlockPagesContent implements Action { } export type Actions = + | ChangeBlockAppContent | ChangeBlockPagesContent ; diff --git a/src/app/store/ui/layout/layout.reducer.ts b/src/app/store/ui/layout/layout.reducer.ts index c47a5ab..89b8c45 100644 --- a/src/app/store/ui/layout/layout.reducer.ts +++ b/src/app/store/ui/layout/layout.reducer.ts @@ -10,6 +10,13 @@ import { export function reducer(state: State = initialState, action: Actions): State { switch (action.type) { + case ActionType.ChangeBlockAppContent: { + return { + ...state, + blockAppContent: action.payload.blockAppContent, + }; + } + case ActionType.ChangeBlockPagesContent: { return { ...state, diff --git a/src/app/store/ui/layout/layout.state.ts b/src/app/store/ui/layout/layout.state.ts index ed5f79c..fe8c4c1 100644 --- a/src/app/store/ui/layout/layout.state.ts +++ b/src/app/store/ui/layout/layout.state.ts @@ -1,15 +1,18 @@ import { Selector, createSelector } from '@ngrx/store'; export interface State { + blockAppContent: boolean; blockPagesContent: boolean; } export const initialState: State = { + blockAppContent: false, blockPagesContent: false, }; export function getSelectors(selector: Selector) { return { + selectBlockAppContent: createSelector(selector, (state: State) => state.blockAppContent), selectBlockPagesContent: createSelector(selector, (state: State) => state.blockPagesContent), }; }