From 2bfba0be5cf572cd83d0165b59f5ca03733fbaa0 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 8 Dec 2020 12:09:31 -0500 Subject: [PATCH] add supprot for encrypted json export (#607) * add supprot for encrypted json export * fix lint issues --- jslib | 2 +- src/app/accounts/settings.component.ts | 10 ++++++---- src/app/vault/export.component.html | 9 ++++++++- src/locales/en/messages.json | 3 +++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/jslib b/jslib index c9df039fa9..dcbd09e736 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit c9df039fa9f392462130b733b4a724a024672866 +Subproject commit dcbd09e736b516b359369f9d9fe5b0f5a6c2a928 diff --git a/src/app/accounts/settings.component.ts b/src/app/accounts/settings.component.ts index 5a949b7611..396eb8dd7f 100644 --- a/src/app/accounts/settings.component.ts +++ b/src/app/accounts/settings.component.ts @@ -69,7 +69,7 @@ export class SettingsComponent implements OnInit { private stateService: StateService, private messagingService: MessagingService, private userService: UserService, private cryptoService: CryptoService) { const isMac = this.platformUtilsService.getDevice() === DeviceType.MacOsDesktop; - + const trayKey = isMac ? 'enableMenuBar' : 'enableTray'; this.enableTrayText = this.i18nService.t(trayKey); this.enableTrayDescText = this.i18nService.t(trayKey + 'Desc'); @@ -85,7 +85,7 @@ export class SettingsComponent implements OnInit { const startToTrayKey = isMac ? 'startToMenuBar' : 'startToTray'; this.startToTrayText = this.i18nService.t(startToTrayKey) this.startToTrayDescText = this.i18nService.t(startToTrayKey + 'Desc'); - + this.vaultTimeouts = [ // { name: i18nService.t('immediately'), value: 0 }, { name: i18nService.t('oneMinute'), value: 1 }, @@ -144,7 +144,8 @@ export class SettingsComponent implements OnInit { const pinSet = await this.vaultTimeoutService.isPinLockSet(); this.pin = pinSet[0] || pinSet[1]; this.disableFavicons = await this.storageService.get(ConstantsService.disableFaviconKey); - this.enableBrowserIntegration = await this.storageService.get(ElectronConstants.enableBrowserIntegration); + this.enableBrowserIntegration = await this.storageService.get( + ElectronConstants.enableBrowserIntegration); this.enableMinToTray = await this.storageService.get(ElectronConstants.enableMinimizeToTrayKey); this.enableCloseToTray = await this.storageService.get(ElectronConstants.enableCloseToTrayKey); this.enableTray = await this.storageService.get(ElectronConstants.enableTrayKey); @@ -317,7 +318,8 @@ export class SettingsComponent implements OnInit { async saveBrowserIntegration() { await this.storageService.save(ElectronConstants.enableBrowserIntegration, this.enableBrowserIntegration); - this.messagingService.send(this.enableBrowserIntegration ? 'enableBrowserIntegration' : 'disableBrowserIntegration'); + this.messagingService.send( + this.enableBrowserIntegration ? 'enableBrowserIntegration' : 'disableBrowserIntegration'); } private callAnalytics(name: string, enabled: boolean) { diff --git a/src/app/vault/export.component.html b/src/app/vault/export.component.html index 513acf791d..d01d72cbf9 100644 --- a/src/app/vault/export.component.html +++ b/src/app/vault/export.component.html @@ -12,6 +12,7 @@
@@ -32,7 +33,13 @@
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 525e9da141..b8e875c74b 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -1215,6 +1215,9 @@ "exportWarningDesc": { "message": "This export contains your vault data in an unencrypted format. You should not store or send the exported file over unsecure channels (such as email). Delete it immediately after you are done using it." }, + "encExportWarningDesc": { + "message": "This export encrypts your data using your account's encryption key. If you ever rotate your account's encryption key you should export again since you will not be able to decrypt this export file." + }, "exportMasterPassword": { "message": "Enter your master password to export your vault data." },