Compare commits
No commits in common. "010ed6e0109e67f311d20f54e9bde1b8473d13f8" and "f76ef44deeaef213abe63c506a3e8fb74893aa50" have entirely different histories.
010ed6e010
...
f76ef44dee
10
package-lock.json
generated
10
package-lock.json
generated
@ -90,7 +90,7 @@
|
||||
},
|
||||
"dist/common": {
|
||||
"name": "@farmmaps/common",
|
||||
"version": "2.1.0",
|
||||
"version": "4.11.0-prerelease.2514",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@ -115,7 +115,7 @@
|
||||
},
|
||||
"dist/common-map": {
|
||||
"name": "@farmmaps/common-map",
|
||||
"version": "2.0.0",
|
||||
"version": "4.11.0-prerelease.2514",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
@ -124,13 +124,13 @@
|
||||
"@ngrx/effects": "^18.0.2",
|
||||
"@ngrx/router-store": "^18.0.2",
|
||||
"@ngrx/store": "^18.0.2",
|
||||
"ngrx-store-localstorage": "^18",
|
||||
"ngrx-store-localstorage": "^18.0.0",
|
||||
"tassign": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"dist/common-map3d": {
|
||||
"name": "@farmmaps/common-map3d",
|
||||
"version": "2.0.0",
|
||||
"version": "4.11.0-prerelease.2514",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
@ -143,7 +143,7 @@
|
||||
},
|
||||
"dist/ng-openlayers": {
|
||||
"name": "@farmmaps/ng-openlayers",
|
||||
"version": "18.0.0",
|
||||
"version": "4.11.0-prerelease.2514",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
|
@ -71,7 +71,7 @@ export const TOGGLENOTIFICATIONMENU = '[AppCommon] ToggleNotificationMenu';
|
||||
|
||||
export const TOGGLEHELPMENU = '[AppCommon] ToggleHelpMenu';
|
||||
|
||||
export const TOGGLESETTINGMENU = '[AppCommon] ToggleSettingMenu';
|
||||
export const TOGGLESETTINGSMENU = '[AppCommon] ToggleSettingsMenu';
|
||||
|
||||
export const SETMENUVISIBLE = '[AppCommon] SetMenuVisible';
|
||||
|
||||
@ -334,8 +334,8 @@ export class ToggleHelpMenu implements Action {
|
||||
constructor() { }
|
||||
}
|
||||
|
||||
export class ToggleSettingMenu implements Action {
|
||||
readonly type = TOGGLESETTINGMENU;
|
||||
export class ToggleSettingsMenu implements Action {
|
||||
readonly type = TOGGLESETTINGSMENU;
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
@ -416,7 +416,7 @@ export type Actions = OpenModal
|
||||
| ToggleAppMenu
|
||||
| ToggleNotificationMenu
|
||||
| ToggleHelpMenu
|
||||
| ToggleSettingMenu
|
||||
| ToggleSettingsMenu
|
||||
| NotificationEvent
|
||||
| SetUnreadNotifications;
|
||||
|
||||
|
@ -34,7 +34,7 @@ import { HasClaimDirective } from './components/has-claim/has-claim.directive';
|
||||
import { HasPackageDirective } from './components/has-package/has-package.directive';
|
||||
import { HasRoleDirective } from './components/has-role/has-role.directive';
|
||||
import { HelpMenuComponent } from './components/help-menu/help-menu.component';
|
||||
import { SettingMenuComponent } from './components/setting-menu/setting-menu.component';
|
||||
import { SettingsMenuComponent } from './components/settings-menu/settings-menu.component';
|
||||
import { ItemLinkComponent } from './components/item-link/item-link.component';
|
||||
import { MenuBackgroundComponent } from './components/menu-background/menu-background.component';
|
||||
import { NotFoundComponent } from './components/not-found/not-found.component';
|
||||
@ -105,7 +105,7 @@ export {
|
||||
AppMenuComponent,
|
||||
NotificationMenuComponent,
|
||||
HelpMenuComponent,
|
||||
SettingMenuComponent,
|
||||
SettingsMenuComponent,
|
||||
BackButtonComponent,
|
||||
ThumbnailComponent,
|
||||
EditImageModalComponent,
|
||||
|
@ -33,8 +33,8 @@
|
||||
<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-help-menu [user]="user|async" [showMenu]="helpMenuVisible|async"></fm-help-menu>
|
||||
<fm-settings-menu [user]="user|async" [showMenu]="settingsMenuVisible|async"></fm-settings-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>
|
||||
<fm-user-menu [user]="user|async" [showMenu]="accountMenuVisible|async"></fm-user-menu>
|
||||
|
@ -119,7 +119,7 @@ body { background: #f1f1f1; line-height: 18px; user-select:none;font-family: Lat
|
||||
max-height:0em;
|
||||
}
|
||||
|
||||
fm-help-menu,fm-app-menu,fm-user-menu,fm-notification-menu,fm-setting-menu {
|
||||
fm-help-menu,fm-app-menu,fm-user-menu,fm-notification-menu,fm-settings-menu {
|
||||
display: inline-block;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
public accountMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAccountMenuVisible);
|
||||
public appMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAppMenuVisible);
|
||||
public notificationMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetNotificationMenuVisible);
|
||||
public settingMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetSettingMenuVisible);
|
||||
public settingsMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetSettingsMenuVisible);
|
||||
public helpMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetHelpMenuVisible);
|
||||
public unreadNotifications: Observable<number> = this.store$.select(appReducers.SelectgetUnreadNotifications);
|
||||
public user: Observable<IUser> = this.store$.select(appReducers.SelectGetUser);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div>
|
||||
<div class="mobile-hide">
|
||||
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [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>
|
||||
<router-outlet name="settings-menu" (activate)="activateRoute()" (deactivate)="deActivateRoute()"></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -7,11 +7,11 @@ import * as appReducers from '../../reducers/app-common.reducer';
|
||||
import * as appActions from '../../actions/app-common.actions';
|
||||
|
||||
@Component({
|
||||
selector: 'fm-setting-menu',
|
||||
templateUrl: './setting-menu.component.html',
|
||||
styleUrls: ['./setting-menu.component.scss']
|
||||
selector: 'fm-settings-menu',
|
||||
templateUrl: './settings-menu.component.html',
|
||||
styleUrls: ['./settings-menu.component.scss']
|
||||
})
|
||||
export class SettingMenuComponent implements OnInit {
|
||||
export class SettingsMenuComponent implements OnInit {
|
||||
|
||||
@Input() user:IUser;
|
||||
@Input() showMenu:boolean;
|
||||
@ -24,7 +24,7 @@ export class SettingMenuComponent implements OnInit {
|
||||
|
||||
toggle(event:MouseEvent) {
|
||||
event.stopPropagation();
|
||||
this.store.dispatch(new appActions.ToggleSettingMenu());
|
||||
this.store.dispatch(new appActions.ToggleSettingsMenu());
|
||||
}
|
||||
|
||||
activateRoute() {
|
@ -26,7 +26,7 @@ export interface State {
|
||||
appMenuVisible: boolean,
|
||||
notificationMenuVisible: boolean,
|
||||
helpMenuVisible: boolean,
|
||||
settingMenuVisible: boolean,
|
||||
settingsMenuVisible: boolean,
|
||||
unreadNotifications: number,
|
||||
isOnline: boolean,
|
||||
isPageMode:boolean
|
||||
@ -48,7 +48,7 @@ export const initialState: State = {
|
||||
appMenuVisible: false,
|
||||
notificationMenuVisible: false,
|
||||
helpMenuVisible: false,
|
||||
settingMenuVisible: false,
|
||||
settingsMenuVisible: false,
|
||||
unreadNotifications: 0,
|
||||
isOnline: true,
|
||||
isPageMode: true
|
||||
@ -108,29 +108,29 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
});
|
||||
}
|
||||
case appCommonActions.TOGGLEMENU: {
|
||||
return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible,appMenuVisible:!state.menuVisible?false:state.appMenuVisible,notificationMenuVisible:!state.menuVisible?false:state.notificationMenuVisible,helpMenuVisible:!state.menuVisible?false:state.helpMenuVisible,settingMenuVisible:!state.menuVisible?false:state.settingMenuVisible });
|
||||
return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible,appMenuVisible:!state.menuVisible?false:state.appMenuVisible,notificationMenuVisible:!state.menuVisible?false:state.notificationMenuVisible,helpMenuVisible:!state.menuVisible?false:state.helpMenuVisible,settingsMenuVisible:!state.menuVisible?false:state.settingsMenuVisible });
|
||||
}
|
||||
case appCommonActions.TOGGLEACCOUNTMENU: {
|
||||
return tassign(state, { accountMenuVisible: !state.accountMenuVisible,appMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
return tassign(state, { accountMenuVisible: !state.accountMenuVisible,appMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false,settingsMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLEAPPMENU: {
|
||||
return tassign(state, { appMenuVisible: !state.appMenuVisible,accountMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
return tassign(state, { appMenuVisible: !state.appMenuVisible,accountMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false,settingsMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLENOTIFICATIONMENU: {
|
||||
return tassign(state, { notificationMenuVisible : !state.notificationMenuVisible,accountMenuVisible:false,appMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
return tassign(state, { notificationMenuVisible : !state.notificationMenuVisible,accountMenuVisible:false,appMenuVisible:false,helpMenuVisible:false,settingsMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLEHELPMENU: {
|
||||
return tassign(state, { helpMenuVisible : !state.helpMenuVisible,accountMenuVisible:false,appMenuVisible:false,notificationMenuVisible:false,settingMenuVisible:false });
|
||||
return tassign(state, { helpMenuVisible : !state.helpMenuVisible,accountMenuVisible:false,appMenuVisible:false,notificationMenuVisible:false,settingsMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLESETTINGMENU: {
|
||||
return tassign(state, { settingMenuVisible : !state.settingMenuVisible,accountMenuVisible:false,appMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false });
|
||||
case appCommonActions.TOGGLESETTINGSMENU: {
|
||||
return tassign(state, { settingsMenuVisible : !state.settingsMenuVisible,accountMenuVisible:false,appMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.ESCAPE: {
|
||||
return tassign(state, { menuVisible: false,accountMenuVisible:false,appMenuVisible: false,notificationMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
return tassign(state, { menuVisible: false,accountMenuVisible:false,appMenuVisible: false,notificationMenuVisible:false,helpMenuVisible:false,settingsMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.SETMENUVISIBLE: {
|
||||
const a = action as appCommonActions.SetMenuVisible;
|
||||
return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible,appMenuVisible:a.visible?false:state.appMenuVisible,notificationMenuVisible:a.visible?false:state.notificationMenuVisible,helpMenuVisible:a.visible?false:state.helpMenuVisible,settingMenuVisible:a.visible?false:state.settingMenuVisible });
|
||||
return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible,appMenuVisible:a.visible?false:state.appMenuVisible,notificationMenuVisible:a.visible?false:state.notificationMenuVisible,helpMenuVisible:a.visible?false:state.helpMenuVisible,settingsMenuVisible:a.visible?false:state.settingsMenuVisible });
|
||||
}
|
||||
case appCommonActions.INITUSERPACKAGESSUCCESS:{
|
||||
const a = action as appCommonActions.InitUserPackagesSuccess;
|
||||
@ -208,7 +208,7 @@ export const getAccountMenuVisible = (state: State) => state.accountMenuVisible;
|
||||
export const getAppMenuVisible = (state: State) => state.appMenuVisible;
|
||||
export const getNotificationMenuVisible = (state: State) => state.notificationMenuVisible;
|
||||
export const getHelpMenuVisible = (state: State) => state.helpMenuVisible;
|
||||
export const getSettingMenuVisible = (state: State) => state.settingMenuVisible;
|
||||
export const getSettingsMenuVisible = (state: State) => state.settingsMenuVisible;
|
||||
export const getUnreadNotifications = (state: State) => state.unreadNotifications;
|
||||
export const getIsOnline = (state: State) => state.isOnline;
|
||||
export const getIsPageMode = (state: State) => state.isPageMode;
|
||||
@ -233,7 +233,7 @@ export const SelectGetAccountMenuVisible = createSelector(selectAppCommonState,g
|
||||
export const SelectGetAppMenuVisible = createSelector(selectAppCommonState,getAppMenuVisible);
|
||||
export const SelectGetNotificationMenuVisible = createSelector(selectAppCommonState,getNotificationMenuVisible);
|
||||
export const SelectGetHelpMenuVisible = createSelector(selectAppCommonState,getHelpMenuVisible);
|
||||
export const SelectGetSettingMenuVisible = createSelector(selectAppCommonState,getSettingMenuVisible);
|
||||
export const SelectGetSettingsMenuVisible = createSelector(selectAppCommonState,getSettingsMenuVisible);
|
||||
export const SelectgetUnreadNotifications = createSelector(selectAppCommonState,getUnreadNotifications);
|
||||
|
||||
export const SelectGetIsOnline = createSelector(selectAppCommonState,getIsOnline);
|
||||
|
@ -20,7 +20,7 @@ const routes = [
|
||||
|
||||
{
|
||||
path: '',
|
||||
//canActivate: [NavBarGuard],
|
||||
canActivate: [NavBarGuard],
|
||||
component: LandingpageComponent
|
||||
},
|
||||
{
|
||||
@ -43,11 +43,6 @@ const routes = [
|
||||
component: TestComponent,
|
||||
outlet: 'help-menu'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: TestComponent,
|
||||
outlet: 'setting-menu'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: LogoComponent,
|
||||
|
Loading…
Reference in New Issue
Block a user