1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-12 21:09:57 +00:00
TiddlyWiki5/core/ui/ViewToolbar/new-here.tid
Jeremy Ruston dbaccf792d Use the new "match" operator across the core
Instead of the old "prefix" hack
2019-07-31 09:30:16 +01:00

24 lines
836 B
Plaintext

title: $:/core/ui/Buttons/new-here
tags: $:/tags/ViewToolbar
caption: {{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Caption}}
description: {{$:/language/Buttons/NewHere/Hint}}
\whitespace trim
\define newHereActions()
<$set name="tags" filter="[<currentTiddler>]">
<$action-sendmessage $message="tm-new-tiddler" tags=<<tags>>/>
</$set>
\end
\define newHereButton()
<$button actions=<<newHereActions>> tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/new-here-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/NewHere/Caption}}/>
</span>
</$list>
</$button>
\end
<<newHereButton>>