diff --git a/projects/common/src/fm/components/app/app.component.scss b/projects/common/src/fm/components/app/app.component.scss
index 7c26e1b..b3c08b2 100644
--- a/projects/common/src/fm/components/app/app.component.scss
+++ b/projects/common/src/fm/components/app/app.component.scss
@@ -124,3 +124,8 @@ body { background: #f1f1f1; line-height: 18px; user-select:none;font-family: Lat
.online {
max-height:0em;
}
+
+fm-app-menu,fm-user-menu {
+ display: inline-block;
+ margin-left: 1rem;
+}
diff --git a/projects/common/src/fm/components/app/app.component.ts b/projects/common/src/fm/components/app/app.component.ts
index 66cfa97..f11fbff 100644
--- a/projects/common/src/fm/components/app/app.component.ts
+++ b/projects/common/src/fm/components/app/app.component.ts
@@ -42,6 +42,7 @@ export class AppComponent implements OnInit, OnDestroy {
public routeLoading: Observable = this.store$.select(appReducers.selectGetRouteLoading);
public menuVisible: Observable = this.store$.select(appReducers.SelectGetMenuVisible);
public accountMenuVisible: Observable = this.store$.select(appReducers.SelectGetAccountMenuVisible);
+ public appMenuVisible: Observable = this.store$.select(appReducers.SelectGetAppMenuVisible);
public user: Observable = this.store$.select(appReducers.SelectGetUser);
public isPageMode: Observable = this.store$.select(appReducers.SelectGetIsPageMode);
@Input() showUploadProgress: boolean = true;
diff --git a/projects/common/src/fm/components/user-menu/user-menu.component.scss b/projects/common/src/fm/components/user-menu/user-menu.component.scss
index 08f8d40..69e3945 100644
--- a/projects/common/src/fm/components/user-menu/user-menu.component.scss
+++ b/projects/common/src/fm/components/user-menu/user-menu.component.scss
@@ -7,7 +7,6 @@
text-align: center;
font-size: 1rem;
position: relative;
- display: inline-block;
}
div.menu-button > span {
diff --git a/projects/common/src/fm/reducers/app-common.reducer.ts b/projects/common/src/fm/reducers/app-common.reducer.ts
index 795c797..b2f561b 100644
--- a/projects/common/src/fm/reducers/app-common.reducer.ts
+++ b/projects/common/src/fm/reducers/app-common.reducer.ts
@@ -21,6 +21,7 @@ export interface State {
userPackages: IPackages,
userSettingsRoot: IItem,
accountMenuVisible: boolean,
+ appMenuVisible: boolean,
isOnline: boolean,
isPageMode:boolean
}
@@ -37,6 +38,7 @@ export const initialState: State = {
userPackages: {},
userSettingsRoot: null,
accountMenuVisible: false,
+ appMenuVisible: false,
isOnline: true,
isPageMode: true
}
@@ -95,17 +97,20 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
});
}
case appCommonActions.TOGGLEMENU: {
- return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible });
+ return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible,appMenuVisible:!state.menuVisible?false:state.appMenuVisible });
}
case appCommonActions.TOGGLEACCOUNTMENU: {
- return tassign(state, { accountMenuVisible: !state.accountMenuVisible });
+ return tassign(state, { accountMenuVisible: !state.accountMenuVisible,appMenuVisible:false });
+ }
+ case appCommonActions.TOGGLEAPPMENU: {
+ return tassign(state, { appMenuVisible: !state.appMenuVisible,accountMenuVisible:false });
}
case appCommonActions.ESCAPE: {
- return tassign(state, { menuVisible: false,accountMenuVisible:false });
+ return tassign(state, { menuVisible: false,accountMenuVisible:false,appMenuVisible: false });
}
case appCommonActions.SETMENUVISIBLE: {
let a = action as appCommonActions.SetMenuVisible;
- return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible });
+ return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible,appMenuVisible:a.visible?false:state.appMenuVisible });
}
case appCommonActions.INITUSERPACKAGESSUCCESS:{
let a = action as appCommonActions.InitUserPackagesSuccess;
@@ -124,7 +129,7 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
return tassign(state,{user:null,initialized:false});
}
case appCommonActions.CLOSEALL: {
- return tassign(state,{accountMenuVisible:false,menuVisible:false });
+ return tassign(state,{accountMenuVisible:false,appMenuVisible:false, menuVisible:false });
}
case appCommonActions.ONLINE:{
return tassign(state,{isOnline:true});
@@ -153,6 +158,7 @@ export const getUser = (state: State) => state.user;
export const getUserPackages = (state: State) => state.userPackages;
export const getUserSettingsRoot = (state: State) => state.userSettingsRoot;
export const getAccountMenuVisible = (state: State) => state.accountMenuVisible;
+export const getAppMenuVisible = (state: State) => state.appMenuVisible;
export const getIsOnline = (state: State) => state.isOnline;
export const getIsPageMode = (state: State) => state.isPageMode;
@@ -169,6 +175,7 @@ export const SelectGetUser = createSelector(selectAppCommonState,getUser);
export const SelectGetUserPackages = createSelector(selectAppCommonState,getUserPackages);
export const SelectGetUserSettingsRoot = createSelector(selectAppCommonState,getUserSettingsRoot);
export const SelectGetAccountMenuVisible = createSelector(selectAppCommonState,getAccountMenuVisible);
+export const SelectGetAppMenuVisible = createSelector(selectAppCommonState,getAppMenuVisible);
export const SelectGetIsOnline = createSelector(selectAppCommonState,getIsOnline);
export const SelectGetIsPageMode = createSelector(selectAppCommonState,getIsPageMode);