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
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