From f451e04ba1341b5ed24cf75adfc22fe3f92c1971 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 16 Mar 2026 13:19:06 -0400 Subject: [PATCH] FileUpload: Fix Conflict --- .../characterCounter/index.tsx | 19 ++++++++++++------- .../characterCounter/style.css | 9 +++------ src/equicordplugins/fileUpload/index.tsx | 4 ++-- src/equicordplugins/fileUpload/styles.css | 6 +++--- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/equicordplugins/characterCounter/index.tsx b/src/equicordplugins/characterCounter/index.tsx index 6833f126d..656709a94 100644 --- a/src/equicordplugins/characterCounter/index.tsx +++ b/src/equicordplugins/characterCounter/index.tsx @@ -8,9 +8,12 @@ import "./style.css"; import { definePluginSettings } from "@api/Settings"; import { Devs, EquicordDevs } from "@utils/constants"; +import { classNameFactory } from "@utils/css"; import definePlugin, { OptionType } from "@utils/types"; import { UserStore } from "@webpack/common"; +const cl = classNameFactory("vc-char-counter-"); + const settings = definePluginSettings({ colorEffects: { type: OptionType.BOOLEAN, @@ -27,10 +30,12 @@ export default definePlugin({ patches: [ { find: ".CREATE_FORUM_POST||", - replacement: { - match: /(textValue:.{0,50}channelId:\i\.id\}\)),\i/, - replace: "$1,$self.getCharCounter(arguments[0].textValue)" - } + replacement: [ + { + match: /(textValue:.{0,50}channelId:\i\.id\}\),)\i/, + replace: "$1$self.getCharCounter(arguments[0].textValue)" + } + ] }, { find: "#{intl::PREMIUM_MESSAGE_LENGTH_UPSELL_TOOLTIP}", @@ -55,9 +60,9 @@ export default definePlugin({ } return ( -
- {length}/ - {charMax} +
+ {length}/ + {charMax}
); } diff --git a/src/equicordplugins/characterCounter/style.css b/src/equicordplugins/characterCounter/style.css index 6dcdb79ff..6b67d462d 100644 --- a/src/equicordplugins/characterCounter/style.css +++ b/src/equicordplugins/characterCounter/style.css @@ -1,4 +1,4 @@ -.vc-char-counter { +.vc-char-counter-counter { font-size: 12px; color: var(--text-muted); position: absolute; @@ -8,12 +8,9 @@ z-index: 2; background: transparent; transition: color 0.3s ease; + margin-right: 5px; } -.vc-char-counter .vc-char-count { +.vc-char-counter-counter .vc-char-counter-count { transition: color 0.3s ease; -} - -.vc-char-counter .vc-char-max { - color: var(--primary-330); } \ No newline at end of file diff --git a/src/equicordplugins/fileUpload/index.tsx b/src/equicordplugins/fileUpload/index.tsx index 34008b10c..f7cda948e 100644 --- a/src/equicordplugins/fileUpload/index.tsx +++ b/src/equicordplugins/fileUpload/index.tsx @@ -154,8 +154,8 @@ export default definePlugin({ { find: ".CREATE_FORUM_POST||", replacement: { - match: /(textValue:.{0,50}channelId:\i\.id\}\)),\i/, - replace: "$1,$self.renderUploadProgress()" + match: /(textValue:.{0,50}channelId:\i\.id\}\))(?:,\i(,))?/, + replace: "$1,$self.renderUploadProgress()$2" } } ], diff --git a/src/equicordplugins/fileUpload/styles.css b/src/equicordplugins/fileUpload/styles.css index 558d5dade..67bcf3893 100644 --- a/src/equicordplugins/fileUpload/styles.css +++ b/src/equicordplugins/fileUpload/styles.css @@ -18,7 +18,7 @@ .vc-file-upload-progress-label { font-size: 12px; - color: var(--header-primary); + color: var(--text-default); } .vc-file-upload-progress-meta { @@ -58,7 +58,7 @@ .vc-file-upload-progress-file { font-size: 11px; - color: var(--header-secondary); + color: var(--text-default); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -70,4 +70,4 @@ .vc-file-upload-progress-wrap[data-phase="success"] .vc-file-upload-progress-fill { background: var(--status-positive); -} +} \ No newline at end of file