From db5fe2a39472275d2422035d3c55cb6f8cf15538 Mon Sep 17 00:00:00 2001
From: TheGreenPig <67547385+TheGreenPig@users.noreply.github.com>
Date: Sun, 22 Sep 2024 09:38:32 +0200
Subject: [PATCH] Fix plugin settings inconsistency regarding setting names
(#2884)
---
.../PluginSettings/components/SettingNumericComponent.tsx | 5 ++++-
.../PluginSettings/components/SettingSelectComponent.tsx | 5 ++++-
.../PluginSettings/components/SettingSliderComponent.tsx | 5 ++++-
.../PluginSettings/components/SettingTextComponent.tsx | 5 ++++-
4 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/components/PluginSettings/components/SettingNumericComponent.tsx b/src/components/PluginSettings/components/SettingNumericComponent.tsx
index 446d2504..b724717d 100644
--- a/src/components/PluginSettings/components/SettingNumericComponent.tsx
+++ b/src/components/PluginSettings/components/SettingNumericComponent.tsx
@@ -16,6 +16,8 @@
* along with this program. If not, see .
*/
+import { Margins } from "@utils/margins";
+import { wordsFromCamel, wordsToTitle } from "@utils/text";
import { OptionType, PluginOptionNumber } from "@utils/types";
import { Forms, React, TextInput } from "@webpack/common";
@@ -54,7 +56,8 @@ export function SettingNumericComponent({ option, pluginSettings, definedSetting
return (
- {option.description}
+ {wordsToTitle(wordsFromCamel(id))}
+ {option.description}
.
*/
+import { Margins } from "@utils/margins";
+import { wordsFromCamel, wordsToTitle } from "@utils/text";
import { PluginOptionSelect } from "@utils/types";
import { Forms, React, Select } from "@webpack/common";
@@ -44,7 +46,8 @@ export function SettingSelectComponent({ option, pluginSettings, definedSettings
return (
- {option.description}
+ {wordsToTitle(wordsFromCamel(id))}
+ {option.description}
.
*/
+import { Margins } from "@utils/margins";
+import { wordsFromCamel, wordsToTitle } from "@utils/text";
import { PluginOptionSlider } from "@utils/types";
import { Forms, React, Slider } from "@webpack/common";
@@ -50,7 +52,8 @@ export function SettingSliderComponent({ option, pluginSettings, definedSettings
return (
- {option.description}
+ {wordsToTitle(wordsFromCamel(id))}
+ {option.description}
.
*/
+import { Margins } from "@utils/margins";
+import { wordsFromCamel, wordsToTitle } from "@utils/text";
import { PluginOptionString } from "@utils/types";
import { Forms, React, TextInput } from "@webpack/common";
@@ -41,7 +43,8 @@ export function SettingTextComponent({ option, pluginSettings, definedSettings,
return (
- {option.description}
+ {wordsToTitle(wordsFromCamel(id))}
+ {option.description}