feat(phase5): stream editor, i18n, settings, key management
- StreamEditor: view/add/trim/delete entries with field management - KeyDetail: TTL editor dialog, rename dialog, copy key name button - i18n: English + Chinese locale system with composable - SettingsView: theme selector, language switch, scan count, font size - MainArea: added Settings tab - RedisService: stream/rename/exists operations - Preload: stream/rename/exists IPC channels
This commit is contained in:
@@ -182,4 +182,29 @@ export function registerIpcHandlers(): void {
|
||||
ipcMain.handle('redis:batchDelete', async (_e, id: string, keys: string[]) => {
|
||||
return redisService.batchDelete(id, keys)
|
||||
})
|
||||
|
||||
// Stream
|
||||
ipcMain.handle('redis:streamInfo', async (_e, id: string, key: string) => {
|
||||
return redisService.streamInfo(id, key)
|
||||
})
|
||||
ipcMain.handle('redis:streamRange', async (_e, id: string, key: string, start: string, end: string, count: number) => {
|
||||
return redisService.streamRange(id, key, start, end, count)
|
||||
})
|
||||
ipcMain.handle('redis:streamAdd', async (_e, id: string, key: string, streamId: string, fieldValues: string[]) => {
|
||||
return redisService.streamAdd(id, key, streamId, fieldValues)
|
||||
})
|
||||
ipcMain.handle('redis:streamTrim', async (_e, id: string, key: string, maxLen: number) => {
|
||||
return redisService.streamTrim(id, key, maxLen)
|
||||
})
|
||||
ipcMain.handle('redis:streamDel', async (_e, id: string, key: string, ids: string[]) => {
|
||||
return redisService.streamDel(id, key, ...ids)
|
||||
})
|
||||
|
||||
// Key ops
|
||||
ipcMain.handle('redis:renameKey', async (_e, id: string, oldKey: string, newKey: string) => {
|
||||
await redisService.renameKey(id, oldKey, newKey)
|
||||
})
|
||||
ipcMain.handle('redis:existsKey', async (_e, id: string, key: string) => {
|
||||
return redisService.existsKey(id, key)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user