add supprot for encrypted json export (#607)

* add supprot for encrypted json export

* fix lint issues
This commit is contained in:
Kyle Spearrin 2020-12-08 12:09:31 -05:00 committed by GitHub
parent ee1baf7fe3
commit 2bfba0be5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 6 deletions

2
jslib

@ -1 +1 @@
Subproject commit c9df039fa9f392462130b733b4a724a024672866 Subproject commit dcbd09e736b516b359369f9d9fe5b0f5a6c2a928

View File

@ -144,7 +144,8 @@ export class SettingsComponent implements OnInit {
const pinSet = await this.vaultTimeoutService.isPinLockSet(); const pinSet = await this.vaultTimeoutService.isPinLockSet();
this.pin = pinSet[0] || pinSet[1]; this.pin = pinSet[0] || pinSet[1];
this.disableFavicons = await this.storageService.get<boolean>(ConstantsService.disableFaviconKey); this.disableFavicons = await this.storageService.get<boolean>(ConstantsService.disableFaviconKey);
this.enableBrowserIntegration = await this.storageService.get<boolean>(ElectronConstants.enableBrowserIntegration); this.enableBrowserIntegration = await this.storageService.get<boolean>(
ElectronConstants.enableBrowserIntegration);
this.enableMinToTray = await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey); this.enableMinToTray = await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey);
this.enableCloseToTray = await this.storageService.get<boolean>(ElectronConstants.enableCloseToTrayKey); this.enableCloseToTray = await this.storageService.get<boolean>(ElectronConstants.enableCloseToTrayKey);
this.enableTray = await this.storageService.get<boolean>(ElectronConstants.enableTrayKey); this.enableTray = await this.storageService.get<boolean>(ElectronConstants.enableTrayKey);
@ -317,7 +318,8 @@ export class SettingsComponent implements OnInit {
async saveBrowserIntegration() { async saveBrowserIntegration() {
await this.storageService.save(ElectronConstants.enableBrowserIntegration, this.enableBrowserIntegration); 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) { private callAnalytics(name: string, enabled: boolean) {

View File

@ -12,6 +12,7 @@
<select id="format" name="Format" [(ngModel)]="format"> <select id="format" name="Format" [(ngModel)]="format">
<option value="json">.json</option> <option value="json">.json</option>
<option value="csv">.csv</option> <option value="csv">.csv</option>
<option value="encrypted_json">.json (Encrypted)</option>
</select> </select>
</div> </div>
<div class="box-content-row box-content-row-flex" appBoxRow> <div class="box-content-row box-content-row-flex" appBoxRow>
@ -32,7 +33,13 @@
</div> </div>
<div class="box-footer"> <div class="box-footer">
<p>{{'exportMasterPassword' | i18n}}</p> <p>{{'exportMasterPassword' | i18n}}</p>
<strong>{{'warning' | i18n}}</strong>: {{'exportWarningDesc' | i18n}} <strong>{{'warning' | i18n}}</strong>:
<span *ngIf="!encryptedFormat">
{{'exportWarningDesc' | i18n}}
</span>
<span *ngIf="encryptedFormat">
{{'encExportWarningDesc' | i18n}}
</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1215,6 +1215,9 @@
"exportWarningDesc": { "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." "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": { "exportMasterPassword": {
"message": "Enter your master password to export your vault data." "message": "Enter your master password to export your vault data."
}, },