Commit Graph

109 Commits

Author SHA1 Message Date
Jokul a20730f1e5 feat: 键 tab 自动打开, 去掉右上角键按钮
- keys tab 和 status tab 一样不可关闭 (closable: false)
- 连接成功时自动打开 status + keys 两个 tab
- 右上角按钮组移除键按钮
2026-07-11 16:23:12 +08:00
Jokul 8dfd3aecad hash的保存和删除按钮宽度修改 2026-07-11 16:13:44 +08:00
Jokul ff83315b64 style: HashEditor 按钮一排显示 + 颜色对比 + TTL 内联编辑
- 去掉设置 TTL 按钮, TTL 列改为 el-input-number 内联编辑
- saveField 保存时一并提交 TTL (HEXPIRE)
- 保存和删除按钮改为一排显示 (列宽 120px)
- 按钮从 text 改为 outline 样式, 确保浅色模式下文字可见
- 移除 setFieldTtl 函数和 .field-ttl 样式
2026-07-11 16:06:17 +08:00
Jokul 53ffa1043c style: HashEditor 表格高度适配 + 文字颜色对比
- max-height=400 改为 height=100%, 表格填满剩余空间
- hash-table-wrap overflow hidden + min-height:0 配合 flex 布局
- 表格正文文字用 --text-primary (深色模式下白色)
- 表头用 --text-secondary + --bg-tertiary 背景
- 行悬停用 --bg-hover
- 输入框文字用 --text-primary 确保可读性
2026-07-11 15:58:37 +08:00
Jokul 78695c0b7f fix: WRONGTYPE 错误处理 - key 类型变更时不崩溃
- loadKeyData: 类型特定命令 (SCARD/LLEN 等) 失败时重新获取 key 类型,
  避免显示错误的编辑器
- SetEditor.loadMembers: 添加 catch 块, WRONGTYPE 时清空成员列表而非
  抛出未捕获异常
2026-07-11 15:52:33 +08:00
Jokul 99f8a8b250 fix: keyStore.selectedType (string | null) 传参类型不匹配 2026-07-11 15:44:13 +08:00
Jokul 54350b152e fix: 移除空 CSS 规则 .leaf-item 2026-07-11 15:42:31 +08:00
Jokul a782180dd3 Revert "feat: 树状视图路径压缩 - 单子节点文件夹自动合并"
This reverts commit ccb91731fc.
2026-07-11 15:37:33 +08:00
Jokul ccb91731fc feat: 树状视图路径压缩 - 单子节点文件夹自动合并
文件夹只有 1 个子节点时合并名称, 避免不必要的层级展开:
- a:b:c:d (单个 key) 直接显示为 a:b:c:d 而非 4 层嵌套
- a:b:c + a:b:d 仍展开为 a > b > {c, d} (b 有 2 个子节点)
- a:b:c + a:d:e 显示为 a > {b:c, d:e} (b/d 各 1 子节点, 合并)
2026-07-11 15:35:06 +08:00
Jokul 4305773f0d refactor: KeyList 移除列表模式, 只保留树状模式
- 移除 viewMode、虚拟滚动 (useVirtualizer)、scrollRef
- 移除列表视图模板和样式 (.key-flat-list, .key-item 等)
- 移除工具栏的列表/树状切换按钮
- 树状叶子节点新增多选 checkbox (原先只有列表模式有)
- 保留 .key-checkbox 样式供树状多选使用
2026-07-11 15:30:56 +08:00
Jokul 5a479d416e refactor: Scan Count 从全局设置移到连接配置
- ConnectionConfig 新增 scanCount 字段 (默认 100)
- NewConnectionDialog 基本信息区新增 Scan Count 输入框
- key.ts 改为从 activeConnection.scanCount 读取
- SettingsView 移除 Scan Count 设置项
- app store 移除 scanCount 和 setScanCount
- 主进程 store ConnectionConfig 同步新增字段
2026-07-11 15:22:58 +08:00
Jokul ac0e6af233 fix: key scan 使用 app store 的 scanCount 设置替代硬编码 100 2026-07-11 15:18:21 +08:00
Jokul fd40207af5 fix: 树状视图展开文件夹为空 - 递归拍平渲染
原模板只遍历 treeData 根级节点, 从不渲染 node.children, 导致展开后为空。
改为 flattenedTree computed 将树拍平为列表:
- 只包含已展开文件夹的子节点
- 每项带 level 用于缩进 (paddingLeft)
- 文件夹和叶子节点在列表中按正确顺序排列
- 叶子节点支持 active/selected 高亮和右键菜单
2026-07-11 15:13:51 +08:00
Jokul 4602ec5979 fix: vItem.key 类型 Key (含 bigint) 转为 String 兼容 Vue :key 2026-07-11 15:10:25 +08:00
Jokul 16175a4635 fix: 移除渲染进程中的 Buffer 调用, 改用浏览器兼容的 hex 转换
- binary.ts 新增 strToHex/hexToStr/binaryToHex/hexToBinary 四个函数
- KeyList.vue 导入导出功能用这些函数替代 Buffer.from()
- 渲染进程无 Node.js 访问权限, 不应使用 Buffer 全局对象
2026-07-11 15:09:23 +08:00
Jokul 8f6bf7841c fix: KeyList useVirtualizer getScrollElement 类型不匹配 (undefined -> null) 2026-07-11 15:06:55 +08:00
Jokul f6b85106a2 style: 优化连接弹窗 - 分区折叠 + 视觉层次
- 基本连接信息始终显示, 带卡片背景和图标标题
- TLS/Sentinel/Cluster/SSH 改为可折叠面板, 默认折叠
- 折叠标题显示已启用标签 (Enabled tag)
- 内联样式替换为 CSS 类 (.file-input-row, .form-input)
- 弹窗宽度 520px -> 580px
- 深色/浅色主题适配
2026-07-11 14:55:39 +08:00
Jokul 6be62e0fe6 style: Key Statistics 表格列宽合理分配, 全部 min-width 拉满 2026-07-11 14:36:35 +08:00
Jokul 0d55b10822 fix: Key Statistics 表格宽度拉满 2026-07-11 14:34:13 +08:00
Jokul 823652e418 fix: 配置 renderer publicDir 指向项目根 public/ 2026-07-11 14:24:28 +08:00
Jokul c68306b26b feat: 标题栏和占位图使用 icon.svg 替代 JRD 文字 2026-07-11 14:22:07 +08:00
Jokul 5da3462131 fix: 移除 tsconfig.web.json 中已弃用的 baseUrl 2026-07-11 01:03:44 +08:00
Jokul 56e0b05b6b fix: Linux 开发模式任务栏图标与 VS Code 归为一组
开发模式下 electron 进程 WM_CLASS 默认为 "Electron",导致桌面环境
将其与其他 Electron 应用(如 VS Code)归为一组并使用其图标。
在 app.whenReady 前调用 app.setName('JRedisDesktop') 修正 WM_CLASS。
2026-07-11 01:00:29 +08:00
Jokul d804e377a3 fix: 右键菜单删除项使用 common.delete i18n key 2026-07-11 00:33:21 +08:00
Jokul 260cbb36d0 fix: 右键删除国际化 + 移除连接卡片左键事件
- 修复删除确认弹窗使用正确的 i18n key (connection.deleteConfirm)
- 删除按钮使用 common.delete 而非不存在的 connection.delete
- 新增 switchTo i18n key (5 种语言)
- ConnectionCard 移除 @click 左键事件
- 右键菜单新增「切换到」选项 (已连接但非活跃时显示)
2026-07-11 00:30:47 +08:00
Jokul b032c15164 feat: 连接卡片右键菜单 (连接/断开、编辑、复制、删除)
- ConnectionCard 移除悬浮操作按钮, 简化为纯展示+左键连接
- ConnectionList 新增右键上下文菜单 (Teleport to body)
- 菜单项: 连接/断开(按状态切换)、编辑、复制连接、删除
- 删除前确认弹窗, 支持点击外部/右键关闭菜单
2026-07-11 00:24:24 +08:00
Jokul 5e867ee3e9 更新版本 2026-07-11 00:17:31 +08:00
Jokul bcf31e7d3a fix: safeStorage 解密失败时回退到 base64 解码
密码可能在 safeStorage 不可用时以纯 base64 存储,或因 keyring 环境
变化导致无法解密。添加 try-catch 回退,避免连接时崩溃。
2026-07-11 00:03:48 +08:00
Jokul 31201634c4 docs: 修正 AGENTS.md - Electron 版本、构建产物细节、运行时路径、已知问题
- Electron 版本 43 -> 33
- 补充 ESM 模块系统说明 (main .js / preload .mjs)
- 补充构建产物文件名和 package.json main 字段
- 新增运行时 __dirname 路径表 (preload/renderer/icon)
- 新增 Electron 二进制安装问题及修复方法
2026-07-10 23:58:19 +08:00
Jokul eda30250c6 refactor: 迁移至 electron-vite 官方推荐目录结构
- electron/* -> src/main/* (主进程)
- electron/preload.ts -> src/preload/index.ts (预加载)
- src/electron-api.d.ts -> src/preload/index.d.ts (类型声明)
- src/* -> src/renderer/src/* (渲染进程)
- src/index.html -> src/renderer/index.html
- electron.vite.config.ts 简化为自动入口检测 (零配置)
- tsconfig.app.json -> tsconfig.web.json, 更新 includes/paths
- 构建产物 dist-electron/ -> out/ (修复 main/preload 输出覆盖 bug)
- 更新 package.json main 字段 + electron-builder files
- 更新 .gitignore + eslint ignores
- 更新 AGENTS.md 架构文档
2026-07-10 23:46:34 +08:00
Jokul 157af4399f fix: 修复文件层级重构后的架构问题
- 恢复 IPC 类型声明 (src/electron-api.d.ts),修复 31 个 TS2339 错误
- 修复构建断裂:vite.config.ts 改回 electron.vite.config.ts
- 修复 2 个 verbatimModuleSyntax type-import 报错
- 修正 .gitignore 构建产物路径 (electron-dist/ -> dist-electron/ + release/)
- 清理 55+ 处过时路径注释
- 更新 AGENTS.md 架构文档与 IPC 通道表
- 修正 docs/ROADMAP.md 过时引用
2026-07-10 23:22:53 +08:00
Jokul fe7801062f update 2026-07-10 23:05:10 +08:00
Jokul b280e59377 更新 2026-07-10 22:25:52 +08:00
Jokul 76f35ae1f1 fix: KeyList TDZ crash and connection state desync
- Move filteredKeys computed before useVirtualizer in KeyList.vue to
  fix ReferenceError (Cannot access 'filteredKeys' before initialization)
  that crashed the component setup and cascaded into '.t is not a
  function' render errors.
- Wrap getInfo in try-catch in connection store connect() to clean up
  connectedIds/activeId when the client is lost between connect and
  getInfo, preventing a state where isConnected is true but no Redis
  client exists in the main process.
2026-07-08 07:11:28 +08:00
Jokul baa8917eae style: optimize DB selector dropdown
- Replace el-select with custom el-dropdown for compact tab bar fit
- Trigger: compact pill with DB name + key count badge + arrow
- Dropdown: two-column layout (DB index + custom name | key count badge + edit icon)
- Edit icon hidden until hover, colored on hover
- Selected DB highlighted with accent color
- Remove duplicate style block
- Key counts formatted (10k+ → '10k')
2026-07-07 23:49:47 +08:00
Jokul 3b039714f0 refactor: move DB selector from TitleBar/StatusBar to MainArea tab bar
- Remove DbSelector from StatusBar.vue
- Remove DbSelector from TitleBar.vue
- Add DbSelector to MainArea tab bar (left of tab buttons, after connection switcher)
- Only visible when connected (connStore.isConnected)
- Separated by dividers from connection switcher and tabs
2026-07-07 23:46:41 +08:00
Jokul 8a7d253180 feat: final P3 items - DB names, cluster support, more languages
- DB custom names (edit icon, localStorage per connection)
- Cluster SlowLog (per-master node column)
- Cluster info card in StatusView (CLUSTER INFO parsing)
- 3 new languages: Japanese, Korean, German
- ROADMAP: all implementable items done (only tests remain)
2026-07-07 23:07:14 +08:00
Jokul 71b2bd1771 feat: P3 final batch - zoom, fonts, dark mode, tech debt cleanup
- Page zoom control (0.5-2.0x, localStorage)
- Custom monospace font selector (6 presets + custom)
- Element Plus dark mode final fixes (dropdown, message-box, switch, popper)
- AGENTS.md updated with correct paths + new modules/components/IPC channels
- ROADMAP: window state persistence already done via win-state.ts
- ROADMAP: tech debt items marked done
2026-07-07 22:53:18 +08:00
Jokul 75c3a854d6 feat: P3 batch 2 - sidebar resize, DB features, Status/SlowLog, editor improvements
- Resizable sidebar (200-500px, localStorage persistence)
- DB auto-detection (CONFIG GET databases) + key count in dropdown
- DB memory (last selected DB per connection)
- Status auto-refresh toggle + search filter + key statistics table
- SlowLog config display (threshold + max len)
- Large value protection (>20MB placeholder + download)
- Hash field TTL (HEXPIRE support detection)
- Editor inline filters (Hash/Set/Zset)
- Zset ASC/DESC sort toggle
- CLI auto-sync SELECT + refresh key list on write commands
- i18n keys for all features (zh-CN + en)
2026-07-07 22:44:59 +08:00
Jokul 5505434325 feat: P3 batch 1 - context menus, shortcuts, connection management
- Key list right-click context menu (copy/delete/export/memory/copy value)
- Shift+Click range selection + Select All checkbox
- Keyboard shortcuts: Ctrl+, (settings), Ctrl+S (save), Ctrl+L (clear CLI), Ctrl+/ (hotkeys help)
- CLI auto-sync: SELECT updates DB, write commands refresh key list
- Connection color marking (6 predefined colors)
- Duplicate connection button
- Connection drag-and-drop reorder (native HTML5)
- i18n keys for all features (zh-CN + en)
2026-07-07 22:34:48 +08:00
Jokul b802fc6928 feat: binary key support
- New src/utils/binary.ts: isBinaryKey + formatKeyName
- KeyList: display [Hex] prefix for binary keys in list/tree/preview
- KeyDetail: binary key display + copy hex button
- i18n keys (zh-CN + en)
- P2 complete!
2026-07-07 22:21:19 +08:00
Jokul 6ac5636944 feat: key export/import, command import, virtualized scrolling
- P2-6: KeyList virtualized scrolling using @tanstack/vue-virtual (>100 keys)
- P2-8: Key export to CSV (DUMP + PTTL, hex-encoded)
- P2-9: Key import from CSV (RESTORE ... REPLACE)
- P2-10: CLI command import from text file
- i18n keys for all features (zh-CN + en)
2026-07-07 22:14:22 +08:00
Jokul 90d56f2a12 feat: batch delete preview, FlushDB, search history, cancel scan
- P2-7: KeyList batch delete preview dialog (max 100 keys shown)
- P2-11: StatusView FlushDB with double confirmation (type FLUSHDB)
- P2-12: KeyList search history (localStorage, max 20, dropdown on focus)
- P2-13: key store cancelScan() + KeyList cancel button
- i18n keys for all features (zh-CN + en)
2026-07-07 22:04:47 +08:00
Jokul b85e67541b feat: ReJson/TairJson support
- string.ts: rejsonGet, rejsonSet, rejsonDel using JSON.GET/SET/DEL
- IPC + preload for rejsonGet/rejsonSet
- New ReJsonEditor.vue: Monaco JSON editor with JSON.GET/SET
- KeyDetail: dispatch ReJSON-RL/json/tair-json types to ReJsonEditor
2026-07-07 21:58:17 +08:00
Jokul 1511427e62 feat: custom formatter support
- format.ts: customFormat() uses child_process.execFile
- Template params: {KEY} {VALUE} {HEX_FILE}
- Value written to temp file, path passed via {HEX_FILE}
- 10s timeout, error handling
- StringEditor: 'custom' format option + command input
- Command persisted to localStorage
- i18n keys (zh-CN + en)
2026-07-07 21:54:13 +08:00
Jokul 5178aea6d1 docs: mark auto format detection as done (implemented in P2-1) 2026-07-07 21:49:06 +08:00
Jokul e63940b548 feat: multi-format viewer (Text/Hex/JSON/Binary/Gzip/Deflate/Brotli)
- New format.ts: decodeValue + detectFormat using Node.js zlib
- IPC: redis:decodeValue, redis:detectFormat
- StringEditor: format selector dropdown with auto-detect
- Monaco editor shows decoded value, read-only for compressed formats
- Auto-detect: JSON, Gzip (1f 8b), Deflate (78 xx), non-printable → Hex
- i18n keys for all formats (zh-CN + en)
2026-07-07 21:48:52 +08:00
Jokul 76f8f6ddec 更新 2026-07-07 21:40:36 +08:00
Jokul cdadfbe5e4 feat: Stream consumer groups UI
- stream.ts: streamGroups, streamConsumers, streamGroupCreate, streamGroupDestroy, streamAck
- IPC: redis:streamGroups, streamConsumers, streamGroupCreate, streamGroupDestroy, streamAck
- Preload bridge + types for all new methods
- StreamEditor.vue: collapsible consumer groups panel
  - XINFO GROUPS table with name/consumers/pending/last-delivered-id
  - Click group to expand XINFO CONSUMERS
  - Create group dialog (name, start ID, MKSTREAM)
  - Destroy group with confirm
- i18n keys (zh-CN + en)
- P1 complete!
2026-07-07 21:22:12 +08:00
Jokul 00c11d4dfe feat: CLI MULTI/EXEC transaction support
- CliView: detect MULTI/EXEC/DISCARD commands
- MULTI enters transaction mode (tx> prompt, yellow)
- Commands in tx mode are queued (QUEUED + queue count)
- EXEC executes all queued commands, shows array results
- DISCARD cancels transaction
- WATCH/UNWATCH handled as non-queued tx commands
- i18n keys for tx messages (zh-CN + en)
2026-07-07 21:11:23 +08:00