mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-12 19:20:27 +00:00
e84acf97de
This PR makes the ControlPanel Button show as selected when the `tv-story-list` contains `$:/ControlPanel` in its list field
22 lines
893 B
Plaintext
22 lines
893 B
Plaintext
title: $:/core/ui/Buttons/control-panel
|
|
tags: $:/tags/PageControls
|
|
caption: {{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Caption}}
|
|
description: {{$:/language/Buttons/ControlPanel/Hint}}
|
|
|
|
\whitespace trim
|
|
\define control-panel-button(class)
|
|
\whitespace trim
|
|
<$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
|
|
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
|
{{$:/core/images/options-button}}
|
|
</$list>
|
|
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/ControlPanel/Caption}}/></span>
|
|
</$list>
|
|
</$button>
|
|
\end
|
|
|
|
<$list filter="[list<tv-story-list>] +[field:title[$:/ControlPanel]]" emptyMessage=<<control-panel-button>>>
|
|
<<control-panel-button "tc-selected">>
|
|
</$list>
|