diff --git a/jslib b/jslib index 97ece68dec..78d40d9f18 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 97ece68dec8f2f94e41a172419039e68d8966253 +Subproject commit 78d40d9f18c23a185465d5fca238b258b2848193 diff --git a/src/app/layouts/footer.component.ts b/src/app/layouts/footer.component.ts index 05a4076643..d4346a8ba4 100644 --- a/src/app/layouts/footer.component.ts +++ b/src/app/layouts/footer.component.ts @@ -15,8 +15,8 @@ export class FooterComponent implements OnInit { constructor(private platformUtilsService: PlatformUtilsService) { } - ngOnInit() { + async ngOnInit() { this.year = new Date().getFullYear().toString(); - this.version = this.platformUtilsService.getApplicationVersion(); + this.version = await this.platformUtilsService.getApplicationVersion(); } } diff --git a/src/app/layouts/frontend-layout.component.ts b/src/app/layouts/frontend-layout.component.ts index aae5ab9922..5d1688fb98 100644 --- a/src/app/layouts/frontend-layout.component.ts +++ b/src/app/layouts/frontend-layout.component.ts @@ -16,9 +16,9 @@ export class FrontendLayoutComponent implements OnInit, OnDestroy { constructor(private platformUtilsService: PlatformUtilsService) { } - ngOnInit() { + async ngOnInit() { this.year = new Date().getFullYear().toString(); - this.version = this.platformUtilsService.getApplicationVersion(); + this.version = await this.platformUtilsService.getApplicationVersion(); document.body.classList.add('layout_frontend'); } diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index b890948824..59431b3dfc 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -114,7 +114,7 @@ const cipherService = new CipherService(cryptoService, userService, settingsServ const folderService = new FolderService(cryptoService, userService, apiService, storageService, i18nService, cipherService); const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService); -searchService = new SearchService(cipherService, consoleLogService); +searchService = new SearchService(cipherService, consoleLogService, i18nService); const policyService = new PolicyService(userService, storageService); const sendService = new SendService(cryptoService, userService, apiService, fileUploadService, storageService, i18nService, cryptoFunctionService); diff --git a/src/services/webPlatformUtils.service.ts b/src/services/webPlatformUtils.service.ts index 977b7f276b..efe003e386 100644 --- a/src/services/webPlatformUtils.service.ts +++ b/src/services/webPlatformUtils.service.ts @@ -154,8 +154,8 @@ export class WebPlatformUtilsService implements PlatformUtilsService { } } - getApplicationVersion(): string { - return process.env.APPLICATION_VERSION || '-'; + getApplicationVersion(): Promise { + return Promise.resolve(process.env.APPLICATION_VERSION || '-'); } supportsWebAuthn(win: Window): boolean { @@ -286,7 +286,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService { } getDefaultSystemTheme() { - return null as 'light' | 'dark'; + return Promise.resolve(null as 'light' | 'dark'); } onDefaultSystemThemeChange() {