From f1123b734d4272d166a4cc2e8e1b1a58d2c85db9 Mon Sep 17 00:00:00 2001 From: Jokul Date: Sat, 4 Jul 2026 19:56:37 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20README=20=E4=B8=AD=E6=96=87=E7=89=88?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 144 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 74 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index d9bcfed..8057570 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,71 @@ # JRedisDesktop -A modern Redis desktop manager built with Electron + Vue 3 + Vite. +基于 Electron + Vue 3 + Vite 的现代 Redis 桌面管理器。 -> Fork of [AnotherRedisDesktopManager](https://github.com/qishibo/AnotherRedisDesktopManager). -> The legacy Vue 2 codebase is archived in [`legacy/`](legacy/). +> Fork 自 [AnotherRedisDesktopManager](https://github.com/qishibo/AnotherRedisDesktopManager)。 +> 旧版 Vue 2 代码库已归档至 [`legacy/`](legacy/)。 -## Features +## 功能特性 -### Connection Management -- Create, edit, delete connections with host/port/password -- TLS/SSL support -- **Test connection** before saving -- **Import/Export** connections as JSON -- Health check with auto-reconnect indicator +### 连接管理 +- 创建、编辑、删除连接(主机/端口/密码) +- TLS/SSL 支持 +- **测试连接** - 保存前验证连接是否成功 +- **导入/导出** - JSON 格式连接配置 +- 健康检查 + 自动重连指示器 -### Key Browser -- **Pattern search** with Redis MATCH syntax (e.g. `user:*`, `cache:??`) -- Local filter for quick search -- SCAN-based pagination -- Tree view with key separator -- Multi-select for batch operations -- Batch delete with pipeline +### Key 浏览器 +- **模式搜索** - 支持 Redis MATCH 语法(如 `user:*`、`cache:??`) +- 本地过滤快速搜索 +- SCAN 分页加载 +- 树形视图(按 key 分隔符分组) +- 多选批量操作 +- 批量删除(pipeline) -### Type Editors -- **String** - view/edit with auto JSON formatting -- **Hash** - field table with add/edit/delete -- **List** - paginated view with push/edit/remove -- **Set** - member list with filter, add/remove -- **Zset** - sorted set with score, add/remove -- **Stream** - entry viewer with field management +### 类型编辑器 +- **String** - 查看/编辑,自动 JSON 格式化 +- **Hash** - 字段表格,支持增删改 +- **List** - 分页查看,支持推入/编辑/移除 +- **Set** - 成员列表,支持过滤/添加/移除 +- **Zset** - 有序集合,显示分数 +- **Stream** - 流数据查看,字段管理 -### Key Operations -- **TTL** - view and edit expiration -- **Rename** - rename keys with existence check -- **Copy key name** to clipboard -- Delete single or batch +### Key 操作 +- **TTL** - 查看和编辑过期时间 +- **重命名** - 支持存在性检查 +- **复制键名** - 一键复制到剪贴板 +- 单个/批量删除 -### Analysis Tools -- **Redis CLI** - interactive terminal with command history -- **Slow Log** - view slow commands with timing -- **INFO dashboard** - server statistics -- **DB selector** - switch between databases 0-15 +### 分析工具 +- **Redis CLI** - 交互式终端,支持命令历史 +- **慢日志** - 查看慢命令及耗时 +- **INFO 仪表板** - 服务器统计信息 +- **数据库选择器** - 切换 DB 0-15 -### Settings -- **Theme** - dark, light, or system -- **Language** - English / 中文 -- **SCAN count** - keys per scan iteration -- **Font size** - adjustable +### 设置 +- **主题** - 深色、浅色、跟随系统 +- **语言** - English / 中文 +- **SCAN 数量** - 每次扫描的 key 数量 +- **字体大小** - 可调节 -### Keyboard Shortcuts -| Shortcut | Action | -|----------|--------| -| `Ctrl+N` | New connection | -| `Ctrl+R` | Refresh keys | -| `F5` | Refresh keys | -| `Delete` | Delete selected key | -| `Escape` | Deselect key | +### 快捷键 +| 快捷键 | 功能 | +|--------|------| +| `Ctrl+N` | 新建连接 | +| `Ctrl+R` | 刷新 key 列表 | +| `F5` | 刷新 key 列表 | +| `Delete` | 删除选中的 key | +| `Escape` | 取消选择 | -## Dev +## 开发 ```bash npm install -npm run dev # electron-vite dev with HMR -npm run build # production build +npm run dev # electron-vite 开发模式,支持 HMR +npm run build # 生产构建 ``` -## Build packages +## 打包 ```bash npm run build:linux @@ -73,30 +73,34 @@ npm run build:mac npm run build:win ``` -## Stack +## 技术栈 -- **Shell:** Electron 33 -- **Preload:** contextBridge + typed IPC -- **Renderer:** Vue 3 + Pinia + Element Plus -- **Build:** electron-vite + Vite 6 + TypeScript 5 -- **Redis client:** ioredis 5 -- **Persistence:** electron-store + safeStorage +- **主进程:** Electron 33 +- **预加载:** contextBridge + 类型化 IPC +- **渲染进程:** Vue 3 + Pinia + Element Plus +- **构建工具:** electron-vite + Vite 6 + TypeScript 5 +- **Redis 客户端:** ioredis 5 +- **持久化:** electron-store + safeStorage(加密凭据) -## Architecture +## 架构 ``` -Electron main (src/main/) - ├── RedisService (ioredis wrapper) - ├── electron-store (persistence) - ├── safeStorage (credential encryption) - └── IPC handlers (typed channels) +Electron 主进程 (src/main/) + ├── RedisService # ioredis 封装(连接、扫描、CRUD、Stream) + ├── electron-store # 持久化(连接配置、设置) + ├── safeStorage # 凭据加密 + └── ipc-handlers # 所有 IPC 通道处理 -Preload (src/preload/) +预加载 (src/preload/) └── contextBridge → window.electronAPI -Renderer (src/renderer/src/) - ├── stores/ (Pinia: connection, key, app) - ├── components/ (Vue 3 SFCs) - ├── i18n/ (English + Chinese) - └── composables/ (useKeyboard) +渲染进程 (src/renderer/src/) + ├── stores/ # Pinia 状态管理(connection, key, app) + ├── components/ # Vue 3 组件 + ├── i18n/ # 国际化(英文 + 中文) + └── composables/ # 组合式函数(useKeyboard) ``` + +## License + +MIT