From 1a5e4dd706714943436d5501578ae35e9d1120bb Mon Sep 17 00:00:00 2001 From: Jokul Date: Sun, 12 Jul 2026 14:30:18 +0800 Subject: [PATCH] fix: patch all P2 quality/performance issues from project review - ipc-handlers: withLog extracts actual connection ID from args[0] (P2#20) - updater: add initialized guard to prevent duplicate IPC registration (P2#25) - win-state: log writeFile errors instead of empty callback (P2#26) - format: detectFormat samples up to 4096 chars instead of 100 (P2#28) - commandLogger: add 30+ missing write commands to WRITE_COMMANDS (P2#32) - ReJsonEditor: bind Monaco theme to monacoTheme computed (P2#19) - keys: normalize empty SCAN pattern to '*' (P2#21) - SlowLogView: remove duplicate - diff --git a/src/renderer/src/i18n/locales/de.ts b/src/renderer/src/i18n/locales/de.ts index baf9d06..b27136f 100644 --- a/src/renderer/src/i18n/locales/de.ts +++ b/src/renderer/src/i18n/locales/de.ts @@ -112,6 +112,7 @@ export default { batchConfirm: '{n} Schlüssel löschen?', batchDeleted: '{n} Schlüssel gelöscht', batchPreview: 'Löschvorschau', + batchDeleteConfirm: '{n} Schlüssel löschen?', batchPreviewHint: '{n} Schlüssel werden gelöscht', andMore: '...und {n} weitere', selected: '{n} ausgewählt', diff --git a/src/renderer/src/i18n/locales/en.ts b/src/renderer/src/i18n/locales/en.ts index 9cf020f..d67d5b1 100644 --- a/src/renderer/src/i18n/locales/en.ts +++ b/src/renderer/src/i18n/locales/en.ts @@ -112,6 +112,7 @@ export default { batchConfirm: 'Delete {n} key(s)?', batchDeleted: 'Deleted {n} key(s)', batchPreview: 'Delete Preview', + batchDeleteConfirm: 'Delete {n} key(s)?', batchPreviewHint: 'About to delete {n} keys', andMore: '...and {n} more', selected: '{n} selected', diff --git a/src/renderer/src/i18n/locales/ja.ts b/src/renderer/src/i18n/locales/ja.ts index 027a528..140fb96 100644 --- a/src/renderer/src/i18n/locales/ja.ts +++ b/src/renderer/src/i18n/locales/ja.ts @@ -112,6 +112,7 @@ export default { batchConfirm: '{n} 個のキーを削除しますか?', batchDeleted: '{n} 個のキーを削除しました', batchPreview: '削除プレビュー', + batchDeleteConfirm: '{n} 個のキーを削除しますか?', batchPreviewHint: '{n} 個のキーを削除しようとしています', andMore: '...他 {n} 個', selected: '{n} 個選択済み', diff --git a/src/renderer/src/i18n/locales/ko.ts b/src/renderer/src/i18n/locales/ko.ts index 709c287..86ba368 100644 --- a/src/renderer/src/i18n/locales/ko.ts +++ b/src/renderer/src/i18n/locales/ko.ts @@ -112,6 +112,7 @@ export default { batchConfirm: '{n}개 키를 삭제하시겠습니까?', batchDeleted: '{n}개 키가 삭제되었습니다', batchPreview: '삭제 미리보기', + batchDeleteConfirm: '{n}개 키를 삭제하시겠습니까?', batchPreviewHint: '{n}개 키를 삭제하려고 합니다', andMore: '...그 외 {n}개', selected: '{n}개 선택됨', diff --git a/src/renderer/src/i18n/locales/zh-CN.ts b/src/renderer/src/i18n/locales/zh-CN.ts index 2cc38fd..37cf367 100644 --- a/src/renderer/src/i18n/locales/zh-CN.ts +++ b/src/renderer/src/i18n/locales/zh-CN.ts @@ -112,6 +112,7 @@ export default { batchConfirm: '删除 {n} 个键?', batchDeleted: '已删除 {n} 个键', batchPreview: '删除预览', + batchDeleteConfirm: '确定删除 {n} 个键?', batchPreviewHint: '即将删除以下 {n} 个键', andMore: '...以及其他 {n} 个', selected: '已选 {n} 项', diff --git a/src/renderer/src/stores/key.ts b/src/renderer/src/stores/key.ts index 77eef2f..61c29a1 100644 --- a/src/renderer/src/stores/key.ts +++ b/src/renderer/src/stores/key.ts @@ -113,8 +113,8 @@ export const useKeyStore = defineStore('key', () => { hasMore.value = result.cursor !== '0' if (useTree.value) { - const conn = (await window.electronAPI.storage.getConnections()) - .find((c: any) => c.id === connId) + const connectionStore = useConnectionStore() + const conn = connectionStore.connections.find(c => c.id === connId) const sep = conn?.separator || ':' treeKeys.value = buildTree(keys.value.map(k => k.name), sep) } @@ -149,8 +149,8 @@ export const useKeyStore = defineStore('key', () => { keys.value = keys.value.filter(k => k.name !== key) // Rebuild tree if needed if (useTree.value) { - const conn = (await window.electronAPI.storage.getConnections()) - .find((c: any) => c.id === connId) + const connectionStore = useConnectionStore() + const conn = connectionStore.connections.find(c => c.id === connId) const sep = conn?.separator || ':' treeKeys.value = buildTree(keys.value.map(k => k.name), sep) }