refactor: restructure project layout

- Move main process to electron/main/
- Move preload to electron/preload/
- Add shared types in electron/shared/
- Split redis-service into modular redis/ directory
- Flatten renderer to src/ (remove src/renderer/ nesting)
- Update electron.vite.config.ts paths
- Update tsconfig paths
- Output to electron-dist/
This commit is contained in:
2026-07-04 21:12:50 +08:00
parent bb885c6d6d
commit bdcf4fe299
59 changed files with 654 additions and 624 deletions
+123
View File
@@ -0,0 +1,123 @@
// src/renderer/src/i18n/locales/zh-CN.ts
export default {
common: {
ok: '确定',
cancel: '取消',
save: '保存',
delete: '删除',
edit: '编辑',
add: '添加',
refresh: '刷新',
search: '搜索',
confirm: '确认',
success: '成功',
error: '错误',
loading: '加载中...',
noData: '暂无数据',
},
app: {
title: 'JRedisDesktop',
subtitle: '现代 Redis 桌面管理器',
placeholder: '选择或创建连接开始使用',
},
connection: {
title: '连接',
new: '新建连接',
edit: '编辑连接',
name: '名称',
host: '主机',
port: '端口',
password: '密码',
username: '用户名',
tls: '启用 TLS',
ssh: 'SSH 隧道',
connect: '连接',
disconnect: '断开',
deleteConfirm: '删除此连接?',
testSuccess: '连接成功',
testFailed: '连接失败',
connected: '已连接',
disconnected: '未连接',
},
key: {
title: '键',
filter: '过滤键...',
loadMore: '加载更多...',
count: '{n} 个键',
deleteConfirm: '删除键 "{key}"',
deleted: '键已删除',
rename: '重命名',
renameTitle: '重命名键',
newName: '新名称',
renamed: '键已重命名',
copyName: '复制键名',
copied: '已复制',
ttl: 'TTL',
ttlTitle: '设置 TTL',
ttlHint: '-1 = 永不过期, 0 = 立即过期',
ttlUpdated: 'TTL 已更新',
exists: '键已存在',
batchDelete: '删除选中',
batchConfirm: '删除 {n} 个键?',
batchDeleted: '已删除 {n} 个键',
selected: '已选 {n} 项',
},
types: {
string: '字符串',
hash: '哈希',
list: '列表',
set: '集合',
zset: '有序集合',
stream: '流',
},
editor: {
save: '保存',
cancel: '取消',
edit: '编辑',
saved: '已保存',
push: '推入',
addField: '添加字段',
addMember: '添加成员',
filter: '过滤...',
refresh: '刷新',
elements: '{n} 个元素',
members: '{n} 个成员',
empty: '空',
field: '字段',
value: '值',
score: '分数',
remove: '移除',
removed: '已移除',
added: '已添加',
},
cli: {
title: 'CLI',
welcome: 'Redis CLI - 在下方输入命令',
placeholder: '输入 Redis 命令...',
},
slowlog: {
title: '慢日志',
time: '时间',
duration: '耗时',
command: '命令',
},
status: {
title: '状态',
database: '数据库',
keys: '键数',
refresh: '刷新',
},
db: {
label: '数据库',
},
settings: {
title: '设置',
theme: '主题',
themeDark: '深色',
themeLight: '浅色',
themeSystem: '跟随系统',
language: '语言',
scanCount: 'SCAN 每次数量',
fontSize: '字体大小',
},
}