mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 19:53:43 +00:00
add supprot for encrypted json export (#607)
* add supprot for encrypted json export * fix lint issues
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user