From a510e4ad68994ab16b6e672a89fd20203f77e74d Mon Sep 17 00:00:00 2001 From: Leilei332 Date: Mon, 16 Sep 2024 17:38:27 +0800 Subject: [PATCH] Use colour-picker macro in Tag Manager (#8606) --- core/ui/TagManager.tid | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/core/ui/TagManager.tid b/core/ui/TagManager.tid index e2d6d2fa8..c14a3f560 100644 --- a/core/ui/TagManager.tid +++ b/core/ui/TagManager.tid @@ -46,6 +46,21 @@ color: #bbb \end +\procedure color-picker-actions() +\whitespace trim +<$action-setfield $tiddler=<> color=<>/> +\end + +\procedure color-picker-button() +\whitespace trim +
+<$button class="tc-btn-invisible" popup={{{ [[$:/state/tag-manager/color/]addsuffix] }}}>{{$:/core/images/palette}} +<$reveal type="popup" tag="div" class="tc-drop-down" state={{{ [[$:/state/tag-manager/color/]addsuffix] }}}> +<$transclude $variable="colour-picker" actions=<>/> + +
+\end + \whitespace trim @@ -58,7 +73,7 @@ color: #bbb <$list filter="[tags[]!is[system]sort[title]]"> - +
<$edit-text field="color" tag="input" type="color"/><$transclude $variable="color-picker-button"/> {{||$:/core/ui/TagTemplate}} <$count filter="[all[current]tagging[]]"/>