From d4d5807342570292fc7f931af847bb6a00b84634 Mon Sep 17 00:00:00 2001 From: LC mac Date: Sun, 8 Feb 2026 01:45:37 +0800 Subject: [PATCH] fix: Improve MESSAGE PASSWORD contrast and add global Buffer polyfill shim --- src/App.tsx | 2 +- src/main.tsx | 2 ++ src/polyfills.ts | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/polyfills.ts diff --git a/src/App.tsx b/src/App.tsx index 8071ea1..db5637c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -621,7 +621,7 @@ function App() { readOnly={isReadOnly} /> -

+

{encryptionMode === 'krux' ? 'Required passphrase for Krux encryption' : 'Symmetric encryption password (SKESK)'} diff --git a/src/main.tsx b/src/main.tsx index a56c151..ad310dd 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,3 +1,5 @@ +import './polyfills'; + // Suppress OpenPGP.js AES cipher warnings const originalWarn = console.warn; const originalError = console.error; diff --git a/src/polyfills.ts b/src/polyfills.ts new file mode 100644 index 0000000..463a513 --- /dev/null +++ b/src/polyfills.ts @@ -0,0 +1,7 @@ +import { Buffer } from 'buffer'; + +// Make Buffer available globally for libraries that expect it +if (typeof window !== 'undefined') { + (window as any).Buffer = Buffer; + (window as any).global = window; +} \ No newline at end of file