From 336c11162767f21ba932901f3f9abf855b46768e Mon Sep 17 00:00:00 2001 From: pmario Date: Fri, 26 Jan 2024 01:35:43 +0100 Subject: [PATCH] simplify the DOM using conditionals instead of reveal --- core/ui/ControlPanel/Palette.tid | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/core/ui/ControlPanel/Palette.tid b/core/ui/ControlPanel/Palette.tid index b885e970e..1703c0ef9 100644 --- a/core/ui/ControlPanel/Palette.tid +++ b/core/ui/ControlPanel/Palette.tid @@ -6,22 +6,19 @@ caption: {{$:/language/ControlPanel/Palette/Caption}} \whitespace trim \procedure paletteEditorButton() -<$reveal type="nomatch" state="$:/state/ShowPaletteEditor" text="yes"> +<% if [{$:/state/ShowPaletteEditor}!match[yes]] %> <$button set="$:/state/ShowPaletteEditor" setTo="yes"><> - -<$reveal type="match" state="$:/state/ShowPaletteEditor" text="yes"> +<% else %> <$button set="$:/state/ShowPaletteEditor" setTo="no"><> {{$:/PaletteManager}} - +<% endif %> \end {{$:/core/ui/ControlPanel/Palette/LightDarkConfig}} -<$list filter="[{$:/config/palette/enable-light-dark-detection}match[yes]]" variable="ignore"> +<% if [{$:/config/palette/enable-light-dark-detection}match[yes]] %> <> - - -<$list filter="[{$:/config/palette/enable-light-dark-detection}!match[yes]]" variable="ignore"> +<% else %> !! <> @@ -29,4 +26,4 @@ caption: {{$:/language/ControlPanel/Palette/Caption}} <> - +<% endif %>