6 Commits
Author SHA1 Message Date
Suzu008 a58a5b8917 refactor(sw): bidirectional SW status sync with IndexedDB persistence
Replace fire-and-forget key delivery with a sync-status protocol that
verifies key consistency between main thread and Service Worker using
SHA-256 fingerprints via MessageChannel request-response.

- SW (ts/sw.ts): persist keys in IndexedDB, auto-restore on activate;
  respond to sync-status queries with loaded keys + fingerprints;
  support cryptio-clear-keys to wipe memory + DB.
- New ts/utils/swSync.ts: single entry point for SW registration,
  key sync, and status verification. Controller change listener
  re-syncs on SW restart. Deduplicates concurrent sync calls.
- Deleted ts/utils/swKeySender.ts (replaced by swSync.ts).
- Remove SW registration (~55 lines) from cryptioSaveImage.ts;
  setup() now calls syncSWStatus().
- uploadUtils.ts: drop 5-retry preview loop (~6.4s worst case);
  single attempt with syncSWStatus fallback on failure.
- cryptioSettings.ts: sync after key changes; clearSWKeys() on
  Clear All.
- cryptioUploadImage/Video.ts: syncSWStatus in setup + preview
  fallback.
- types.ts: add SWStatus interface.
2026-05-30 22:29:45 +08:00
Suzu008 8a335dbaee refactor: improve type safety with custom interfaces (Fix 11) 2026-03-24 20:59:40 +08:00
Suzu008 ab1746b5e8 fix: prevent blob URL memory leaks by tracking and revoking URLs on re-execution and node removal 2026-03-24 08:43:17 +08:00
Suzu008 05ac7e0542 refactor(utils): 重构加密文件处理工具模块
将加密文件处理相关功能拆分为独立工具模块,包括文件工具、上传工具、图片加载工具和加密工具

重构 cryptioSaveImage.ts 和 cryptioUploadImage.ts,使用新的工具模块替换原有代码
2025-10-12 06:34:57 +08:00
Suzu008 790907bdf6 feat(cryptio): 添加自动下载解密图片功能
为SaveImageCryptIO和PreviewImageCryptIO类添加auto_download参数,当设置为true时自动下载解密后的图片。同时在TS端实现自动下载逻辑,通过创建临时链接触发浏览器下载行为。
2025-10-12 06:21:15 +08:00
Suzu008 5f1f993559 feat(cryptio): 添加加密图片保存和预览功能
实现加密图片保存(SaveImageCryptIO)和预览(PreviewImageCryptIO)节点
修改上传组件支持加密文件直接上传
添加前端解密逻辑用于预览加密图片
2025-10-12 05:56:36 +08:00