feat: Command Log dialog
- New commandLogger.ts: in-memory log (max 5000 entries) - withLog() wrapper in ipc-handlers.ts for all write commands - CommandLog.vue: table with time/command/duration, write-only filter - IPC: redis:getCommandLog, redis:clearCommandLog - Ctrl+G shortcut from Sidebar - i18n keys (zh-CN + en)
This commit is contained in:
Vendored
+2
@@ -102,6 +102,8 @@ export interface ElectronAPI {
|
||||
existsKey: (id: string, key: string) => Promise<boolean>
|
||||
ping: (id: string) => Promise<string>
|
||||
isConnected: (id: string) => Promise<boolean>
|
||||
getCommandLog: () => Promise<any[]>
|
||||
clearCommandLog: () => Promise<void>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +114,11 @@ const electronAPI = {
|
||||
ipcRenderer.invoke('redis:ping', id),
|
||||
isConnected: (id: string): Promise<boolean> =>
|
||||
ipcRenderer.invoke('redis:isConnected', id),
|
||||
// Command log
|
||||
getCommandLog: (): Promise<any[]> =>
|
||||
ipcRenderer.invoke('redis:getCommandLog'),
|
||||
clearCommandLog: (): Promise<void> =>
|
||||
ipcRenderer.invoke('redis:clearCommandLog'),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user