Use colour-picker macro in Tag Manager (#8606)

This commit is contained in:
Leilei332
2024-09-16 11:38:27 +02:00
committed by GitHub
parent e93515f32a
commit a510e4ad68
+16 -1
View File
@@ -46,6 +46,21 @@ color: #bbb
</$reveal>
\end
\procedure color-picker-actions()
\whitespace trim
<$action-setfield $tiddler=<<currentTiddler>> color=<<colour-picker-value>>/>
\end
\procedure color-picker-button()
\whitespace trim
<div class="tc-drop-down-wrapper">
<$button class="tc-btn-invisible" popup={{{ [[$:/state/tag-manager/color/]addsuffix<currentTiddler>] }}}>{{$:/core/images/palette}}</$button>
<$reveal type="popup" tag="div" class="tc-drop-down" state={{{ [[$:/state/tag-manager/color/]addsuffix<currentTiddler>] }}}>
<$transclude $variable="colour-picker" actions=<<color-picker-actions>>/>
</$reveal>
</div>
\end
\whitespace trim
<table class="tc-tag-manager-table">
<tbody>
@@ -58,7 +73,7 @@ color: #bbb
</tr>
<$list filter="[tags[]!is[system]sort[title]]">
<tr>
<td><$edit-text field="color" tag="input" type="color"/></td>
<td><$transclude $variable="color-picker-button"/></td>
<td>{{||$:/core/ui/TagTemplate}}</td>
<td><$count filter="[all[current]tagging[]]"/></td>
<td>