1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-10 09:20:26 +00:00

Refactor actions for recompiling current palette

This commit is contained in:
Jeremy Ruston 2025-01-08 21:37:44 +00:00
parent 28167adc22
commit 2b0c634fb8
2 changed files with 10 additions and 10 deletions

View File

@ -1,18 +1,14 @@
title: $:/palette-editors/TwentyTwenties
\procedure actionsRecompilePalette()
<$transclude $variable="actions-compile-palette" inputTitle={{$:/palette}} outputTitle="$:/temp/palette-colours"/>
\end actionsRecompilePalette
paper: <$edit-text tiddler={{$:/palette}} index="base-paper" type="color" tag="input" inputActions=<<actions-recompile-current-palette>>/>
paper: <$edit-text tiddler={{$:/palette}} index="base-paper" type="color" tag="input" inputActions=<<actionsRecompilePalette>>/>
background: <$edit-text tiddler={{$:/palette}} index="base-background" type="color" tag="input" inputActions=<<actions-recompile-current-palette>>/>
background: <$edit-text tiddler={{$:/palette}} index="base-background" type="color" tag="input" inputActions=<<actionsRecompilePalette>>/>
ink: <$edit-text tiddler={{$:/palette}} index="base-ink" type="color" tag="input" inputActions=<<actions-recompile-current-palette>>/>
ink: <$edit-text tiddler={{$:/palette}} index="base-ink" type="color" tag="input" inputActions=<<actionsRecompilePalette>>/>
primary: <$edit-text tiddler={{$:/palette}} index="base-primary" type="color" tag="input" inputActions=<<actions-recompile-current-palette>>/>
primary: <$edit-text tiddler={{$:/palette}} index="base-primary" type="color" tag="input" inputActions=<<actionsRecompilePalette>>/>
secondary: <$edit-text tiddler={{$:/palette}} index="base-secondary" type="color" tag="input" inputActions=<<actions-recompile-current-palette>>/>
secondary: <$edit-text tiddler={{$:/palette}} index="base-secondary" type="color" tag="input" inputActions=<<actionsRecompilePalette>>/>
tertiary: <$edit-text tiddler={{$:/palette}} index="base-tertiary" type="color" tag="input" inputActions=<<actionsRecompilePalette>>/>
tertiary: <$edit-text tiddler={{$:/palette}} index="base-tertiary" type="color" tag="input" inputActions=<<actions-recompile-current-palette>>/>

View File

@ -62,6 +62,10 @@ tags: $:/tags/Macro
</$let>
\end actions-compile-palette
\procedure actions-recompile-current-palette()
<$transclude $variable="actions-compile-palette" inputTitle={{$:/palette}} outputTitle="$:/temp/palette-colours"/>
\end actions-recompile-current-palette
\procedure actions-switch-colour-palette(paletteTitle)
\procedure tv-action-refresh-policy() always
<$action-deletetiddler $tiddler="$:/temp/palette-colours"/>