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:
Vendored
+7
@@ -87,6 +87,13 @@ export interface ElectronAPI {
|
||||
slowLogLen: (id: string) => Promise<number>
|
||||
memoryUsage: (id: string, key: string) => Promise<number | null>
|
||||
batchDelete: (id: string, keys: string[]) => Promise<number>
|
||||
streamInfo: (id: string, key: string) => Promise<any>
|
||||
streamRange: (id: string, key: string, start: string, end: string, count: number) => Promise<any[]>
|
||||
streamAdd: (id: string, key: string, streamId: string, fieldValues: string[]) => Promise<string>
|
||||
streamTrim: (id: string, key: string, maxLen: number) => Promise<number>
|
||||
streamDel: (id: string, key: string, ids: string[]) => Promise<number>
|
||||
renameKey: (id: string, oldKey: string, newKey: string) => Promise<void>
|
||||
existsKey: (id: string, key: string) => Promise<boolean>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,22 @@ const electronAPI = {
|
||||
ipcRenderer.invoke('redis:memoryUsage', id, key),
|
||||
batchDelete: (id: string, keys: string[]): Promise<number> =>
|
||||
ipcRenderer.invoke('redis:batchDelete', id, keys),
|
||||
// Stream
|
||||
streamInfo: (id: string, key: string): Promise<any> =>
|
||||
ipcRenderer.invoke('redis:streamInfo', id, key),
|
||||
streamRange: (id: string, key: string, start: string, end: string, count: number): Promise<any[]> =>
|
||||
ipcRenderer.invoke('redis:streamRange', id, key, start, end, count),
|
||||
streamAdd: (id: string, key: string, streamId: string, fieldValues: string[]): Promise<string> =>
|
||||
ipcRenderer.invoke('redis:streamAdd', id, key, streamId, fieldValues),
|
||||
streamTrim: (id: string, key: string, maxLen: number): Promise<number> =>
|
||||
ipcRenderer.invoke('redis:streamTrim', id, key, maxLen),
|
||||
streamDel: (id: string, key: string, ids: string[]): Promise<number> =>
|
||||
ipcRenderer.invoke('redis:streamDel', id, key, ids),
|
||||
// Key ops
|
||||
renameKey: (id: string, oldKey: string, newKey: string): Promise<void> =>
|
||||
ipcRenderer.invoke('redis:renameKey', id, oldKey, newKey),
|
||||
existsKey: (id: string, key: string): Promise<boolean> =>
|
||||
ipcRenderer.invoke('redis:existsKey', id, key),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user