diff --git a/app/src/app.config.json.tpl b/app/src/app.config.json.tpl index 49333691b..8a71ec004 100644 --- a/app/src/app.config.json.tpl +++ b/app/src/app.config.json.tpl @@ -7,14 +7,14 @@ "authType": "${APP_CONFIG_AUTH_TYPE}", "loginRoute": "login", "mobileAppSwitch": { - "enabled" : ${APP_CONFIG_ENABLE_MOBILE_APP_SWITCH}, + "enabled" : "${APP_CONFIG_ENABLE_MOBILE_APP_SWITCH}", "iphoneUrl": "iosamw://", "androidUrlPart1": "intent:///", "androidUrlPart2": "#Intent;scheme=androidamw;package=com.alfresco.content.app;end", "sessionTimeForOpenAppDialogDisplay": "${APP_CONFIG_SESSION_TIME_FOR_OPEN_APP_DIALOG_DISPLAY_IN_HOURS}" }, "plugins": { - "aosPlugin": ${APP_CONFIG_PLUGIN_AOS}, + "aosPlugin": "${APP_CONFIG_PLUGIN_AOS}", "contentService": ${APP_CONFIG_PLUGIN_CONTENT_SERVICE}, "folderRules": ${APP_CONFIG_PLUGIN_FOLDER_RULES} }, diff --git a/projects/aca-shared/src/lib/services/aca-mobile-app-switcher.service.spec.ts b/projects/aca-shared/src/lib/services/aca-mobile-app-switcher.service.spec.ts index 4cb0c203f..b269faaa3 100644 --- a/projects/aca-shared/src/lib/services/aca-mobile-app-switcher.service.spec.ts +++ b/projects/aca-shared/src/lib/services/aca-mobile-app-switcher.service.spec.ts @@ -45,7 +45,7 @@ describe('AcaMobileAppSwitcherService', () => { }); appConfig = TestBed.inject(AppConfigService); appConfig.config.mobileAppSwitch = { - enabled: true, + enabled: 'true', iphoneUrl: 'iosamw://', androidUrlPart1: 'intent:///', androidUrlPart2: '#Intent;scheme=androidamw;package=com.alfresco.content.app;end', diff --git a/projects/aca-shared/src/lib/services/alfresco-office-extension.service.spec.ts b/projects/aca-shared/src/lib/services/alfresco-office-extension.service.spec.ts index b1f45114e..3d12cecba 100644 --- a/projects/aca-shared/src/lib/services/alfresco-office-extension.service.spec.ts +++ b/projects/aca-shared/src/lib/services/alfresco-office-extension.service.spec.ts @@ -54,7 +54,7 @@ describe('AlfrescoOfficeExtensionService', () => { appConfig = TestBed.inject(AppConfigService); appConfig.onLoad = onLoad$; - appConfig.config.aosPlugin = true; + appConfig.config.aosPlugin = 'true'; service = TestBed.inject(AlfrescoOfficeExtensionService); @@ -67,7 +67,7 @@ describe('AlfrescoOfficeExtensionService', () => { onLoad$.next({ plugins: { - aosPlugin: true + aosPlugin: 'true' } }); @@ -80,7 +80,7 @@ describe('AlfrescoOfficeExtensionService', () => { onLoad$.next({ plugins: { - aosPlugin: false + aosPlugin: 'false' } }); diff --git a/projects/aca-shared/src/lib/services/alfresco-office-extension.service.ts b/projects/aca-shared/src/lib/services/alfresco-office-extension.service.ts index 95d416049..ac1dd8ff0 100644 --- a/projects/aca-shared/src/lib/services/alfresco-office-extension.service.ts +++ b/projects/aca-shared/src/lib/services/alfresco-office-extension.service.ts @@ -34,10 +34,10 @@ export class AlfrescoOfficeExtensionService { this.appConfigService.onLoad .pipe( take(1), - map((appConfig) => appConfig.plugins && appConfig.plugins.aosPlugin) + map((appConfig) => appConfig.plugins?.aosPlugin) ) .subscribe((aosPlugin) => { - if (aosPlugin) { + if (aosPlugin === 'true') { this.enablePlugin(); } else { this.disablePlugin(); @@ -55,7 +55,7 @@ export class AlfrescoOfficeExtensionService { localStorage.removeItem('aosPlugin'); } - isAosPluginEnabled() { + isAosPluginEnabled(): boolean { return localStorage && localStorage.getItem('aosPlugin') === 'true'; } } diff --git a/projects/aca-shared/src/lib/services/app.service.ts b/projects/aca-shared/src/lib/services/app.service.ts index 545a108c2..081aba738 100644 --- a/projects/aca-shared/src/lib/services/app.service.ts +++ b/projects/aca-shared/src/lib/services/app.service.ts @@ -142,11 +142,9 @@ export class AppService implements OnDestroy { const { router } = this; - this.router.events - .pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0)) - .subscribe((_event: ActivationEnd) => { - this.store.dispatch(new SetCurrentUrlAction(router.url)); - }); + this.router.events.pipe(filter((event) => event instanceof ActivationEnd && event.snapshot.children.length === 0)).subscribe(() => { + this.store.dispatch(new SetCurrentUrlAction(router.url)); + }); this.router.events.pipe(filter((event) => event instanceof NavigationStart)).subscribe(() => { this.store.dispatch(new ResetSelectionAction()); @@ -171,7 +169,7 @@ export class AppService implements OnDestroy { this.overlayContainer.getContainerElement().setAttribute('role', 'region'); - const isMobileSwitchEnabled: boolean = this.config.get('mobileAppSwitch.enabled', false); + const isMobileSwitchEnabled = this.config.get('mobileAppSwitch.enabled', 'false') === 'true'; if (isMobileSwitchEnabled) { this.acaMobileAppSwitcherService.resolveExistenceOfDialog(); } else {