AW-6756 Settingsknop Explorer dezelfde kleur als het logo van de explorer.
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:
parent
2ca9730735
commit
a46e8040b2
@ -85,6 +85,9 @@ export const SETUNREADNOTIFICATIONS = '[AppCommon] SetUnreadNotifications';
|
||||
|
||||
export const SWITCHLANGUAGE = '[AppCommon] SwitchLanguage';
|
||||
|
||||
export const SETSETTINGMENUBACKGROUNDCOLOR = '[AppCommon] SetSettingMenuBackgroundColor';
|
||||
|
||||
|
||||
export class InitUser implements Action {
|
||||
readonly type = INITUSER;
|
||||
|
||||
@ -379,6 +382,11 @@ export class SwitchLanguage implements Action {
|
||||
constructor(public locale:string) { }
|
||||
}
|
||||
|
||||
export class SetSettingMenuBackgroundColor implements Action {
|
||||
readonly type = SETSETTINGMENUBACKGROUNDCOLOR;
|
||||
|
||||
constructor(public color:string) { }
|
||||
}
|
||||
|
||||
export type Actions = OpenModal
|
||||
| InitRoot
|
||||
@ -427,6 +435,7 @@ export type Actions = OpenModal
|
||||
| ToggleSettingMenu
|
||||
| NotificationEvent
|
||||
| SetUnreadNotifications
|
||||
| SwitchLanguage;
|
||||
| SwitchLanguage
|
||||
| SetSettingMenuBackgroundColor;
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
<fm-resumable-file-upload></fm-resumable-file-upload>
|
||||
</ng-container>
|
||||
<div class="user-menu apponly">
|
||||
<fm-setting-menu [user]="user|async" [showMenu]="settingMenuVisible|async"></fm-setting-menu>
|
||||
<fm-setting-menu [user]="user|async" [showMenu]="settingMenuVisible|async" [backgroundColor]="settingMenuBackgroundColor|async"></fm-setting-menu>
|
||||
<fm-help-menu [user]="user|async" [showMenu]="helpMenuVisible|async"></fm-help-menu>
|
||||
<fm-notification-menu [user]="user|async" [unread]="unreadNotifications|async" [showMenu]="notificationMenuVisible|async"></fm-notification-menu>
|
||||
<fm-app-menu [user]="user|async" [showMenu]="appMenuVisible|async"></fm-app-menu>
|
||||
|
@ -50,6 +50,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
public unreadNotifications: Observable<number> = this.store$.select(appReducers.SelectgetUnreadNotifications);
|
||||
public user: Observable<IUser> = this.store$.select(appReducers.SelectGetUser);
|
||||
public isPageMode: Observable<boolean> = this.store$.select(appReducers.SelectGetIsPageMode);
|
||||
public settingMenuBackgroundColor: Observable<string> = this.store$.select(appReducers.SelectGetSettingMenuBackgroundColor);
|
||||
@Input() showUploadProgress = true;
|
||||
|
||||
constructor(
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [ngClass]="{'hidden':!user || noContent}">
|
||||
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [style.background-color]="backgroundColor" [ngClass]="{'hidden':!user || noContent}">
|
||||
<span i18n-title title="Settings"><i class="fas fa-gear" aria-hidden="true"></i></span>
|
||||
<div class="menu hidden" [ngClass]="{'hidden':!showMenu}">
|
||||
<router-outlet name="setting-menu" (activate)="activateRoute()" (deactivate)="deActivateRoute()"></router-outlet>
|
||||
|
@ -15,6 +15,7 @@ export class SettingMenuComponent implements OnInit {
|
||||
|
||||
@Input() user:IUser;
|
||||
@Input() showMenu:boolean;
|
||||
@Input() backgroundColor:string;
|
||||
public noContent = true;
|
||||
|
||||
constructor(private store: Store<appReducers.State>) { }
|
||||
|
@ -29,7 +29,8 @@ export interface State {
|
||||
settingMenuVisible: boolean,
|
||||
unreadNotifications: number,
|
||||
isOnline: boolean,
|
||||
isPageMode:boolean
|
||||
isPageMode:boolean,
|
||||
settingMenuBackgroundColor:string
|
||||
}
|
||||
|
||||
export const initialState: State = {
|
||||
@ -51,7 +52,8 @@ export const initialState: State = {
|
||||
settingMenuVisible: false,
|
||||
unreadNotifications: 0,
|
||||
isOnline: true,
|
||||
isPageMode: true
|
||||
isPageMode: true,
|
||||
settingMenuBackgroundColor:'rgb(128, 128, 128)'
|
||||
}
|
||||
|
||||
export function reducer(state = initialState, action: appCommonActions.Actions ): State {
|
||||
@ -187,6 +189,10 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
const a = action as appCommonActions.SetUnreadNotifications;
|
||||
return tassign(state,{unreadNotifications:a.unread});
|
||||
}
|
||||
case appCommonActions.SETSETTINGMENUBACKGROUNDCOLOR: {
|
||||
const a = action as appCommonActions.SetSettingMenuBackgroundColor;
|
||||
return tassign(state,{settingMenuBackgroundColor:a.color});
|
||||
}
|
||||
default: {
|
||||
return state;
|
||||
}
|
||||
@ -212,6 +218,7 @@ export const getSettingMenuVisible = (state: State) => state.settingMenuVisible;
|
||||
export const getUnreadNotifications = (state: State) => state.unreadNotifications;
|
||||
export const getIsOnline = (state: State) => state.isOnline;
|
||||
export const getIsPageMode = (state: State) => state.isPageMode;
|
||||
export const getSettingMenuBackgroundColor = (state: State) => state.settingMenuBackgroundColor;
|
||||
|
||||
export const selectAppCommonState = createFeatureSelector<State>(MODULE_NAME);
|
||||
|
||||
@ -238,5 +245,4 @@ export const SelectgetUnreadNotifications = createSelector(selectAppCommonState,
|
||||
|
||||
export const SelectGetIsOnline = createSelector(selectAppCommonState,getIsOnline);
|
||||
export const SelectGetIsPageMode = createSelector(selectAppCommonState,getIsPageMode);
|
||||
|
||||
|
||||
export const SelectGetSettingMenuBackgroundColor= createSelector(selectAppCommonState,getSettingMenuBackgroundColor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user