From 1dcf7db52a054606e72c1a4ac2b3e67368e45ccb Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Fri, 23 Jan 2026 15:49:00 -0500 Subject: [PATCH] fix plain folder icon --- src/plugins/plainFolderIcon/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/plainFolderIcon/index.ts b/src/plugins/plainFolderIcon/index.ts index 8eb878962..84390e22e 100644 --- a/src/plugins/plainFolderIcon/index.ts +++ b/src/plugins/plainFolderIcon/index.ts @@ -28,12 +28,17 @@ export default definePlugin({ patches: [ { - find: ".folderPreviewGuildIconError", + find: "#{intl::GUILD_FOLDER_TOOLTIP_A11Y_LABEL}", replacement: [ { // Discord always renders both plain and guild icons folders and uses a css transtion to switch between them - match: /(?<=.folderButtonContent]:(!\i))/, - replace: (_, hasFolderButtonContentClass) => `,"vc-plainFolderIcon-plain":${hasFolderButtonContentClass}` + // let {hovered: h, sorting: s} = props; + // hasFolderButtonContent = h && s; + // ... + // className: cn({[_1]: hasFolderButtonContent, [_2]: !hasFolderButtonContent}), + // children: [!hasFolderButtonContent && ...] + match: /className:\i\(\)\(\{\[\i\.\i\]:(\i),\[\i\.\i\]:!\1(?=.{0,30}children:\[!\i&&)/, + replace: (m, hasFolderButtonContent) => `${m},"vc-plainFolderIcon-plain":${hasFolderButtonContent}` } ]