From 6bbfe665cd609d12e2e85f5af7cb56ce19f2c606 Mon Sep 17 00:00:00 2001 From: LC mac Date: Thu, 29 Jan 2026 23:18:29 +0800 Subject: [PATCH] bug fix app.tsx --- src/App.tsx | 2 +- src/components/ReadOnly.tsx | 2 +- src/lib/sessionCrypto.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 5e3e1b0..e04b39c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -23,7 +23,7 @@ import { StorageIndicator } from './components/StorageIndicator'; import { SecurityWarnings } from './components/SecurityWarnings'; import { ClipboardTracker } from './components/ClipboardTracker'; import { ReadOnly } from './components/ReadOnly'; -import { getSessionKey, encryptJsonToBlob, decryptBlobToJson, destroySessionKey, EncryptedBlob } from './lib/sessionCrypto'; +import { encryptJsonToBlob, destroySessionKey, EncryptedBlob } from './lib/sessionCrypto'; console.log("OpenPGP.js version:", openpgp.config.versionString); diff --git a/src/components/ReadOnly.tsx b/src/components/ReadOnly.tsx index a2e35e0..501315c 100644 --- a/src/components/ReadOnly.tsx +++ b/src/components/ReadOnly.tsx @@ -1,4 +1,4 @@ -import { Shield, WifiOff } from 'lucide-react'; +import { WifiOff } from 'lucide-react'; type ReadOnlyProps = { isReadOnly: boolean; diff --git a/src/lib/sessionCrypto.ts b/src/lib/sessionCrypto.ts index 4c4cb35..83898b9 100644 --- a/src/lib/sessionCrypto.ts +++ b/src/lib/sessionCrypto.ts @@ -88,7 +88,7 @@ export async function encryptJsonToBlob(data: T): Promise { const ciphertext = await window.crypto.subtle.encrypt( { name: KEY_ALGORITHM, - iv: iv, + iv: iv as Uint8Array, }, sessionKey, plaintext,