docs: README 中文版功能说明

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