From eaf8c4998edde8f95cce297b67d9979cceb37a15 Mon Sep 17 00:00:00 2001 From: antoKeinanen Date: Mon, 5 Jun 2023 13:27:06 +0300 Subject: [PATCH] feat: add password protection for required inputs --- src/CmdSetupLiveSync.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CmdSetupLiveSync.ts b/src/CmdSetupLiveSync.ts index 9243eda..8565a3b 100644 --- a/src/CmdSetupLiveSync.ts +++ b/src/CmdSetupLiveSync.ts @@ -41,7 +41,7 @@ export class SetupLiveSync extends LiveSyncCommands { async realizeSettingSyncMode() { } async command_copySetupURI() { - const encryptingPassphrase = await askString(this.app, "Encrypt your settings", "The passphrase to encrypt the setup URI", ""); + const encryptingPassphrase = await askString(this.app, "Encrypt your settings", "The passphrase to encrypt the setup URI", "", true); if (encryptingPassphrase === false) return; const setting = { ...this.settings, configPassphraseStore: "", encryptedCouchDBConnection: "", encryptedPassphrase: "" }; @@ -57,7 +57,7 @@ export class SetupLiveSync extends LiveSyncCommands { Logger("Setup URI copied to clipboard", LOG_LEVEL.NOTICE); } async command_copySetupURIFull() { - const encryptingPassphrase = await askString(this.app, "Encrypt your settings", "The passphrase to encrypt the setup URI", ""); + const encryptingPassphrase = await askString(this.app, "Encrypt your settings", "The passphrase to encrypt the setup URI", "", true); if (encryptingPassphrase === false) return; const setting = { ...this.settings, configPassphraseStore: "", encryptedCouchDBConnection: "", encryptedPassphrase: "" }; @@ -81,7 +81,7 @@ export class SetupLiveSync extends LiveSyncCommands { async setupWizard(confString: string) { try { const oldConf = JSON.parse(JSON.stringify(this.settings)); - const encryptingPassphrase = await askString(this.app, "Passphrase", "The passphrase to decrypt your setup URI", ""); + const encryptingPassphrase = await askString(this.app, "Passphrase", "The passphrase to decrypt your setup URI", "", true); if (encryptingPassphrase === false) return; const newConf = await JSON.parse(await decrypt(confString, encryptingPassphrase, false));