Commit graph

75 commits

Author SHA1 Message Date
Luis Alberto Jaramillo Gonzalez
81ff801005
chore: update version to 1.2.0 in package-lock.json 2026-05-30 17:56:09 -05:00
Luis Alberto Jaramillo Gonzalez
0fef6f6ee7
fix: resolve three settings bugs and add passphrase prompt for signing (v1.2.0)
- Sign key dropdown was empty when switching from openpgpjs to CLI because
  RefreshLibrary never repopulated it with native GPG keys; now calls
  RefreshListSign on library switch and resets the "sign" sentinel to "0".

- Library dropdown did not persist the selection on change, causing pgpLibrary
  to revert to "openpgpjs" on reload and triggering the PassphraseModal
  unexpectedly during CLI decryption; fixed by calling saveSettings() in
  the dropdown onChange handler.

- Sign key dropdown appeared twice when RefreshListSign was called concurrently
  (e.g. from display() and RefreshLibrary); fixed with a generation counter
  that discards stale async results before addDropdown() is called.

- Encrypt with openpgpjs + signing enabled threw "signing key is not decrypted"
  when the passphrase field was left blank; EncryptText() now resolves the
  passphrase from cache/settings or prompts via PassphraseModal before calling
  gpgEncrypt(), and caches it after a successful sign+encrypt.
2026-05-27 14:22:19 -05:00
lajg
69c8e661a1
Merge pull request #11 from czarau/feat/openpgpjs-backend
Implement the openpgpjs backend (desktop + mobile support)
2026-05-27 13:26:25 -05:00
scott
99b77ff3c2 [Implement the openpgpjs encryption backend that 1.1.5 already scaffolds
in settings. Selecting the "openpgpjs" GPG Library now performs all
crypto in-app via OpenPGP.js instead of the native gpg binary, so the
plugin works on mobile (Android/iOS) as well as desktop. The native
"CLI commands" path is unchanged and remains the choice for OS keychain
and YubiKey users.]

feat: implement OpenPGP.js backend for mobile support

The pgpLibrary setting and its "openpgpjs" option already existed in
1.1.5, but choosing it hid the native UI without providing an
implementation. This adds that implementation as an opt-in second
backend, leaving the native gpg path fully intact.

Changes:
- src/openpgp.ts: OpenPGP.js getListPublicKey/gpgEncrypt/gpgDecrypt,
  an in-memory passphrase cache, and browser-safe base64 helpers.
- src/PassphraseModal.ts: prompts for the private-key passphrase
  (mobile has no pinentry/gpg-agent).
- src/gpg.ts: the three crypto functions dispatch on settings.pgpLibrary;
  child_process is now required lazily so the module loads on mobile.
- src/Settings.ts: adds pgpPublicKeyArmored, pgpPrivateKeyArmored,
  pgpPassphrase, pgpPassphraseCacheMinutes; guards process.platform.
- src/SettingsTab.ts: renders armored-key/passphrase/cache UI in the
  openpgpjs branch (instead of only hiding native settings); fs is now
  required lazily; hides the native sign toggle in openpgpjs mode.
- src/EncryptModal.ts / src/DecryptPreviewModal.ts: openpgpjs branches
  (single configured key, passphrase prompt + cache, browser-safe base64).
- manifest.json: isDesktopOnly false. styles.css: .gpg-key-textarea.
- README.md: documents the openpgpjs library option.

The base64 wire format is identical between backends, so blocks encrypted
with native gpg and with OpenPGP.js are interchangeable for the same key.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 11:17:31 +10:00
Luis Alberto Jaramillo Gonzalez
8348870d2d
chore: update devDependencies and dependencies to latest versions 2026-05-05 11:46:45 -05:00
Luis Alberto Jaramillo Gonzalez
c202ed7f32
Update version to 1.1.5 2025-12-03 12:02:35 -05:00
Luis Alberto Jaramillo Gonzalez
36fd5b9a2d
Fix issue decrypting in blocks, tables and callouts 2025-12-03 11:23:21 -05:00
Luis Alberto Jaramillo Gonzalez
3f486ca5c2
Add validation if users hit Restore plain text to document in reading mode 2025-12-03 09:25:24 -05:00
Luis Alberto Jaramillo Gonzalez
a2ab8a96b0
Fix bug with inline decrypt button in live preview 2025-12-03 09:16:42 -05:00
Luis Alberto Jaramillo Gonzalez
da4af989ad
Add support in Reading Mode to preview the decrypt button 2025-12-03 08:56:42 -05:00
Luis Alberto Jaramillo Gonzalez
59913688b7
Update npm libraries 2025-12-03 08:06:59 -05:00
lajg
8c710709aa
Merge pull request #7 from lajg-dev/dependabot/npm_and_yarn/npm_and_yarn-392d5e510b
Bump esbuild from 0.17.3 to 0.25.0 in the npm_and_yarn group across 1 directory
2025-02-18 11:01:44 -05:00
dependabot[bot]
64bee7155b
Bump esbuild in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.17.3 to 0.25.0
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.17.3...v0.25.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 04:43:40 +00:00
Luis Alberto Jaramillo Gonzalez
8ac29c9a38
Rearraange the settings tab 2024-10-29 21:34:33 -05:00
Luis Alberto Jaramillo Gonzalez
3441bbd066
Add GPG Library dropdown 2024-10-29 20:36:34 -05:00
Luis Alberto Jaramillo Gonzalez
13062783f1
New setting tab to show whole GPG command in Obsidian Developer Console 2024-08-25 19:59:04 -05:00
Luis Alberto Jaramillo Gonzalez
99fc63f12f
Creating a new 1.1.3 version 2024-08-25 19:15:29 -05:00
Luis Alberto Jaramillo Gonzalez
b537539e4b
Fix the issue Error: 'C:\Program' is not recognized as an internal or external command 2024-08-25 19:13:17 -05:00
Luis Alberto Jaramillo Gonzalez
a5ed3de902
Fix the version number 2024-08-14 12:29:15 -05:00
Luis Alberto Jaramillo Gonzalez
c90889c15a
Fix issue installing plugin 2024-08-14 12:25:31 -05:00
Luis Alberto Jaramillo Gonzalez
2c6d745144
Add new feacture to include add a before and after gpg command 2024-08-14 12:09:26 -05:00
Luis Alberto Jaramillo Gonzalez
fb4d99fcf0
Add MIT License 2024-04-02 08:29:23 -05:00
Luis Alberto Jaramillo Gonzalez
fc42009b73
Add new version 1.0.7 2024-04-02 07:43:51 -05:00
Luis Alberto Jaramillo Gonzalez
0b3d9aaab2
MIT License 2024-04-02 07:42:06 -05:00
Luis Alberto Jaramillo Gonzalez
7abafe9e23
Add credits in readme 2024-04-01 10:32:53 -05:00
Luis Alberto Jaramillo Gonzalez
e199e22dc3
Upgrade to 1.0.6 version 2024-03-08 15:17:32 -05:00
Luis Alberto Jaramillo Gonzalez
a49d860162
Added default GPG key configuration to encrypt text 2024-03-08 15:16:15 -05:00
Luis Alberto Jaramillo Gonzalez
6202d643f1
Upgrade version to 1.0.5 2024-03-03 13:01:48 -05:00
Luis Alberto Jaramillo Gonzalez
2c53c9ed9d
Add function to set default path acording to OS 2024-03-03 12:16:24 -05:00
Luis Alberto Jaramillo Gonzalez
264a40a95f
Fix all versions in *.json files 2024-02-19 09:52:15 -05:00
Luis Alberto Jaramillo Gonzalez
af8b0dd9ae
Fix author information 2024-02-08 09:24:17 -05:00
Luis Alberto Jaramillo Gonzalez
fc5fb98177
Fix minor changes in UI 2024-02-08 09:15:50 -05:00
Luis Alberto Jaramillo Gonzalez
93ef091c28
Adjust gitlab-ci.yml file name 2024-02-08 09:08:58 -05:00
Luis Alberto Jaramillo Gonzalez
8ddb1679ee
Include GitLab Pipeline in personal repository 2024-02-08 09:07:22 -05:00
Luis Alberto Jaramillo Gonzalez
afe8979f7a
Lauch new version 1.0.1 with bug fixes 2024-01-24 12:02:41 -05:00
Luis Alberto Jaramillo Gonzalez
e459fea2cc
Bug fix in windows os 2024-01-24 12:01:41 -05:00
lajg
9ae3e58e4b
Update DecryptPreviewModal.ts 2024-01-24 02:14:16 -05:00
Luis Alberto Jaramillo Gonzalez
8f93b8884e
Some extra info to decrypt in readme 2024-01-23 17:39:09 -05:00
Luis Alberto Jaramillo Gonzalez
dbfbd5953e
Some readme instructions 2024-01-23 17:27:27 -05:00
lajg
623464e1ea
Create LICENSE 2024-01-23 12:40:52 -05:00
Luis Alberto Jaramillo Gonzalez
6a9fec4e8b
readme.md 2024-01-23 12:35:34 -05:00
Luis Alberto Jaramillo Gonzalez
1a4c73fc76
Add extra info in decrypt 2024-01-23 12:28:10 -05:00
Luis Alberto Jaramillo Gonzalez
54e8b17307
Restore plain text to document function works now 2024-01-23 12:09:24 -05:00
Luis Alberto Jaramillo Gonzalez
8292082fec
Decrypt modal is working now 2024-01-23 10:31:05 -05:00
Luis Alberto Jaramillo Gonzalez
aa068f9184
Rearrange encrypt/decrypt results 2024-01-23 08:46:52 -05:00
Luis Alberto Jaramillo Gonzalez
184fa9f8ad
Create decrypt method 2024-01-22 21:31:28 -05:00
Luis Alberto Jaramillo Gonzalez
08dfc04a23
Create decrypt preview modal 2024-01-22 21:12:18 -05:00
Luis Alberto Jaramillo Gonzalez
b31416ceea
Copy to clipboard works now 2024-01-22 17:21:31 -05:00
Luis Alberto Jaramillo Gonzalez
902591b565
Add setting to Always Trust in Keys 2024-01-22 17:16:12 -05:00
Luis Alberto Jaramillo Gonzalez
abc3160a82
Some progress in Decrypt modal 2024-01-22 11:55:18 -05:00