mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
add supprot for encrypted json export (#607)
* add supprot for encrypted json export * fix lint issues
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: c9df039fa9...dcbd09e736
@@ -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<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.enableCloseToTray = await this.storageService.get<boolean>(ElectronConstants.enableCloseToTrayKey);
|
||||
this.enableTray = await this.storageService.get<boolean>(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) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<select id="format" name="Format" [(ngModel)]="format">
|
||||
<option value="json">.json</option>
|
||||
<option value="csv">.csv</option>
|
||||
<option value="encrypted_json">.json (Encrypted)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="box-content-row box-content-row-flex" appBoxRow>
|
||||
@@ -32,7 +33,13 @@
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<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>
|
||||
|
||||
@@ -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."
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user