mirror of https://github.com/abpframework/abp.git
committed by
GitHub
123 changed files with 753 additions and 684 deletions
@ -1,20 +1,21 @@ |
|||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
|
|||
export const APP_ROUTE_PROVIDER = [ |
|||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
|||
provideAppInitializer(() => { |
|||
configureRoutes(); |
|||
}), |
|||
]; |
|||
|
|||
function configureRoutes(routesService: RoutesService) { |
|||
return () => { |
|||
routesService.add([ |
|||
{ |
|||
path: '/', |
|||
name: '::Menu:Home', |
|||
iconClass: 'fas fa-home', |
|||
order: 1, |
|||
layout: eLayoutType.application, |
|||
}, |
|||
]); |
|||
}; |
|||
function configureRoutes() { |
|||
const routesService = inject(RoutesService); |
|||
routesService.add([ |
|||
{ |
|||
path: '/', |
|||
name: '::Menu:Home', |
|||
iconClass: 'fas fa-home', |
|||
order: 1, |
|||
layout: eLayoutType.application, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
@ -1,5 +1,5 @@ |
|||
import { getJestProjects } from '@nx/jest'; |
|||
import { getJestProjectsAsync } from '@nx/jest'; |
|||
|
|||
export default { |
|||
projects: getJestProjects(), |
|||
}; |
|||
export default async () => ({ |
|||
projects: await getJestProjectsAsync(), |
|||
}); |
|||
|
|||
@ -1,84 +1,159 @@ |
|||
{ |
|||
"migrations": [ |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.2.0-beta.2", |
|||
"description": "Updates the default workspace data directory to .nx/workspace-data", |
|||
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory", |
|||
"version": "20.0.0-beta.7", |
|||
"description": "Migration for v20.0.0-beta.7", |
|||
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process", |
|||
"package": "nx", |
|||
"name": "19-2-0-move-graph-cache-directory" |
|||
"name": "move-use-daemon-process" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.2.2-beta.0", |
|||
"description": "Updates the nx wrapper.", |
|||
"implementation": "./src/migrations/update-17-3-0/update-nxw", |
|||
"version": "20.0.1", |
|||
"description": "Set `useLegacyCache` to true for migrating workspaces", |
|||
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache", |
|||
"x-repair-skip": true, |
|||
"package": "nx", |
|||
"name": "19-2-2-update-nx-wrapper" |
|||
"name": "use-legacy-cache" |
|||
}, |
|||
{ |
|||
"version": "19.2.4-beta.0", |
|||
"description": "Set project name in nx.json explicitly", |
|||
"implementation": "./src/migrations/update-19-2-4/set-project-name", |
|||
"x-repair-skip": true, |
|||
"package": "nx", |
|||
"name": "19-2-4-set-project-name" |
|||
"version": "20.2.0-beta.5", |
|||
"description": "Update TypeScript ESLint packages to v8.13.0 if they are already on v8", |
|||
"implementation": "./src/migrations/update-20-2-0/update-typescript-eslint-v8-13-0", |
|||
"package": "@nx/eslint", |
|||
"name": "update-typescript-eslint-v8.13.0" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.6.0-beta.4", |
|||
"description": "Update ciWebServerCommand to use static serve for the application.", |
|||
"implementation": "./src/migrations/update-19-6-0/update-ci-webserver-for-static-serve", |
|||
"package": "@nx/cypress", |
|||
"name": "update-19-6-0-update-ci-webserver-for-vite" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "20.0.0-beta.5", |
|||
"description": "replace getJestProjects with getJestProjectsAsync", |
|||
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync", |
|||
"package": "@nx/jest", |
|||
"name": "replace-getJestProjects-with-getJestProjectsAsync" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.6.0-beta.4", |
|||
"description": "Ensure Module Federation DTS is turned off by default.", |
|||
"factory": "./src/migrations/update-19-6-0/turn-off-dts-by-default", |
|||
"package": "@nx/angular", |
|||
"name": "update-19-6-0" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.6.0-beta.7", |
|||
"requires": { "@angular/core": ">=18.2.0" }, |
|||
"description": "Update the @angular/cli package version to ~18.2.0.", |
|||
"factory": "./src/migrations/update-19-6-0/update-angular-cli", |
|||
"package": "@nx/angular", |
|||
"name": "update-angular-cli-version-18-2-0" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.6.1-beta.0", |
|||
"description": "Ensure Target Defaults are set correctly for Module Federation.", |
|||
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf", |
|||
"package": "@nx/angular", |
|||
"name": "update-19-6-1-ensure-module-federation-target-defaults" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "20.2.0-beta.2", |
|||
"description": "Update the ModuleFederationConfig import use @nx/module-federation.", |
|||
"factory": "./src/migrations/update-20-2-0/migrate-mf-imports-to-new-package", |
|||
"package": "@nx/angular", |
|||
"name": "update-20-2-0-update-module-federation-config-import" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "20.2.0-beta.2", |
|||
"description": "Update the withModuleFederation import use @nx/module-federation/angular.", |
|||
"factory": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package", |
|||
"package": "@nx/angular", |
|||
"name": "update-20-2-0-update-with-module-federation-import" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "20.2.0-beta.5", |
|||
"requires": { "@angular/core": ">=19.0.0" }, |
|||
"description": "Update the @angular/cli package version to ~19.0.0.", |
|||
"factory": "./src/migrations/update-20-2-0/update-angular-cli", |
|||
"package": "@nx/angular", |
|||
"name": "update-angular-cli-version-19-0-0" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.1.0-beta.6", |
|||
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs", |
|||
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi", |
|||
"package": "@nx/eslint-plugin", |
|||
"name": "update-19-1-0-rename-no-extra-semi" |
|||
"version": "20.2.0-beta.5", |
|||
"requires": { "@angular/core": ">=19.0.0" }, |
|||
"description": "Add the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.", |
|||
"factory": "./src/migrations/update-20-2-0/add-localize-polyfill-to-targets", |
|||
"package": "@nx/angular", |
|||
"name": "add-localize-polyfill-to-targets" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "20.2.0-beta.5", |
|||
"requires": { "@angular/core": ">=19.0.0" }, |
|||
"description": "Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.", |
|||
"factory": "./src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point", |
|||
"package": "@nx/angular", |
|||
"name": "update-angular-ssr-imports-to-use-node-entry-point" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.1.0-beta.2", |
|||
"requires": { "@angular/core": ">=18.0.0" }, |
|||
"description": "Update the @angular/cli package version to ~18.0.0.", |
|||
"factory": "./src/migrations/update-19-1-0/update-angular-cli", |
|||
"version": "20.2.0-beta.6", |
|||
"requires": { "@angular/core": ">=19.0.0" }, |
|||
"description": "Disable the Angular ESLint prefer-standalone rule if not set.", |
|||
"factory": "./src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone", |
|||
"package": "@nx/angular", |
|||
"name": "update-angular-cli-version-18-0-0" |
|||
"name": "disable-angular-eslint-prefer-standalone" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.2.1-beta.0", |
|||
"requires": { "@angular-eslint/eslint-plugin": ">=18.0.0" }, |
|||
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.", |
|||
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils", |
|||
"version": "20.2.0-beta.8", |
|||
"requires": { "@angular/core": ">=19.0.0" }, |
|||
"description": "Remove Angular ESLint rules that were removed in v19.0.0.", |
|||
"factory": "./src/migrations/update-20-2-0/remove-angular-eslint-rules", |
|||
"package": "@nx/angular", |
|||
"name": "add-typescript-eslint-utils" |
|||
"name": "remove-angular-eslint-rules" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "19.5.0-beta.1", |
|||
"requires": { "@angular/core": ">=18.1.0" }, |
|||
"description": "Update the @angular/cli package version to ~18.1.0.", |
|||
"factory": "./src/migrations/update-19-5-0/update-angular-cli", |
|||
"version": "20.2.0-beta.8", |
|||
"requires": { "@angular/core": ">=19.0.0" }, |
|||
"description": "Remove the deprecated 'tailwindConfig' option from ng-packagr executors. Tailwind CSS configurations located at the project or workspace root will be picked up automatically.", |
|||
"factory": "./src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors", |
|||
"package": "@nx/angular", |
|||
"name": "update-angular-cli-version-18-1-0" |
|||
"name": "remove-tailwind-config-from-ng-packagr-executors" |
|||
}, |
|||
{ |
|||
"version": "18.0.0", |
|||
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.", |
|||
"factory": "./migrations/invalid-two-way-bindings/bundle", |
|||
"version": "19.0.0", |
|||
"description": "Updates non-standalone Directives, Component and Pipes to 'standalone:false' and removes 'standalone:true' from those who are standalone", |
|||
"factory": "./bundles/explicit-standalone-flag#migrate", |
|||
"package": "@angular/core", |
|||
"name": "invalid-two-way-bindings" |
|||
"name": "explicit-standalone-flag" |
|||
}, |
|||
{ |
|||
"version": "18.0.0", |
|||
"description": "Replace deprecated HTTP related modules with provider functions", |
|||
"factory": "./migrations/http-providers/bundle", |
|||
"version": "19.0.0", |
|||
"description": "Updates ExperimentalPendingTasks to PendingTasks", |
|||
"factory": "./bundles/pending-tasks#migrate", |
|||
"package": "@angular/core", |
|||
"name": "migration-http-providers" |
|||
"name": "pending-tasks" |
|||
}, |
|||
{ |
|||
"version": "18.1.0", |
|||
"description": "Updates calls to afterRender with an explicit phase to the new API", |
|||
"factory": "./migrations/after-render-phase/bundle", |
|||
"version": "19.0.0", |
|||
"description": "Replaces `APP_INITIALIZER`, `ENVIRONMENT_INITIALIZER` & `PLATFORM_INITIALIZER` respectively with `provideAppInitializer`, `provideEnvironmentInitializer` & `providePlatformInitializer`.", |
|||
"factory": "./bundles/provide-initializer#migrate", |
|||
"optional": true, |
|||
"package": "@angular/core", |
|||
"name": "migration-after-render-phase" |
|||
"name": "provide-initializer" |
|||
} |
|||
] |
|||
} |
|||
|
|||
@ -1,56 +1,57 @@ |
|||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
import { eAccountRouteNames } from '../enums/route-names'; |
|||
|
|||
export const ACCOUNT_ROUTE_PROVIDERS = [ |
|||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
|||
provideAppInitializer(() => { |
|||
configureRoutes(); |
|||
}), |
|||
]; |
|||
|
|||
export function configureRoutes(routes: RoutesService) { |
|||
return () => { |
|||
routes.add([ |
|||
{ |
|||
path: undefined, |
|||
name: eAccountRouteNames.Account, |
|||
invisible: true, |
|||
layout: eLayoutType.account, |
|||
breadcrumbText: eAccountRouteNames.Account, |
|||
iconClass: 'bi bi-person-fill-gear', |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/account/login', |
|||
name: eAccountRouteNames.Login, |
|||
parentName: eAccountRouteNames.Account, |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/account/register', |
|||
name: eAccountRouteNames.Register, |
|||
parentName: eAccountRouteNames.Account, |
|||
order: 2, |
|||
}, |
|||
{ |
|||
path: '/account/manage', |
|||
name: eAccountRouteNames.ManageProfile, |
|||
parentName: eAccountRouteNames.Account, |
|||
layout: eLayoutType.application, |
|||
breadcrumbText: 'AbpAccount::Manage', |
|||
iconClass: 'bi bi-kanban-fill', |
|||
order: 3, |
|||
}, |
|||
{ |
|||
path: '/account/forgot-password', |
|||
parentName: eAccountRouteNames.Account, |
|||
name: eAccountRouteNames.ForgotPassword, |
|||
invisible: true, |
|||
}, |
|||
{ |
|||
path: '/account/reset-password', |
|||
parentName: eAccountRouteNames.Account, |
|||
name: eAccountRouteNames.ResetPassword, |
|||
invisible: true, |
|||
}, |
|||
]); |
|||
}; |
|||
export function configureRoutes() { |
|||
const routes = inject(RoutesService); |
|||
routes.add([ |
|||
{ |
|||
path: undefined, |
|||
name: eAccountRouteNames.Account, |
|||
invisible: true, |
|||
layout: eLayoutType.account, |
|||
breadcrumbText: eAccountRouteNames.Account, |
|||
iconClass: 'bi bi-person-fill-gear', |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/account/login', |
|||
name: eAccountRouteNames.Login, |
|||
parentName: eAccountRouteNames.Account, |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/account/register', |
|||
name: eAccountRouteNames.Register, |
|||
parentName: eAccountRouteNames.Account, |
|||
order: 2, |
|||
}, |
|||
{ |
|||
path: '/account/manage', |
|||
name: eAccountRouteNames.ManageProfile, |
|||
parentName: eAccountRouteNames.Account, |
|||
layout: eLayoutType.application, |
|||
breadcrumbText: 'AbpAccount::Manage', |
|||
iconClass: 'bi bi-kanban-fill', |
|||
order: 3, |
|||
}, |
|||
{ |
|||
path: '/account/forgot-password', |
|||
parentName: eAccountRouteNames.Account, |
|||
name: eAccountRouteNames.ForgotPassword, |
|||
invisible: true, |
|||
}, |
|||
{ |
|||
path: '/account/reset-password', |
|||
parentName: eAccountRouteNames.Account, |
|||
name: eAccountRouteNames.ResetPassword, |
|||
invisible: true, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
@ -1,23 +1,19 @@ |
|||
import { APP_INITIALIZER, Injector, Provider } from '@angular/core'; |
|||
import { Injector, inject, provideAppInitializer } from '@angular/core'; |
|||
import { DOCUMENT } from '@angular/common'; |
|||
import { SessionStateService } from '../services/session-state.service'; |
|||
import { COOKIE_LANGUAGE_KEY } from '../tokens/cookie-language-key.token'; |
|||
|
|||
export function setLanguageToCookie(injector: Injector) { |
|||
return () => { |
|||
const sessionState = injector.get(SessionStateService); |
|||
const document = injector.get(DOCUMENT); |
|||
const cookieLanguageKey = injector.get(COOKIE_LANGUAGE_KEY); |
|||
sessionState.getLanguage$().subscribe(language => { |
|||
const cookieValue = encodeURIComponent(`c=${language}|uic=${language}`); |
|||
document.cookie = `${cookieLanguageKey}=${cookieValue}`; |
|||
}); |
|||
}; |
|||
export function setLanguageToCookie() { |
|||
const injector = inject(Injector); |
|||
const sessionState = injector.get(SessionStateService); |
|||
const document = injector.get(DOCUMENT); |
|||
const cookieLanguageKey = injector.get(COOKIE_LANGUAGE_KEY); |
|||
sessionState.getLanguage$().subscribe(language => { |
|||
const cookieValue = encodeURIComponent(`c=${language}|uic=${language}`); |
|||
document.cookie = `${cookieLanguageKey}=${cookieValue}`; |
|||
}); |
|||
} |
|||
|
|||
export const CookieLanguageProvider: Provider = { |
|||
provide: APP_INITIALIZER, |
|||
useFactory: setLanguageToCookie, |
|||
deps: [Injector], |
|||
multi: true, |
|||
}; |
|||
export const CookieLanguageProvider = provideAppInitializer(() => { |
|||
setLanguageToCookie(); |
|||
}); |
|||
|
|||
@ -1,26 +1,22 @@ |
|||
import { SettingTabsService } from '@abp/ng.setting-management/config'; |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
import { eFeatureManagementTabNames } from '../enums/feature-management-tab-names'; |
|||
import { FeatureManagementTabComponent } from '../components'; |
|||
|
|||
export const FEATURE_MANAGEMENT_SETTINGS_PROVIDERS = [ |
|||
{ |
|||
provide: APP_INITIALIZER, |
|||
useFactory: configureSettingTabs, |
|||
deps: [SettingTabsService], |
|||
multi: true, |
|||
}, |
|||
provideAppInitializer(() => { |
|||
configureSettingTabs(); |
|||
}), |
|||
]; |
|||
|
|||
export function configureSettingTabs(settingtabs: SettingTabsService) { |
|||
return () => { |
|||
settingtabs.add([ |
|||
{ |
|||
name: eFeatureManagementTabNames.FeatureManagement, |
|||
order: 100, |
|||
requiredPolicy: 'FeatureManagement.ManageHostFeatures', |
|||
component: FeatureManagementTabComponent, |
|||
}, |
|||
]); |
|||
}; |
|||
export function configureSettingTabs() { |
|||
const settingtabs = inject(SettingTabsService); |
|||
settingtabs.add([ |
|||
{ |
|||
name: eFeatureManagementTabNames.FeatureManagement, |
|||
order: 100, |
|||
requiredPolicy: 'FeatureManagement.ManageHostFeatures', |
|||
component: FeatureManagementTabComponent, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
@ -1,39 +1,40 @@ |
|||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
|||
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared'; |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
import { eIdentityPolicyNames } from '../enums/policy-names'; |
|||
import { eIdentityRouteNames } from '../enums/route-names'; |
|||
|
|||
export const IDENTITY_ROUTE_PROVIDERS = [ |
|||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
|||
provideAppInitializer(() => { |
|||
configureRoutes(); |
|||
}), |
|||
]; |
|||
|
|||
export function configureRoutes(routesService: RoutesService) { |
|||
return () => { |
|||
routesService.add([ |
|||
{ |
|||
path: undefined, |
|||
name: eIdentityRouteNames.IdentityManagement, |
|||
parentName: eThemeSharedRouteNames.Administration, |
|||
requiredPolicy: eIdentityPolicyNames.IdentityManagement, |
|||
iconClass: 'fa fa-id-card-o', |
|||
layout: eLayoutType.application, |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/identity/roles', |
|||
name: eIdentityRouteNames.Roles, |
|||
parentName: eIdentityRouteNames.IdentityManagement, |
|||
requiredPolicy: eIdentityPolicyNames.Roles, |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/identity/users', |
|||
name: eIdentityRouteNames.Users, |
|||
parentName: eIdentityRouteNames.IdentityManagement, |
|||
requiredPolicy: eIdentityPolicyNames.Users, |
|||
order: 2, |
|||
}, |
|||
]); |
|||
}; |
|||
export function configureRoutes() { |
|||
const routesService = inject(RoutesService); |
|||
routesService.add([ |
|||
{ |
|||
path: undefined, |
|||
name: eIdentityRouteNames.IdentityManagement, |
|||
parentName: eThemeSharedRouteNames.Administration, |
|||
requiredPolicy: eIdentityPolicyNames.IdentityManagement, |
|||
iconClass: 'fa fa-id-card-o', |
|||
layout: eLayoutType.application, |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/identity/roles', |
|||
name: eIdentityRouteNames.Roles, |
|||
parentName: eIdentityRouteNames.IdentityManagement, |
|||
requiredPolicy: eIdentityPolicyNames.Roles, |
|||
order: 1, |
|||
}, |
|||
{ |
|||
path: '/identity/users', |
|||
name: eIdentityRouteNames.Users, |
|||
parentName: eIdentityRouteNames.IdentityManagement, |
|||
requiredPolicy: eIdentityPolicyNames.Users, |
|||
order: 2, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
@ -1,26 +1,22 @@ |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
import { EmailSettingGroupComponent } from '../components/email-setting-group/email-setting-group.component'; |
|||
import { eSettingManamagementSettingTabNames } from '../enums/setting-tab-names'; |
|||
import { SettingTabsService } from '../services/settings-tabs.service'; |
|||
|
|||
export const SETTING_MANAGEMENT_SETTING_TAB_PROVIDERS = [ |
|||
{ |
|||
provide: APP_INITIALIZER, |
|||
useFactory: configureSettingTabs, |
|||
deps: [SettingTabsService], |
|||
multi: true, |
|||
}, |
|||
provideAppInitializer(() => { |
|||
configureSettingTabs(); |
|||
}), |
|||
]; |
|||
|
|||
export function configureSettingTabs(settingTabs: SettingTabsService) { |
|||
return () => { |
|||
settingTabs.add([ |
|||
{ |
|||
name: eSettingManamagementSettingTabNames.EmailSettingGroup, |
|||
order: 100, |
|||
requiredPolicy: 'SettingManagement.Emailing', |
|||
component: EmailSettingGroupComponent, |
|||
}, |
|||
]); |
|||
}; |
|||
export function configureSettingTabs() { |
|||
const settingTabs = inject(SettingTabsService); |
|||
settingTabs.add([ |
|||
{ |
|||
name: eSettingManamagementSettingTabNames.EmailSettingGroup, |
|||
order: 100, |
|||
requiredPolicy: 'SettingManagement.Emailing', |
|||
component: EmailSettingGroupComponent, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
@ -1,32 +1,33 @@ |
|||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
|||
import { eThemeSharedRouteNames } from '@abp/ng.theme.shared'; |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
import { eTenantManagementPolicyNames } from '../enums/policy-names'; |
|||
import { eTenantManagementRouteNames } from '../enums/route-names'; |
|||
|
|||
export const TENANT_MANAGEMENT_ROUTE_PROVIDERS = [ |
|||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
|||
provideAppInitializer(() => { |
|||
configureRoutes(); |
|||
}), |
|||
]; |
|||
|
|||
export function configureRoutes(routes: RoutesService) { |
|||
return () => { |
|||
routes.add([ |
|||
{ |
|||
path: undefined, |
|||
name: eTenantManagementRouteNames.TenantManagement, |
|||
parentName: eThemeSharedRouteNames.Administration, |
|||
requiredPolicy: eTenantManagementPolicyNames.TenantManagement, |
|||
layout: eLayoutType.application, |
|||
iconClass: 'fa fa-users', |
|||
order: 2, |
|||
}, |
|||
{ |
|||
path: '/tenant-management/tenants', |
|||
name: eTenantManagementRouteNames.Tenants, |
|||
parentName: eTenantManagementRouteNames.TenantManagement, |
|||
requiredPolicy: eTenantManagementPolicyNames.Tenants, |
|||
order: 1, |
|||
}, |
|||
]); |
|||
}; |
|||
export function configureRoutes() { |
|||
const routes = inject(RoutesService); |
|||
routes.add([ |
|||
{ |
|||
path: undefined, |
|||
name: eTenantManagementRouteNames.TenantManagement, |
|||
parentName: eThemeSharedRouteNames.Administration, |
|||
requiredPolicy: eTenantManagementPolicyNames.TenantManagement, |
|||
layout: eLayoutType.application, |
|||
iconClass: 'fa fa-users', |
|||
order: 2, |
|||
}, |
|||
{ |
|||
path: '/tenant-management/tenants', |
|||
name: eTenantManagementRouteNames.Tenants, |
|||
parentName: eTenantManagementRouteNames.TenantManagement, |
|||
requiredPolicy: eTenantManagementPolicyNames.Tenants, |
|||
order: 1, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
@ -1,31 +1,27 @@ |
|||
import { NavItemsService } from '@abp/ng.theme.shared'; |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
import { CurrentUserComponent } from '../components/nav-items/current-user.component'; |
|||
import { LanguagesComponent } from '../components/nav-items/languages.component'; |
|||
import { eThemeBasicComponents } from '../enums/components'; |
|||
|
|||
export const BASIC_THEME_NAV_ITEM_PROVIDERS = [ |
|||
{ |
|||
provide: APP_INITIALIZER, |
|||
useFactory: configureNavItems, |
|||
deps: [NavItemsService], |
|||
multi: true, |
|||
}, |
|||
provideAppInitializer(() => { |
|||
configureNavItems(); |
|||
}), |
|||
]; |
|||
|
|||
export function configureNavItems(navItems: NavItemsService) { |
|||
return () => { |
|||
navItems.addItems([ |
|||
{ |
|||
id: eThemeBasicComponents.Languages, |
|||
order: 100, |
|||
component: LanguagesComponent, |
|||
}, |
|||
{ |
|||
id: eThemeBasicComponents.CurrentUser, |
|||
order: 100, |
|||
component: CurrentUserComponent, |
|||
}, |
|||
]); |
|||
}; |
|||
export function configureNavItems() { |
|||
const navItems = inject(NavItemsService); |
|||
navItems.addItems([ |
|||
{ |
|||
id: eThemeBasicComponents.Languages, |
|||
order: 100, |
|||
component: LanguagesComponent, |
|||
}, |
|||
{ |
|||
id: eThemeBasicComponents.CurrentUser, |
|||
order: 100, |
|||
component: CurrentUserComponent, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue