From 60af6b3d49859a7104ac4a1688591d1340cb2082 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Wed, 21 Apr 2021 08:48:06 -0500 Subject: [PATCH] Update jslib --- jslib | 2 +- src/app/services.module.ts | 6 ++++++ src/app/vault/view.component.ts | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/jslib b/jslib index 66eec2b022..1f62b22285 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 66eec2b02260ce41227e83153020f561d105b1ba +Subproject commit 1f62b22285a13d0088b5424c96013cc8589d0242 diff --git a/src/app/services.module.ts b/src/app/services.module.ts index d3caa7ce3e..e0f3e5c20d 100644 --- a/src/app/services.module.ts +++ b/src/app/services.module.ts @@ -38,6 +38,7 @@ import { FileUploadService } from 'jslib/services/fileUpload.service'; import { FolderService } from 'jslib/services/folder.service'; import { NotificationsService } from 'jslib/services/notifications.service'; import { PasswordGenerationService } from 'jslib/services/passwordGeneration.service'; +import { PasswordRepromptService } from 'jslib/services/passwordReprompt.service'; import { PolicyService } from 'jslib/services/policy.service'; import { SearchService } from 'jslib/services/search.service'; import { SendService } from 'jslib/services/send.service'; @@ -71,6 +72,9 @@ import { NotificationsService as NotificationsServiceAbstraction } from 'jslib/a import { PasswordGenerationService as PasswordGenerationServiceAbstraction, } from 'jslib/abstractions/passwordGeneration.service'; +import { + PasswordRepromptService as PasswordRepromptServiceAbstraction +} from 'jslib/abstractions/passwordReprompt.service'; import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from 'jslib/abstractions/platformUtils.service'; import { PolicyService as PolicyServiceAbstraction } from 'jslib/abstractions/policy.service'; import { SearchService as SearchServiceAbstraction } from 'jslib/abstractions/search.service'; @@ -121,6 +125,7 @@ const syncService = new SyncService(userService, apiService, settingsService, folderService, cipherService, cryptoService, collectionService, storageService, messagingService, policyService, sendService, async (expired: boolean) => messagingService.send('logout', { expired: expired })); const passwordGenerationService = new PasswordGenerationService(cryptoService, storageService, policyService); +const passwordRepromptService = new PasswordRepromptService(i18nService, cryptoService, platformUtilsService); const totpService = new TotpService(storageService, cryptoFunctionService); const containerService = new ContainerService(cryptoService); const authService = new AuthService(cryptoService, apiService, userService, tokenService, appIdService, @@ -198,6 +203,7 @@ export function initFactory(): Function { { provide: CryptoServiceAbstraction, useValue: cryptoService }, { provide: CryptoFunctionServiceAbstraction, useValue: cryptoFunctionService }, { provide: PlatformUtilsServiceAbstraction, useValue: platformUtilsService }, + { provide: PasswordRepromptServiceAbstraction, useValue: passwordRepromptService }, { provide: PasswordGenerationServiceAbstraction, useValue: passwordGenerationService }, { provide: ApiServiceAbstraction, useValue: apiService }, { provide: SyncServiceAbstraction, useValue: syncService }, diff --git a/src/app/vault/view.component.ts b/src/app/vault/view.component.ts index 949b3ec737..3b086eb50e 100644 --- a/src/app/vault/view.component.ts +++ b/src/app/vault/view.component.ts @@ -13,6 +13,7 @@ import { CryptoService } from 'jslib/abstractions/crypto.service'; import { EventService } from 'jslib/abstractions/event.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; +import { PasswordRepromptService } from 'jslib/abstractions/passwordReprompt.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { StorageService } from 'jslib/abstractions/storage.service'; import { TokenService } from 'jslib/abstractions/token.service'; @@ -39,10 +40,11 @@ export class ViewComponent extends BaseViewComponent implements OnChanges { cryptoService: CryptoService, platformUtilsService: PlatformUtilsService, auditService: AuditService, broadcasterService: BroadcasterService, ngZone: NgZone, changeDetectorRef: ChangeDetectorRef, - userService: UserService, eventService: EventService, + userService: UserService, eventService: EventService, passwordRepromptService: PasswordRepromptService, private messagingService: MessagingService, private storageService: StorageService) { super(cipherService, totpService, tokenService, i18nService, cryptoService, platformUtilsService, - auditService, window, broadcasterService, ngZone, changeDetectorRef, userService, eventService); + auditService, window, broadcasterService, ngZone, changeDetectorRef, userService, eventService, + passwordRepromptService); } ngOnInit() { super.ngOnInit(); @@ -71,7 +73,7 @@ export class ViewComponent extends BaseViewComponent implements OnChanges { this.onViewCipherPasswordHistory.emit(this.cipher); } - copy(value: string, typeI18nKey: string, aType: string) { + async copy(value: string, typeI18nKey: string, aType: string) { super.copy(value, typeI18nKey, aType); this.messagingService.send('minimizeOnCopy'); }