1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-03-01 09:20:02 +00:00
TiddlyWiki5/core/ui/PaletteManager.tid
Jeremy Ruston c6bb2b51e6 Rethink palette manager
The current content of $:/PaletteManager is moved into $:/PaletteEditor, and $:/PaletteManager repurposed as the control panel palette switcher
2025-02-04 16:11:51 +00:00

33 lines
837 B
Plaintext

title: $:/PaletteManager
\define lingo-base() $:/language/ControlPanel/Palette/
<$transclude $tiddler="$:/snippets/paletteswitcher" thumbnails="yes"/>
{{$:/snippets/palettetests}}
<$let
paletteEditor={{{ [{$:/palette}get[editor]] :else[{$:/palette}get[palette-import]!match[]get[editor]] }}}
>
<%if [<paletteEditor>!match[]] %>
<div>
<<lingo CustomEditor/Prompt>>
<$transclude $tiddler=<<paletteEditor>> $mode="block"/>
</div>
<%endif%>
</$let>
<$reveal type="nomatch" state="$:/state/ShowPaletteEditor" text="yes">
<$button set="$:/state/ShowPaletteEditor" setTo="yes"><<lingo ShowEditor/Caption>></$button>
</$reveal>
<$reveal type="match" state="$:/state/ShowPaletteEditor" text="yes">
<$button set="$:/state/ShowPaletteEditor" setTo="no"><<lingo HideEditor/Caption>></$button>
{{$:/PaletteEditor}}
</$reveal>