diff --git a/jslib b/jslib index a20e9352..f09fb698 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit a20e935268c986538ff68f72016bb8c772ea3a1b +Subproject commit f09fb69882525b3be7b2e257e7723eeb79b343d1 diff --git a/src/app/accounts/hint.component.ts b/src/app/accounts/hint.component.ts index 144b3fd4..d4bf83da 100644 --- a/src/app/accounts/hint.component.ts +++ b/src/app/accounts/hint.component.ts @@ -3,6 +3,7 @@ import { Router } from '@angular/router'; import { ApiService } from 'jslib-common/abstractions/api.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { HintComponent as BaseHintComponent } from 'jslib-angular/components/hint.component'; @@ -13,7 +14,7 @@ import { HintComponent as BaseHintComponent } from 'jslib-angular/components/hin }) export class HintComponent extends BaseHintComponent { constructor(router: Router, platformUtilsService: PlatformUtilsService, - i18nService: I18nService, apiService: ApiService) { - super(router, i18nService, apiService, platformUtilsService); + i18nService: I18nService, apiService: ApiService, logService: LogService) { + super(router, i18nService, apiService, platformUtilsService, logService); } } diff --git a/src/app/accounts/lock.component.ts b/src/app/accounts/lock.component.ts index a63bf519..f74012f4 100644 --- a/src/app/accounts/lock.component.ts +++ b/src/app/accounts/lock.component.ts @@ -13,6 +13,7 @@ import { ApiService } from 'jslib-common/abstractions/api.service'; import { CryptoService } from 'jslib-common/abstractions/crypto.service'; import { EnvironmentService } from 'jslib-common/abstractions/environment.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { StateService } from 'jslib-common/abstractions/state.service'; @@ -41,9 +42,10 @@ export class LockComponent extends BaseLockComponent implements OnDestroy { storageService: StorageService, vaultTimeoutService: VaultTimeoutService, environmentService: EnvironmentService, stateService: StateService, apiService: ApiService, private route: ActivatedRoute, - private broadcasterService: BroadcasterService, private ngZone: NgZone) { + private broadcasterService: BroadcasterService, private ngZone: NgZone, + logService: LogService) { super(router, i18nService, platformUtilsService, messagingService, userService, cryptoService, - storageService, vaultTimeoutService, environmentService, stateService, apiService); + storageService, vaultTimeoutService, environmentService, stateService, apiService, logService); } async ngOnInit() { diff --git a/src/app/accounts/login.component.ts b/src/app/accounts/login.component.ts index 98588520..5a8b0b31 100644 --- a/src/app/accounts/login.component.ts +++ b/src/app/accounts/login.component.ts @@ -14,6 +14,7 @@ import { AuthService } from 'jslib-common/abstractions/auth.service'; import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service'; import { EnvironmentService } from 'jslib-common/abstractions/environment.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; @@ -45,9 +46,9 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy { environmentService: EnvironmentService, passwordGenerationService: PasswordGenerationService, cryptoFunctionService: CryptoFunctionService, storageService: StorageService, private broadcasterService: BroadcasterService, private ngZone: NgZone, - private messagingService: MessagingService) { + private messagingService: MessagingService, logService: LogService) { super(authService, router, platformUtilsService, i18nService, stateService, environmentService, - passwordGenerationService, cryptoFunctionService, storageService); + passwordGenerationService, cryptoFunctionService, storageService, logService); super.onSuccessfulLogin = () => { return syncService.fullSync(true); }; diff --git a/src/app/accounts/premium.component.ts b/src/app/accounts/premium.component.ts index 252beba3..045651a7 100644 --- a/src/app/accounts/premium.component.ts +++ b/src/app/accounts/premium.component.ts @@ -1,13 +1,9 @@ -import { - Component, - NgZone, -} from '@angular/core'; +import { Component } from '@angular/core'; import { ApiService } from 'jslib-common/abstractions/api.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; -import { MessagingService } from 'jslib-common/abstractions/messaging.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; -import { SyncService } from 'jslib-common/abstractions/sync.service'; import { UserService } from 'jslib-common/abstractions/user.service'; import { PremiumComponent as BasePremiumComponent } from 'jslib-angular/components/premium.component'; @@ -19,8 +15,7 @@ import { PremiumComponent as BasePremiumComponent } from 'jslib-angular/componen export class PremiumComponent extends BasePremiumComponent { constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService, apiService: ApiService, userService: UserService, - private ngZone: NgZone, private messagingService: MessagingService, - private syncService: SyncService) { - super(i18nService, platformUtilsService, apiService, userService); + logService: LogService) { + super(i18nService, platformUtilsService, apiService, userService, logService); } } diff --git a/src/app/accounts/register.component.ts b/src/app/accounts/register.component.ts index 516f07a2..10be56a8 100644 --- a/src/app/accounts/register.component.ts +++ b/src/app/accounts/register.component.ts @@ -11,6 +11,7 @@ import { AuthService } from 'jslib-common/abstractions/auth.service'; import { CryptoService } from 'jslib-common/abstractions/crypto.service'; import { EnvironmentService } from 'jslib-common/abstractions/environment.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { StateService } from 'jslib-common/abstractions/state.service'; @@ -31,9 +32,9 @@ export class RegisterComponent extends BaseRegisterComponent implements OnInit, apiService: ApiService, stateService: StateService, platformUtilsService: PlatformUtilsService, passwordGenerationService: PasswordGenerationService, environmentService: EnvironmentService, private broadcasterService: BroadcasterService, - private ngZone: NgZone) { + private ngZone: NgZone, logService: LogService) { super(authService, router, i18nService, cryptoService, apiService, stateService, platformUtilsService, - passwordGenerationService, environmentService); + passwordGenerationService, environmentService, logService); } async ngOnInit() { diff --git a/src/app/accounts/sso.component.ts b/src/app/accounts/sso.component.ts index f2cb0039..3c02acbf 100644 --- a/src/app/accounts/sso.component.ts +++ b/src/app/accounts/sso.component.ts @@ -10,6 +10,7 @@ import { AuthService } from 'jslib-common/abstractions/auth.service'; import { CryptoFunctionService } from 'jslib-common/abstractions/cryptoFunction.service'; import { EnvironmentService } from 'jslib-common/abstractions/environment.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { StateService } from 'jslib-common/abstractions/state.service'; @@ -28,9 +29,9 @@ export class SsoComponent extends BaseSsoComponent { storageService: StorageService, stateService: StateService, platformUtilsService: PlatformUtilsService, apiService: ApiService, cryptoFunctionService: CryptoFunctionService, environmentService: EnvironmentService, - passwordGenerationService: PasswordGenerationService) { + passwordGenerationService: PasswordGenerationService, logService: LogService) { super(authService, router, i18nService, route, storageService, stateService, platformUtilsService, - apiService, cryptoFunctionService, environmentService, passwordGenerationService); + apiService, cryptoFunctionService, environmentService, passwordGenerationService, logService); super.onSuccessfulLogin = () => { return syncService.fullSync(true); }; diff --git a/src/app/accounts/two-factor.component.ts b/src/app/accounts/two-factor.component.ts index 21863ec7..d783470c 100644 --- a/src/app/accounts/two-factor.component.ts +++ b/src/app/accounts/two-factor.component.ts @@ -17,6 +17,7 @@ import { ApiService } from 'jslib-common/abstractions/api.service'; import { AuthService } from 'jslib-common/abstractions/auth.service'; import { EnvironmentService } from 'jslib-common/abstractions/environment.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { StateService } from 'jslib-common/abstractions/state.service'; import { StorageService } from 'jslib-common/abstractions/storage.service'; @@ -39,9 +40,10 @@ export class TwoFactorComponent extends BaseTwoFactorComponent { i18nService: I18nService, apiService: ApiService, platformUtilsService: PlatformUtilsService, syncService: SyncService, environmentService: EnvironmentService, private modalService: ModalService, - stateService: StateService, storageService: StorageService, route: ActivatedRoute) { + stateService: StateService, storageService: StorageService, route: ActivatedRoute, + logService: LogService) { super(authService, router, i18nService, apiService, platformUtilsService, window, environmentService, - stateService, storageService, route); + stateService, storageService, route, logService); super.onSuccessfulLogin = () => { return syncService.fullSync(true); }; diff --git a/src/app/accounts/update-temp-password.component.ts b/src/app/accounts/update-temp-password.component.ts index 40f58dab..071541d5 100644 --- a/src/app/accounts/update-temp-password.component.ts +++ b/src/app/accounts/update-temp-password.component.ts @@ -3,6 +3,7 @@ import { Component } from '@angular/core'; import { ApiService } from 'jslib-common/abstractions/api.service'; import { CryptoService } from 'jslib-common/abstractions/crypto.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; @@ -57,8 +58,8 @@ export class UpdateTempPasswordComponent extends BaseUpdateTempPasswordComponent passwordGenerationService: PasswordGenerationService, policyService: PolicyService, cryptoService: CryptoService, userService: UserService, messagingService: MessagingService, apiService: ApiService, - syncService: SyncService) { + syncService: SyncService, logService: LogService) { super(i18nService, platformUtilsService, passwordGenerationService, policyService, cryptoService, - userService, messagingService, apiService, syncService); + userService, messagingService, apiService, syncService, logService); } } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f3a4da54..80ef640c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -7,7 +7,6 @@ import { import { Component, - ComponentFactoryResolver, NgZone, OnInit, SecurityContext, @@ -31,6 +30,7 @@ import { CryptoService } from 'jslib-common/abstractions/crypto.service'; import { EventService } from 'jslib-common/abstractions/event.service'; import { FolderService } from 'jslib-common/abstractions/folder.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { NotificationsService } from 'jslib-common/abstractions/notifications.service'; import { PasswordGenerationService } from 'jslib-common/abstractions/passwordGeneration.service'; @@ -103,7 +103,7 @@ export class AppComponent implements OnInit { private toasterService: ToasterService, private i18nService: I18nService, private sanitizer: DomSanitizer, private ngZone: NgZone, private vaultTimeoutService: VaultTimeoutService, private storageService: StorageService, - private cryptoService: CryptoService, private componentFactoryResolver: ComponentFactoryResolver, + private cryptoService: CryptoService, private logService: LogService, private messagingService: MessagingService, private collectionService: CollectionService, private searchService: SearchService, private notificationsService: NotificationsService, private platformUtilsService: PlatformUtilsService, private systemService: SystemService, @@ -238,7 +238,9 @@ export class AppComponent implements OnInit { if (lastSyncAgo >= SyncInterval) { await this.syncService.fullSync(false); } - } catch { } + } catch (e) { + this.logService.error(e); + } this.messagingService.send('scheduleNextSync'); break; case 'exportVault': diff --git a/src/app/send/add-edit.component.ts b/src/app/send/add-edit.component.ts index 3bbc4663..bfe2a879 100644 --- a/src/app/send/add-edit.component.ts +++ b/src/app/send/add-edit.component.ts @@ -4,6 +4,7 @@ import { Component } from '@angular/core'; import { EnvironmentService } from 'jslib-common/abstractions/environment.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { PolicyService } from 'jslib-common/abstractions/policy.service'; @@ -20,9 +21,11 @@ export class AddEditComponent extends BaseAddEditComponent { constructor(i18nService: I18nService, platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService, datePipe: DatePipe, sendService: SendService, userService: UserService, - messagingService: MessagingService, policyService: PolicyService) { + messagingService: MessagingService, policyService: PolicyService, + logService: LogService) { super(i18nService, platformUtilsService, environmentService, - datePipe, sendService, userService, messagingService, policyService); + datePipe, sendService, userService, messagingService, policyService, + logService); } async refresh() { diff --git a/src/app/send/send.component.ts b/src/app/send/send.component.ts index 454eec2b..7a32955b 100644 --- a/src/app/send/send.component.ts +++ b/src/app/send/send.component.ts @@ -8,6 +8,7 @@ import { import { EnvironmentService } from 'jslib-common/abstractions/environment.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { PolicyService } from 'jslib-common/abstractions/policy.service'; import { SearchService } from 'jslib-common/abstractions/search.service'; @@ -45,10 +46,10 @@ export class SendComponent extends BaseSendComponent implements OnInit, OnDestro platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService, private broadcasterService: BroadcasterService, ngZone: NgZone, searchService: SearchService, policyService: PolicyService, - userService: UserService) { + userService: UserService, logService: LogService) { super(sendService, i18nService, platformUtilsService, environmentService, ngZone, searchService, - policyService, userService); + policyService, userService, logService); } async ngOnInit() { diff --git a/src/app/services.module.ts b/src/app/services.module.ts index 2a0ea5c6..019e3af3 100644 --- a/src/app/services.module.ts +++ b/src/app/services.module.ts @@ -111,22 +111,23 @@ const settingsService = new SettingsService(userService, storageService); export let searchService: SearchService = null; const fileUploadService = new FileUploadService(logService, apiService); const cipherService = new CipherService(cryptoService, userService, settingsService, - apiService, fileUploadService, storageService, i18nService, () => searchService); + apiService, fileUploadService, storageService, i18nService, () => searchService, + logService); const folderService = new FolderService(cryptoService, userService, apiService, storageService, i18nService, cipherService); const collectionService = new CollectionService(cryptoService, userService, storageService, i18nService); searchService = new SearchService(cipherService, logService, i18nService); const sendService = new SendService(cryptoService, userService, apiService, fileUploadService, storageService, i18nService, cryptoFunctionService); -const policyService = new PolicyService(userService, storageService); +const policyService = new PolicyService(userService, storageService, apiService); const vaultTimeoutService = new VaultTimeoutService(cipherService, folderService, collectionService, cryptoService, platformUtilsService, storageService, messagingService, searchService, userService, tokenService, policyService, null, async () => messagingService.send('logout', { expired: false })); const syncService = new SyncService(userService, apiService, settingsService, folderService, cipherService, cryptoService, collectionService, storageService, messagingService, policyService, - sendService, async (expired: boolean) => messagingService.send('logout', { expired: expired })); + sendService, logService, async (expired: boolean) => messagingService.send('logout', { expired: expired })); const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService, policyService); -const totpService = new TotpService(storageService, cryptoFunctionService); +const totpService = new TotpService(storageService, cryptoFunctionService, logService); const containerService = new ContainerService(cryptoService); const authService = new AuthService(cryptoService, apiService, userService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService, logService); @@ -134,7 +135,7 @@ const exportService = new ExportService(folderService, cipherService, apiService const auditService = new AuditService(cryptoFunctionService, apiService); const notificationsService = new NotificationsService(userService, syncService, appIdService, apiService, vaultTimeoutService, environmentService, async () => messagingService.send('logout', { expired: true }), logService); -const eventService = new EventService(storageService, apiService, userService, cipherService); +const eventService = new EventService(storageService, apiService, userService, cipherService, logService); const systemService = new SystemService(storageService, vaultTimeoutService, messagingService, platformUtilsService, null); const nativeMessagingService = new NativeMessagingService(cryptoFunctionService, cryptoService, platformUtilsService, diff --git a/src/app/vault/add-edit.component.ts b/src/app/vault/add-edit.component.ts index 326c1a7c..9f204244 100644 --- a/src/app/vault/add-edit.component.ts +++ b/src/app/vault/add-edit.component.ts @@ -13,6 +13,7 @@ import { CollectionService } from 'jslib-common/abstractions/collection.service' import { EventService } from 'jslib-common/abstractions/event.service'; import { FolderService } from 'jslib-common/abstractions/folder.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { PolicyService } from 'jslib-common/abstractions/policy.service'; @@ -39,9 +40,9 @@ export class AddEditComponent extends BaseAddEditComponent implements OnChanges, userService: UserService, collectionService: CollectionService, messagingService: MessagingService, eventService: EventService, policyService: PolicyService, private broadcasterService: BroadcasterService, - private ngZone: NgZone) { + private ngZone: NgZone, logService: LogService) { super(cipherService, folderService, i18nService, platformUtilsService, auditService, stateService, - userService, collectionService, messagingService, eventService, policyService); + userService, collectionService, messagingService, eventService, policyService, logService); } async ngOnInit() { diff --git a/src/app/vault/attachments.component.ts b/src/app/vault/attachments.component.ts index 797f73fb..bb9b6bd9 100644 --- a/src/app/vault/attachments.component.ts +++ b/src/app/vault/attachments.component.ts @@ -4,6 +4,7 @@ import { ApiService } from 'jslib-common/abstractions/api.service'; import { CipherService } from 'jslib-common/abstractions/cipher.service'; import { CryptoService } from 'jslib-common/abstractions/crypto.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { UserService } from 'jslib-common/abstractions/user.service'; @@ -16,7 +17,9 @@ import { AttachmentsComponent as BaseAttachmentsComponent } from 'jslib-angular/ export class AttachmentsComponent extends BaseAttachmentsComponent { constructor(cipherService: CipherService, i18nService: I18nService, cryptoService: CryptoService, userService: UserService, - platformUtilsService: PlatformUtilsService, apiService: ApiService) { - super(cipherService, i18nService, cryptoService, userService, platformUtilsService, apiService, window); + platformUtilsService: PlatformUtilsService, apiService: ApiService, + logService: LogService) { + super(cipherService, i18nService, cryptoService, userService, platformUtilsService, + apiService, window, logService); } } diff --git a/src/app/vault/collections.component.ts b/src/app/vault/collections.component.ts index 18a96fd1..245abc15 100644 --- a/src/app/vault/collections.component.ts +++ b/src/app/vault/collections.component.ts @@ -3,6 +3,7 @@ import { Component } from '@angular/core'; import { CipherService } from 'jslib-common/abstractions/cipher.service'; import { CollectionService } from 'jslib-common/abstractions/collection.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { CollectionsComponent as BaseCollectionsComponent } from 'jslib-angular/components/collections.component'; @@ -13,7 +14,8 @@ import { CollectionsComponent as BaseCollectionsComponent } from 'jslib-angular/ }) export class CollectionsComponent extends BaseCollectionsComponent { constructor(cipherService: CipherService, i18nService: I18nService, - collectionService: CollectionService, platformUtilsService: PlatformUtilsService) { - super(collectionService, platformUtilsService, i18nService, cipherService); + collectionService: CollectionService, platformUtilsService: PlatformUtilsService, + logService: LogService) { + super(collectionService, platformUtilsService, i18nService, cipherService, logService); } } diff --git a/src/app/vault/export.component.ts b/src/app/vault/export.component.ts index 8bf12c2a..f8438b37 100644 --- a/src/app/vault/export.component.ts +++ b/src/app/vault/export.component.ts @@ -10,12 +10,13 @@ import { CryptoService } from 'jslib-common/abstractions/crypto.service'; import { EventService } from 'jslib-common/abstractions/event.service'; import { ExportService } from 'jslib-common/abstractions/export.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; +import { PolicyService } from 'jslib-common/abstractions/policy.service'; import { BroadcasterService } from 'jslib-angular/services/broadcaster.service'; import { ExportComponent as BaseExportComponent } from 'jslib-angular/components/export.component'; -import { PolicyService } from 'jslib-common/abstractions/policy.service'; const BroadcasterSubscriptionId = 'ExportComponent'; @@ -27,8 +28,10 @@ export class ExportComponent extends BaseExportComponent implements OnInit { constructor(cryptoService: CryptoService, i18nService: I18nService, platformUtilsService: PlatformUtilsService, exportService: ExportService, eventService: EventService, policyService: PolicyService, - private broadcasterService: BroadcasterService, private ngZone: NgZone) { - super(cryptoService, i18nService, platformUtilsService, exportService, eventService, policyService, window); + private broadcasterService: BroadcasterService, private ngZone: NgZone, + logService: LogService) { + super(cryptoService, i18nService, platformUtilsService, exportService, eventService, + policyService, window, logService); } async ngOnInit() { diff --git a/src/app/vault/folder-add-edit.component.ts b/src/app/vault/folder-add-edit.component.ts index b1880c33..45d8188b 100644 --- a/src/app/vault/folder-add-edit.component.ts +++ b/src/app/vault/folder-add-edit.component.ts @@ -2,6 +2,7 @@ import { Component } from '@angular/core'; import { FolderService } from 'jslib-common/abstractions/folder.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { @@ -14,7 +15,7 @@ import { }) export class FolderAddEditComponent extends BaseFolderAddEditComponent { constructor(folderService: FolderService, i18nService: I18nService, - platformUtilsService: PlatformUtilsService) { - super(folderService, i18nService, platformUtilsService); + platformUtilsService: PlatformUtilsService, logService: LogService) { + super(folderService, i18nService, platformUtilsService, logService); } } diff --git a/src/app/vault/share.component.ts b/src/app/vault/share.component.ts index d068bd09..0a60c79c 100644 --- a/src/app/vault/share.component.ts +++ b/src/app/vault/share.component.ts @@ -3,6 +3,7 @@ import { Component } from '@angular/core'; import { CipherService } from 'jslib-common/abstractions/cipher.service'; import { CollectionService } from 'jslib-common/abstractions/collection.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; import { UserService } from 'jslib-common/abstractions/user.service'; @@ -15,7 +16,8 @@ import { ShareComponent as BaseShareComponent } from 'jslib-angular/components/s export class ShareComponent extends BaseShareComponent { constructor(cipherService: CipherService, i18nService: I18nService, collectionService: CollectionService, userService: UserService, - platformUtilsService: PlatformUtilsService) { - super(collectionService, platformUtilsService, i18nService, userService, cipherService); + platformUtilsService: PlatformUtilsService, logService: LogService) { + super(collectionService, platformUtilsService, i18nService, userService, cipherService, + logService); } } diff --git a/src/app/vault/view.component.ts b/src/app/vault/view.component.ts index 51b275bd..473ab4b8 100644 --- a/src/app/vault/view.component.ts +++ b/src/app/vault/view.component.ts @@ -13,6 +13,7 @@ import { CipherService } from 'jslib-common/abstractions/cipher.service'; import { CryptoService } from 'jslib-common/abstractions/crypto.service'; import { EventService } from 'jslib-common/abstractions/event.service'; import { I18nService } from 'jslib-common/abstractions/i18n.service'; +import { LogService } from 'jslib-common/abstractions/log.service'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { PasswordRepromptService } from 'jslib-common/abstractions/passwordReprompt.service'; import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service'; @@ -41,10 +42,11 @@ export class ViewComponent extends BaseViewComponent implements OnChanges { auditService: AuditService, broadcasterService: BroadcasterService, ngZone: NgZone, changeDetectorRef: ChangeDetectorRef, userService: UserService, eventService: EventService, apiService: ApiService, - private messagingService: MessagingService, passwordRepromptService: PasswordRepromptService) { + private messagingService: MessagingService, passwordRepromptService: PasswordRepromptService, + logService: LogService) { super(cipherService, totpService, tokenService, i18nService, cryptoService, platformUtilsService, auditService, window, broadcasterService, ngZone, changeDetectorRef, userService, eventService, - apiService, passwordRepromptService); + apiService, passwordRepromptService, logService); } ngOnInit() { super.ngOnInit(); diff --git a/src/main.ts b/src/main.ts index e41ed900..b4d3adb1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -73,7 +73,7 @@ export class Main { storageDefaults[ConstantsService.vaultTimeoutActionKey] = 'lock'; this.storageService = new ElectronStorageService(app.getPath('userData'), storageDefaults); - this.windowMain = new WindowMain(this.storageService, true, undefined, undefined, + this.windowMain = new WindowMain(this.storageService, this.logService, true, undefined, undefined, arg => this.processDeepLink(arg), win => this.trayMain.setupWindowListeners(win)); this.messagingMain = new MessagingMain(this, this.storageService); this.updaterMain = new UpdaterMain(this.i18nService, this.windowMain, 'desktop', () => { diff --git a/src/main/nativeMessaging.main.ts b/src/main/nativeMessaging.main.ts index fbada4ac..23ffc48b 100644 --- a/src/main/nativeMessaging.main.ts +++ b/src/main/nativeMessaging.main.ts @@ -249,7 +249,7 @@ export class NativeMessagingMain { await list(key); await deleteKey(key); } catch { - // Do nothing + this.logService.error(`Unable to delete registry key: ${key}`); } } diff --git a/tslint.json b/tslint.json index 56dfb1f8..86fe8059 100644 --- a/tslint.json +++ b/tslint.json @@ -34,7 +34,7 @@ ] } ], - "no-empty": [ true, "allow-empty-catch" ], + "no-empty": [ true ], "object-literal-sort-keys": false, "object-literal-shorthand": [ true, "never" ], "prefer-for-of": false,