diff --git a/src/app/shared/can-active-guard.service.ts b/src/app/shared/can-active-guard.service.ts index 69df9f7..201a143 100644 --- a/src/app/shared/can-active-guard.service.ts +++ b/src/app/shared/can-active-guard.service.ts @@ -12,7 +12,7 @@ const DEFAULT_LANG = 'en' export class CanActivateGuard implements CanActivate { constructor(private txService: TranslateService, private config: ConfigurationService) {} - /* eslint-disable @typescript-eslint/no-unused-vars */ /* TODO: is route and state needed */ + /* eslint-disable @typescript-eslint/no-unused-vars */ canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot diff --git a/src/app/shared/image-container/image-container.component.ts b/src/app/shared/image-container/image-container.component.ts index 7636ba9..b189a7c 100644 --- a/src/app/shared/image-container/image-container.component.ts +++ b/src/app/shared/image-container/image-container.component.ts @@ -24,7 +24,7 @@ export class ImageContainerComponent implements OnChanges { // if image Url does not start with a http the api-prefix ... // ...then it stored in the backend. So we need to put prefix in front - if (this.imageUrl && !this.imageUrl.match(/^(http|https)/g) && this.imageUrl.indexOf(this.apiPrefix) !== 0) { + if (this.imageUrl && !this.imageUrl.match(/^(http|https)/g) && !this.imageUrl.startsWith(this.apiPrefix)) { this.imageUrl = this.apiPrefix + this.imageUrl } } diff --git a/src/app/shared/label.resolver.ts b/src/app/shared/label.resolver.ts index 538e552..cc6206f 100644 --- a/src/app/shared/label.resolver.ts +++ b/src/app/shared/label.resolver.ts @@ -7,7 +7,7 @@ import { Observable } from 'rxjs' @Injectable() export class LabelResolver implements Resolve { constructor(private translate: TranslateService) {} - /* eslint-disable @typescript-eslint/no-unused-vars */ /* TODO: is state needed */ + /* eslint-disable @typescript-eslint/no-unused-vars */ resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): string | Observable | Promise { return route.data['breadcrumb'] ? this.translate.instant(route.data['breadcrumb']) : route.routeConfig?.path } diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 96e818c..42e965a 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -45,10 +45,8 @@ import { ImageContainerComponent } from './image-container/image-container.compo import { ThemeColorBoxComponent } from './theme-color-box/theme-color-box.component' export const basePathProvider = (mfeInfo: MfeInfo) => { - console.log( - 'Base path provider: ' + (mfeInfo ? mfeInfo.remoteBaseUrl + '' + environment.apiPrefix : '' + environment.apiPrefix) - ) - return mfeInfo ? mfeInfo.remoteBaseUrl + '' + environment.apiPrefix : '' + environment.apiPrefix + console.log('Base path provider: ' + (mfeInfo ? mfeInfo?.remoteBaseUrl : '') + environment.apiPrefix) + return (mfeInfo ? mfeInfo?.remoteBaseUrl : '') + environment.apiPrefix } export function HttpLoaderFactory(http: HttpClient, mfeInfo: MfeInfo) { @@ -56,7 +54,7 @@ export function HttpLoaderFactory(http: HttpClient, mfeInfo: MfeInfo) { console.log(`Configuring translation loader ${mfeInfo?.remoteBaseUrl}`) } // if running standalone then load the app assets directly from remote base URL - const appAssetPrefix = mfeInfo && mfeInfo.remoteBaseUrl ? mfeInfo.remoteBaseUrl : './' + const appAssetPrefix = mfeInfo?.remoteBaseUrl ? mfeInfo.remoteBaseUrl : './' return new TranslateCombinedLoader( new TranslateHttpLoader(http, appAssetPrefix + 'assets/i18n/', '.json'), new TranslateHttpLoader(http, appAssetPrefix + 'onecx-portal-lib/assets/i18n/', '.json') diff --git a/src/app/test/mocks/auth-mock.service.ts b/src/app/test/mocks/auth-mock.service.ts index ed76935..424c944 100644 --- a/src/app/test/mocks/auth-mock.service.ts +++ b/src/app/test/mocks/auth-mock.service.ts @@ -6,7 +6,9 @@ export class IAuthMockService implements IAuthService { getCurrentUser(): UserProfile | null { return null } - logout(): void {} + logout(): void { + // logout + } hasPermission(permissionKey: string): boolean { return false } diff --git a/src/app/theme/theme-designer/theme-designer.component.html b/src/app/theme/theme-designer/theme-designer.component.html index 8d19bd0..55edeca 100644 --- a/src/app/theme/theme-designer/theme-designer.component.html +++ b/src/app/theme/theme-designer/theme-designer.component.html @@ -62,14 +62,6 @@ - -
workspace.workspaceName) - return arr?.sort(sortByLocale).join(', ') || '' + return arr?.sort(sortByLocale).join(', ') ?? '' } } diff --git a/src/assets/silent-check-sso.html b/src/assets/silent-check-sso.html index ffe492c..9476448 100644 --- a/src/assets/silent-check-sso.html +++ b/src/assets/silent-check-sso.html @@ -1,4 +1,8 @@ - + + + + Some relevant title +