Commit Graph

138 Commits

Author SHA1 Message Date
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
Jokul c7e47c4d5b feat: CLI SUBSCRIBE/MONITOR streaming mode
- New pubsub.ts: startSubscribe/stopSubscribe/startMonitor/stopMonitor
- IPC: redis:subscribe, redis:unsubscribe, redis:monitor, redis:monitorStop
- Streaming messages pushed via webContents.send
- Preload: onSubscribeMessage/onMonitorMessage callbacks
- CliView: detect SUBSCRIBE/PSUBSCRIBE/MONITOR, switch to streaming mode
- Stop button with pulsing indicator (green=subscribe, yellow=monitor)
- Real-time message display with timestamps
- Auto-cleanup on unmount
- i18n keys (zh-CN + en)
2026-07-07 21:07:57 +08:00
Jokul 742c62517c feat: Redis command autocomplete in CLI
- New src/data/commands.ts: 139 Redis commands across 11 categories
- CliView.vue: autocomplete dropdown with prefix matching
- Category-colored command names (admin=read=green/write=yellow/etc)
- Up/Down navigate suggestions, Tab/Enter selects, Escape closes
- History navigation preserved when suggestions hidden
- Syntax and description shown for each command
2026-07-07 20:59:59 +08:00
Jokul 05a6f6aa17 feat: Monaco editor for StringEditor
- Install monaco-editor + @guolao/vue-monaco-editor
- main.ts: loader.config + MonacoEnvironment worker setup
- StringEditor.vue: replace textarea with Monaco editor
- JSON syntax highlighting, folding, word wrap
- Read-only mode when not editing, auto-detect JSON
- Theme follows app theme (vs-dark/vs)
- Font size follows app settings
2026-07-07 20:37:04 +08:00
Jokul 6a1f94cd48 feat: multi-connection parallel support
- connection store: connectedIds array, per-connection health/serverInfo maps
- connect() no longer disconnects existing connections
- New switchTo(id), disconnectById(id), isConnectedById(id) methods
- Per-connection health check timers (Map-based)
- ConnectionCard: switch to connected, connect if not, disconnect if active
- MainArea: per-connection tab state (save/restore on switch)
- Connection switcher dropdown in tab bar showing all open connections
- Clean up tab state when connection disconnects
2026-07-07 20:31:57 +08:00
Jokul 11a73494c0 feat: multi-tab support in MainArea
- Refactor MainArea: tabs array + activeTabId (was single activeTab)
- Open/close tabs dynamically, status tab not closable
- Tab opener buttons (keys/cli/slowlog/memory) in top-right
- Right-click context menu: close/closeOthers/closeRight/closeLeft
- Mouse wheel cycling through tabs
- Scrollable tab bar with hidden scrollbar
- i18n keys for tab context menu (zh-CN + en)
2026-07-07 20:26:47 +08:00
Jokul bb41ea78e6 回退版本 2026-07-05 22:48:02 +08:00
Jokul 405dfa77c4 feat: auto-updater integration
- Install electron-updater
- New updater.ts: check/download/install with progress events
- IPC: updater:check, updater:download, updater:install, updater:status
- Preload bridge for updater API
- electron-builder publish config (github provider)
- Fix build files path: out -> electron-dist
- i18n keys for updater notifications (zh-CN + en)
2026-07-05 22:13:25 +08:00
Jokul d131a2732d feat: Command Log dialog
- New commandLogger.ts: in-memory log (max 5000 entries)
- withLog() wrapper in ipc-handlers.ts for all write commands
- CommandLog.vue: table with time/command/duration, write-only filter
- IPC: redis:getCommandLog, redis:clearCommandLog
- Ctrl+G shortcut from Sidebar
- i18n keys (zh-CN + en)
2026-07-05 21:48:33 +08:00
Jokul 15869943e8 feat: Memory Analysis tab
- New MemoryAnalysis.vue: scan all keys with MEMORY USAGE
- Pause/resume/stop scanning, min size filter, sort asc/desc
- Added as tab in MainArea with Odometer icon
- i18n keys for all memory analysis labels (zh-CN + en)
2026-07-05 21:23:43 +08:00
Jokul 169017df65 feat: Cluster mode support
- NewConnectionDialog: cluster checkbox
- connection.ts: use Redis.Cluster() when cluster is enabled
- i18n keys for cluster (zh-CN + en)
2026-07-05 21:20:42 +08:00
Jokul e46d6a80be feat: Sentinel mode support
- NewConnectionDialog: sentinel toggle + host/port/masterName/nodePassword form
- connection.ts: use ioredis sentinels config when sentinelEnabled
- Add sentinelEnabled/sentinelHost/sentinelPort/sentinelNodePassword to all types
- i18n keys for all sentinel fields (zh-CN + en)
2026-07-05 16:43:52 +08:00
Jokul 1686af1a79 feat: TLS certificate file support
- NewConnectionDialog: TLS cert file selectors (CA/Cert/Key) + rejectUnauthorized checkbox
- connection.ts: read cert files and pass to ioredis tls options
- Add tlsRejectUnauthorized to all ConnectionConfig types
- i18n keys for tlsCaPath/tlsCertPath/tlsKeyPath/tlsRejectUnauthorized
2026-07-05 16:35:38 +08:00
Jokul 6e6f170403 feat: SSH tunnel support
- Add ssh2 dependency for SSH port forwarding
- NewConnectionDialog: SSH toggle + host/port/user/password/privateKey/passphrase form
- connection.ts: createSshTunnel() with local port forwarding
- Connect ioredis through SSH tunnel when sshEnabled
- Clean up SSH client + tunnel server on disconnect
- i18n keys for all SSH fields (zh-CN + en)
- Add sshPassphrase to all ConnectionConfig types
2026-07-05 16:25:35 +08:00
Jokul bb32d2d647 docs: roadmap and optimization checklist 2026-07-05 16:13:35 +08:00
Jokul 79f8217dfb fix: radio-button, input-number dark theme 2026-07-05 00:00:02 +08:00
Jokul 1caf5c1f24 fix: dark theme Element Plus components
- Buttons: dark bg, hover/active states
- Dropdowns/Selects: dark bg, matching border
- Tabs, Tooltips, Dialogs, Drawers
- Added --bg-hover, --bg-tertiary variables
2026-07-04 23:56:45 +08:00
Jokul 393c82c879 feat: StatusView i18n + 1s auto-refresh
- Section titles (Server, Clients, Memory...) follow app language
- Auto-refresh every 1 second
- Clean up interval on unmount/disconnect
2026-07-04 23:48:27 +08:00
Jokul d2fd07161c fix: UI improvements
- Remove auto-open devtools
- Settings as right drawer
- DB selector in title bar
- Sidebar expand/collapse
- Fix dark mode colors for key detail
2026-07-04 23:38:09 +08:00
Jokul 09b86e3d45 feat: optimize key list with list/tree views
- Add list view (flat) and tree view (hierarchical)
- Tree view shows folder expand/collapse with key count
- Add view mode toggle button
- Add i18n support for all key list text
2026-07-04 23:17:51 +08:00
Jokul e5ef0242d8 feat: add i18n to status bar 2026-07-04 23:04:25 +08:00
Jokul 24a12732ae feat: add i18n to connection list and dialog 2026-07-04 23:00:35 +08:00