feat: multi-format viewer (Text/Hex/JSON/Binary/Gzip/Deflate/Brotli)
- New format.ts: decodeValue + detectFormat using Node.js zlib - IPC: redis:decodeValue, redis:detectFormat - StringEditor: format selector dropdown with auto-detect - Monaco editor shows decoded value, read-only for compressed formats - Auto-detect: JSON, Gzip (1f 8b), Deflate (78 xx), non-printable → Hex - i18n keys for all formats (zh-CN + en)
This commit is contained in:
@@ -257,6 +257,14 @@ export function registerIpcHandlers(): void {
|
||||
redis.clearLog()
|
||||
})
|
||||
|
||||
// Format decode
|
||||
ipcMain.handle('redis:decodeValue', (_e, value: string, format: string) => {
|
||||
return redis.decodeValue(value, format as any)
|
||||
})
|
||||
ipcMain.handle('redis:detectFormat', (_e, value: string) => {
|
||||
return redis.detectFormat(value)
|
||||
})
|
||||
|
||||
// Pub/Sub
|
||||
ipcMain.handle('redis:subscribe', async (_e, id: string, channels: string[], isPattern: boolean) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user