From f8139896f2077a95a78a54c818637f78dd102de8 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 22 Jul 2025 12:11:53 -0400 Subject: consolidate toml and script values --- src/components/ConfigurationSection.tsx | 32 ++++++++++++++++++++++++++++++++ src/config/generatedConfigSchema.ts | 18 ++++++++++++++++++ 2 files changed, 50 insertions(+) (limited to 'src') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 1c0d2b2..3f15bac 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -182,6 +182,38 @@ export function ConfigurationSection({ onChange={(value) => onConfigChange('disable_vkbasalt', value)} /> + + + onConfigChange('foobar_toggle', value)} + /> + + + +
+
Test Config Only Field
+ onConfigChange('test_config_only', e.target.value)} + placeholder="Enter test value" + style={{ + width: "100%", + padding: "8px", + borderRadius: "4px", + border: "1px solid #4c4c4c", + backgroundColor: "#2d2d2d", + color: "#ffffff" + }} + /> +
+ Test TOML-only configuration field (not in script) +
+
+
); } diff --git a/src/config/generatedConfigSchema.ts b/src/config/generatedConfigSchema.ts index cb08252..b7487bd 100644 --- a/src/config/generatedConfigSchema.ts +++ b/src/config/generatedConfigSchema.ts @@ -83,6 +83,18 @@ export const CONFIG_SCHEMA: Record = { default: false, description: "Disables vkBasalt layer which can conflict with LSFG (Reshade, some Decky plugins)" }, + foobar_toggle: { + name: "foobar_toggle", + fieldType: ConfigFieldType.BOOLEAN, + default: false, + description: "Test script-only toggle that exports FOOBAR=1 (for testing purposes)" + }, + test_config_only: { + name: "test_config_only", + fieldType: ConfigFieldType.STRING, + default: "default_value", + description: "Test TOML-only configuration field (not in script)" + }, }; // Type-safe configuration data structure @@ -98,6 +110,8 @@ export interface ConfigurationData { disable_steamdeck_mode: boolean; mangohud_workaround: boolean; disable_vkbasalt: boolean; + foobar_toggle: boolean; + test_config_only: string; } // Helper functions @@ -118,6 +132,8 @@ export function getDefaults(): ConfigurationData { disable_steamdeck_mode: false, mangohud_workaround: false, disable_vkbasalt: false, + foobar_toggle: false, + test_config_only: "default_value", }; } @@ -134,6 +150,8 @@ export function getFieldTypes(): Record { disable_steamdeck_mode: ConfigFieldType.BOOLEAN, mangohud_workaround: ConfigFieldType.BOOLEAN, disable_vkbasalt: ConfigFieldType.BOOLEAN, + foobar_toggle: ConfigFieldType.BOOLEAN, + test_config_only: ConfigFieldType.STRING, }; } -- cgit v1.2.3