From a782180dd36b1d3d6dd0df52c928eea407427839 Mon Sep 17 00:00:00 2001 From: Jokul Date: Sat, 11 Jul 2026 15:37:33 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20=E6=A0=91=E7=8A=B6=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E8=B7=AF=E5=BE=84=E5=8E=8B=E7=BC=A9=20-=20=E5=8D=95?= =?UTF-8?q?=E5=AD=90=E8=8A=82=E7=82=B9=E6=96=87=E4=BB=B6=E5=A4=B9=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=90=88=E5=B9=B6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ccb91731fc13822a5d52c7a63ff04bc83db76096. --- src/renderer/src/components/KeyList.vue | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/renderer/src/components/KeyList.vue b/src/renderer/src/components/KeyList.vue index 8bdac27..e134b53 100644 --- a/src/renderer/src/components/KeyList.vue +++ b/src/renderer/src/components/KeyList.vue @@ -452,27 +452,7 @@ const treeData = computed(() => { updateCounts(node) } - // Compress: merge folders that have exactly 1 child into a single node - // e.g. a > b > c (single key "a:b:c") becomes one leaf "a:b:c" - function compress(nodes: TreeNode[]): TreeNode[] { - return nodes.map(node => { - if (node.isLeaf) return node - const children = compress(node.children) - if (children.length === 1) { - const child = children[0] - return { - name: node.name + separator + child.name, - fullPath: child.fullPath, - isLeaf: child.isLeaf, - children: child.children, - count: child.count, - } - } - return { ...node, children } - }) - } - - return compress(root) + return root }) function isFolderExpanded(path: string): boolean {