1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-10 20:09:57 +00:00

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

This commit is contained in:
Leilei332 2024-09-16 17:38:27 +08:00 committed by GitHub
parent e93515f32a
commit a510e4ad68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,6 +46,21 @@ color: #bbb
</$reveal> </$reveal>
\end \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 \whitespace trim
<table class="tc-tag-manager-table"> <table class="tc-tag-manager-table">
<tbody> <tbody>
@ -58,7 +73,7 @@ color: #bbb
</tr> </tr>
<$list filter="[tags[]!is[system]sort[title]]"> <$list filter="[tags[]!is[system]sort[title]]">
<tr> <tr>
<td><$edit-text field="color" tag="input" type="color"/></td> <td><$transclude $variable="color-picker-button"/></td>
<td>{{||$:/core/ui/TagTemplate}}</td> <td>{{||$:/core/ui/TagTemplate}}</td>
<td><$count filter="[all[current]tagging[]]"/></td> <td><$count filter="[all[current]tagging[]]"/></td>
<td> <td>