Browse Source

UI: Menu models improvements

pull/5921/head
Igor Kulikov 5 years ago
parent
commit
8765645179
  1. 1
      ui-ngx/src/app/core/services/menu.models.ts
  2. 5
      ui-ngx/src/app/core/services/menu.service.ts
  3. 2
      ui-ngx/src/app/modules/home/menu/menu-toggle.component.html

1
ui-ngx/src/app/core/services/menu.models.ts

@ -23,7 +23,6 @@ export interface MenuSection extends HasUUID{
type: MenuSectionType; type: MenuSectionType;
path: string; path: string;
icon: string; icon: string;
notExact?: boolean;
isMdiIcon?: boolean; isMdiIcon?: boolean;
height?: string; height?: string;
pages?: Array<MenuSection>; pages?: Array<MenuSection>;

5
ui-ngx/src/app/core/services/menu.service.ts

@ -235,7 +235,6 @@ export class MenuService {
name: 'home.home', name: 'home.home',
type: 'link', type: 'link',
path: '/home', path: '/home',
notExact: true,
icon: 'home' icon: 'home'
}, },
{ {
@ -344,8 +343,7 @@ export class MenuService {
name: 'api-usage.api-usage', name: 'api-usage.api-usage',
type: 'link', type: 'link',
path: '/usage', path: '/usage',
icon: 'insert_chart', icon: 'insert_chart'
notExact: true
}, },
{ {
id: guid(), id: guid(),
@ -517,7 +515,6 @@ export class MenuService {
name: 'home.home', name: 'home.home',
type: 'link', type: 'link',
path: '/home', path: '/home',
notExact: true,
icon: 'home' icon: 'home'
}, },
{ {

2
ui-ngx/src/app/modules/home/menu/menu-toggle.component.html

@ -16,7 +16,7 @@
--> -->
<a mat-button class="tb-button-toggle" <a mat-button class="tb-button-toggle"
routerLinkActive="tb-active" [routerLinkActiveOptions]="{exact: true}" routerLink="{{section.path}}"> routerLinkActive="tb-active" [routerLinkActiveOptions]="{paths: 'exact', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored'}" routerLink="{{section.path}}">
<mat-icon *ngIf="!section.isMdiIcon && section.icon != null" class="material-icons">{{section.icon}}</mat-icon> <mat-icon *ngIf="!section.isMdiIcon && section.icon != null" class="material-icons">{{section.icon}}</mat-icon>
<mat-icon *ngIf="section.isMdiIcon && section.icon != null" [svgIcon]="section.icon"></mat-icon> <mat-icon *ngIf="section.isMdiIcon && section.icon != null" [svgIcon]="section.icon"></mat-icon>
<span>{{section.name | translate}}</span> <span>{{section.name | translate}}</span>

Loading…
Cancel
Save