Commit Graph
25 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 28abb6388d fix: filter encrypted uploads by supported media types 2026-05-28 15:10:39 +08:00
Suzu008 a90d6ac461 refactor: 更新密钥保存位置 2025-12-10 04:06:19 +08:00
Suzu008 958f78164f feat: 为图片节点添加图片格式和保存质量组件 2025-12-10 04:05:46 +08:00
Suzu008 a943462bbd refactor(cryptio): 优化视频保存逻辑,统一处理重封装和重新编码 2025-12-10 02:40:21 +08:00
Suzu008 5a59b11db7 fix: change input field name for text encryption node 2025-11-26 18:33:43 +08:00
Suzu008 68edf1af62 refactor: clean up code structure and improve category labels in CryptIO components 2025-11-26 18:23:05 +08:00
Suzu008 ec92bf6b4a refactor(api): 改进加密文件名生成逻辑
使用更安全的随机字符串生成方法,并保留原始文件名特征
确保生成的文件名唯一且避免冲突
2025-10-13 05:30:22 +08:00
Suzu008 c454a7d015 refactor(cryptio): 使用内存缓冲区替代临时文件保存视频
移除临时文件操作,改为使用BytesIO内存缓冲区处理视频数据,避免明文写入磁盘
同时将工作流元数据直接嵌入视频文件,不再单独保存JSON文件
2025-10-13 05:07:44 +08:00
Suzu008 b5a62ef000 feat(视频处理): 添加视频加密上传、保存和预览功能
- 实现视频文件的上传、加密保存和解密预览功能
- 新增视频加载器模块处理视频解密和预览
- 扩展文件工具类支持更多视频格式
- 添加前端组件处理视频上传和预览交互
2025-10-13 04:46:45 +08:00
Suzu008 9d4953d427 refactor(cryptio): 重构文本加密解密节点并添加前端实现
将ClientEncrypt和ServerDecrypt合并为TextEncrypt和TextDecrypt节点
添加前端TypeScript实现处理加密解密逻辑
更新节点显示名称并添加加密图标标识
修复Python导入警告并添加类型忽略注释
2025-10-12 15:00:48 +08:00
Suzu008 2ebf987648 refactor(cryptio): 重构密钥管理模块并优化加密功能
将密钥管理逻辑从 keys.py 迁移到 utils 模块,实现 KeyManager 单例类
新增 crypto_utils 模块集中管理加密/解密功能
优化混合加密方案实现,提高代码复用性和可维护性
2025-10-12 13:30:29 +08:00
Suzu008 6ed9ea5b1f refactor(crypto): 重构加密模块以支持不同密钥场景
- 将通用加密解密逻辑提取为内部函数
- 添加针对不同场景的加密解密方法(服务端/客户端密钥)
- 更新相关调用代码以使用新的加密方法
- 改进注释和类型定义
2025-10-12 07:04:20 +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
Suzu008 b065ca33b6 feat(上传): 添加拖放和粘贴支持并重构上传逻辑
- 将上传逻辑提取为通用方法handleFileUpload
- 为上传组件添加拖放和粘贴支持
- 更新上传参数从image_upload改为file_upload
2025-10-12 03:57:16 +08:00
Suzu008 d449590ac3 fix: remove not exist arg 2025-10-12 01:29:37 +08:00
Suzu008 b2ef9c8f7a fix: get gcm key 2025-10-12 01:29:05 +08:00
Suzu008 355cd52d8c remote redundant code, remove original upload widget 2025-10-12 01:14:59 +08:00
Suzu008 e5d09afc01 view_encrypted respond with binary 2025-10-11 21:01:39 +08:00
Suzu008 a5ba357ed7 upload Image cryptio and key exchange 2025-10-11 18:46:44 +08:00
Suzu008 268d5559b4 uploadImage cryptIO temp 2025-10-11 18:33:16 +08:00
Suzu008 72eeea8dfa sepate files 2025-10-11 10:30:47 +08:00
Suzu008 7f1e7be330 all in one key file 2025-10-11 09:57:18 +08:00
Suzu008 e73210e612 first 2025-10-11 04:44:55 +08:00