Browse Source

Fixed missing icons on Account section tabs (#16427)

* Fixed missing icons on Account section tabs

* Fixed license header

* Revert license header change in web-report pom

* PR comments fixes
pull/16629/head
Maksym Tsymbarov 3 weeks ago
committed by GitHub
parent
commit
dbf4fc7abb
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      ui-ngx/src/app/modules/home/components/router-tabs.component.html
  2. 21
      ui-ngx/src/app/modules/home/components/router-tabs.component.ts
  3. 4
      ui-ngx/src/app/modules/home/pages/notification/settings/notification-settings-routing.modules.ts
  4. 2
      ui-ngx/src/app/modules/home/pages/profile/profile-routing.module.ts
  5. 2
      ui-ngx/src/app/modules/home/pages/security/security-routing.module.ts

4
ui-ngx/src/app/modules/home/components/router-tabs.component.html

@ -22,9 +22,9 @@
#rla="routerLinkActive"
mat-tab-link
[active]="rla.isActive">
@if (tab.outlinedIcon !== null) {
@if (tab.outlinedIcon) {
<tb-icon class="tb-mat-18">{{tab.outlinedIcon}}</tb-icon>
} @else if (tab.icon !== null) {
} @else if (tab.icon) {
<tb-icon class="tb-mat-18">{{tab.icon}}</tb-icon>
}
<span>{{ tab.customTranslate ? (tab.name | customTranslate) : (tab.name | translate) }}</span>

21
ui-ngx/src/app/modules/home/components/router-tabs.component.ts

@ -9,7 +9,7 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import { MenuService } from '@core/services/menu.service';
import { distinctUntilChanged, filter, map, mergeMap, startWith, take } from 'rxjs/operators';
import { merge, Observable } from 'rxjs';
import { MenuSection } from '@core/services/menu.models';
import { MenuSection, menuSectionMap } from '@core/services/menu.models';
import { ActiveComponentService } from '@core/services/active-component.service';
import { TbAnchorComponent } from '@shared/components/tb-anchor.component';
import { getCurrentAuthUser } from '@core/auth/auth.selectors';
@ -130,13 +130,18 @@ export class RouterTabsComponent extends PageComponent implements OnInit {
}
});
if (children.length) {
return children.map(tab => ({
id: tab.component?.name ?? tab.path,
type: 'link',
name: tab.data?.breadcrumb?.label ?? '',
icon: tab.data?.breadcrumb?.icon ?? '',
path: `${sectionPath}/${tab.path}`
}));
return children.map(tab => {
const breadcrumb = tab.data?.breadcrumb;
const section = breadcrumb?.menuId ? menuSectionMap.get(breadcrumb.menuId) : null;
return {
id: tab.component?.name ?? tab.path,
type: 'link',
name: section?.name ?? breadcrumb?.label ?? '',
icon: section?.icon ?? breadcrumb?.icon ?? '',
outlinedIcon: section?.outlinedIcon ?? breadcrumb?.icon ?? '',
path: `${sectionPath}/${tab.path}`
};
});
}
return [];
}

4
ui-ngx/src/app/modules/home/pages/notification/settings/notification-settings-routing.modules.ts

@ -3,7 +3,7 @@
import { Routes } from '@angular/router';
import { ConfirmOnExitGuard } from '@core/guards/confirm-on-exit.guard';
import { Authority } from '@shared/models/authority.enum';
import { inject, NgModule } from '@angular/core';
import { inject } from '@angular/core';
import { NotificationSettingsComponent } from '@home/pages/notification/settings/notification-settings.component';
import { NotificationService } from '@core/http/notification.service';
@ -17,7 +17,7 @@ export const notificationUserSettingsRoutes: Routes = [
title: 'account.notification-settings',
breadcrumb: {
label: 'account.notification-settings',
icon: 'settings'
icon: 'mdi:cog-outline'
}
},
resolve: {

2
ui-ngx/src/app/modules/home/pages/profile/profile-routing.module.ts

@ -48,7 +48,7 @@ export const profileRoutes: Routes = [
title: 'profile.profile',
breadcrumb: {
label: 'profile.profile',
icon: 'account_circle'
icon: 'mdi:account-circle-outline'
}
},
resolve: {

2
ui-ngx/src/app/modules/home/pages/security/security-routing.module.ts

@ -49,7 +49,7 @@ export const securityRoutes: Routes = [
title: 'security.security',
breadcrumb: {
label: 'security.security',
icon: 'lock'
icon: 'mdi:lock-outline'
}
},
resolve: {

Loading…
Cancel
Save