From 2860e628ee135cf62d7a2bae4fffe0f5efe8e427 Mon Sep 17 00:00:00 2001 From: llama Date: Tue, 14 Oct 2025 09:28:12 +0800 Subject: [PATCH] add option to hide revert buttons --- ts/lib/components/EnumSelectorRow.svelte | 5 ++++- ts/lib/components/SwitchRow.svelte | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ts/lib/components/EnumSelectorRow.svelte b/ts/lib/components/EnumSelectorRow.svelte index 2570b8e65..f05bd8860 100644 --- a/ts/lib/components/EnumSelectorRow.svelte +++ b/ts/lib/components/EnumSelectorRow.svelte @@ -18,6 +18,7 @@ export let choices: Choice[]; export let disabled: boolean = false; export let disabledChoices: T[] = []; + export let hideRevert: boolean = false; @@ -27,7 +28,9 @@ - + {#if !hideRevert} + + {/if} diff --git a/ts/lib/components/SwitchRow.svelte b/ts/lib/components/SwitchRow.svelte index 461dc27e7..82e351580 100644 --- a/ts/lib/components/SwitchRow.svelte +++ b/ts/lib/components/SwitchRow.svelte @@ -13,6 +13,7 @@ export let value: boolean; export let defaultValue: boolean; export let disabled: boolean = false; + export let hideRevert: boolean = false; const id = Math.random().toString(36).substring(2); @@ -22,7 +23,9 @@ - + {#if !hideRevert} + + {/if}