Skip to content

Commit

Permalink
Use colour-picker macro in Tag Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Leilei332 committed Sep 16, 2024
1 parent e93515f commit 39cb3c7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion core/ui/TagManager.tid
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 39cb3c7

Please sign in to comment.