Browse Source

UI: fixed menu for OAuth

pull/11231/head
rusikv 2 years ago
parent
commit
5032952800
  1. 45
      ui-ngx/src/app/core/services/menu.models.ts
  2. 10
      ui-ngx/src/app/modules/home/pages/admin/oauth2/oauth2-routing.module.ts
  3. 3
      ui-ngx/src/assets/locale/locale.constant-en_US.json

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

@ -78,6 +78,9 @@ export enum MenuId {
security_settings_general = 'security_settings_general',
two_fa = '2fa',
oauth2 = 'oauth2',
domains = 'domains',
mobile_apps = 'mobile_apps',
clients = 'clients',
audit_log = 'audit_log',
alarms = 'alarms',
dashboards = 'dashboards',
@ -405,6 +408,36 @@ export const menuSectionMap = new Map<MenuId, MenuSection>([
icon: 'mdi:shield-account'
}
],
[
MenuId.domains,
{
id: MenuId.domains,
name: 'admin.oauth2.domains',
type: 'link',
path: '/security-settings/oauth2/domains',
icon: 'domain'
}
],
[
MenuId.mobile_apps,
{
id: MenuId.mobile_apps,
name: 'admin.oauth2.mobile-apps',
type: 'link',
path: '/security-settings/oauth2/mobile-applications',
icon: 'smartphone'
}
],
[
MenuId.clients,
{
id: MenuId.clients,
name: 'admin.oauth2.clients',
type: 'link',
path: '/security-settings/oauth2/clients',
icon: 'public'
}
],
[
MenuId.audit_log,
{
@ -669,7 +702,14 @@ const defaultUserMenuMap = new Map<Authority, MenuReference[]>([
pages: [
{id: MenuId.security_settings_general},
{id: MenuId.two_fa},
{id: MenuId.oauth2}
{
id: MenuId.oauth2,
pages: [
{id: MenuId.domains},
{id: MenuId.mobile_apps},
{id: MenuId.clients}
]
}
]
}
]
@ -794,7 +834,8 @@ const defaultHomeSectionMap = new Map<Authority, HomeSectionReference[]>([
{
name: 'admin.system-settings',
places: [MenuId.general, MenuId.mail_server,
MenuId.notification_settings, MenuId.security_settings, MenuId.oauth2, MenuId.two_fa, MenuId.resources_library, MenuId.queues]
MenuId.notification_settings, MenuId.security_settings, MenuId.oauth2, MenuId.domains, MenuId.mobile_apps,
MenuId.clients, MenuId.two_fa, MenuId.resources_library, MenuId.queues]
}
]
],

10
ui-ngx/src/app/modules/home/pages/admin/oauth2/oauth2-routing.module.ts

@ -27,6 +27,7 @@ import { EntityDetailsPageComponent } from '@home/components/entity/entity-detai
import { entityDetailsPageBreadcrumbLabelFunction } from '@home/pages/home-pages.models';
import { BreadCrumbConfig } from '@shared/components/breadcrumb';
import { MobileAppTableConfigResolver } from '@home/pages/admin/oauth2/mobile-apps/mobile-app-table-config.resolver';
import { MenuId } from '@core/services/menu.models';
@Injectable()
export class OAuth2LoginProcessingUrlResolver implements Resolve<string> {
@ -66,8 +67,7 @@ export const oAuth2Routes: Routes = [
auth: [Authority.SYS_ADMIN],
title: 'admin.oauth2.domains',
breadcrumb: {
label: 'admin.oauth2.domains',
icon: 'domain'
menuId: MenuId.domains
}
},
resolve: {
@ -81,8 +81,7 @@ export const oAuth2Routes: Routes = [
auth: [Authority.SYS_ADMIN],
title: 'admin.oauth2.mobile-apps',
breadcrumb: {
label: 'admin.oauth2.mobile-apps',
icon: 'smartphone'
menuId: MenuId.mobile_apps
}
},
resolve: {
@ -94,8 +93,7 @@ export const oAuth2Routes: Routes = [
data: {
title: 'admin.oauth2.clients',
breadcrumb: {
label: 'admin.oauth2.clients',
icon: 'public'
menuId:MenuId.clients
}
},
children: [

3
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -223,7 +223,7 @@
"authorization-uri": "Authorization URI",
"authorization-uri-required": "Authorization URI is required.",
"add-client": "Add OAuth 2.0 client",
"client-details": "OAuth 2.0 details",
"client-details": "OAuth 2.0 client details",
"client": "OAuth 2.0 client",
"clients": "OAuth 2.0 clients",
"no-oauth2-clients": "No OAuth 2.0 clients found",
@ -2360,7 +2360,6 @@
"type-notification-templates": "Notification templates",
"list-of-notification-templates": "{ count, plural, =1 {One notification template} other {List of # notification templates} }",
"link": "link",
"list-of-notification-templates": "{ count, plural, =1 {One notification template} other {List of # notification templates} }",
"type-oauth2-client": "OAuth 2.0 client",
"type-oauth2-clients": "OAuth 2.0 clients",
"list-of-oauth2-clients": "{ count, plural, =1 {One OAuth 2.0 client} other {List of # OAuth 2.0 clients} }",

Loading…
Cancel
Save