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

Update PageControls buttons to use v5.3.2 syntax (#8579)

* Let PageControls buttons use v5.3.2 syntax

* Rewrite buttons and actions

* Omit whitespace & use function to avoid duplicating

* Omit whitespace in conditional syntax
* Define tf.get-tags function to avoid duplicated text substitution
* Rewrite advanced search button

* Add space in join operator

* Rewrite buttons in plugins

* Remove tf prefix in new-journal.tid

* Remove tf prefix in new-tiddler.tid
This commit is contained in:
Leilei332 2024-09-10 19:00:13 +08:00 committed by GitHub
parent 1368cd67ca
commit eaf8558595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 174 additions and 189 deletions

View File

@ -2,10 +2,10 @@ title: $:/core/ui/Actions/new-journal
tags: $:/tags/Actions
description: create a new journal tiddler
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
\whitespace trim
<$vars journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
<$wikify name="journalTitle" text="<$macrocall $name='now' format=<<journalTitleTemplate>>/>">
\function get-tags() [<textFieldTags>] [<tagsFieldTags>] +[join[ ]]
<$let journalTitleTemplate={{$:/config/NewJournal/Title}} textFieldTags={{$:/config/NewJournal/Tags}} tagsFieldTags={{$:/config/NewJournal/Tags!!tags}} journalText={{$:/config/NewJournal/Text}}>
<$wikify name="journalTitle" text="<$transclude $variable='now' format=<<journalTitleTemplate>>/>">
<$reveal type="nomatch" state=<<journalTitle>> text="">
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text={{{ [<journalTitle>get[]] }}}/>
</$reveal>
@ -13,4 +13,4 @@ description: create a new journal tiddler
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<get-tags>> text=<<journalText>>/>
</$reveal>
</$wikify>
</$vars>
</$let>

View File

@ -2,8 +2,8 @@ title: $:/core/ui/Actions/new-tiddler
tags: $:/tags/Actions
description: create a new empty tiddler
\define get-tags() $(textFieldTags)$ $(tagsFieldTags)$
\whitespace trim
<$vars textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
\function get-tags() [<textFieldTags>] [<tagsFieldTags>] +[join[ ]]
<$let textFieldTags={{$:/config/NewTiddler/Tags}} tagsFieldTags={{$:/config/NewTiddler/Tags!!tags}}>
<$action-sendmessage $message="tm-new-tiddler" tags=<<get-tags>>/>
</$vars>
</$let>

View File

@ -4,15 +4,14 @@ caption: {{$:/core/images/advanced-search-button}} {{$:/language/Buttons/Advance
description: {{$:/language/Buttons/AdvancedSearch/Hint}}
\whitespace trim
\define advanced-search-button(class)
\whitespace trim
<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
\procedure advanced-search-button(class)
<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`>
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/advanced-search-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/AdvancedSearch/Caption}}/></span>
</$list>
<%endif%>
</$button>
\end

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/CloseAll/Hint}}
\whitespace trim
<$button message="tm-close-all-tiddlers" tooltip={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/close-all-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/CloseAll/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -4,15 +4,14 @@ caption: {{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Ca
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]]">
\procedure control-panel-button(class)
<$button to="$:/ControlPanel" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`>
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/options-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/ControlPanel/Caption}}/></span>
</$list>
<%endif%>
</$button>
\end

View File

@ -6,25 +6,25 @@ description: {{$:/language/Buttons/Encryption/Hint}}
\whitespace trim
<$reveal type="match" state="$:/isEncrypted" text="yes">
<$button message="tm-clear-password" tooltip={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/locked-padlock}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
</$reveal>
<$reveal type="nomatch" state="$:/isEncrypted" text="yes">
<$button message="tm-set-password" tooltip={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/unlocked-padlock}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
</$reveal>

View File

@ -3,4 +3,4 @@ tags: $:/tags/PageControls
caption: {{$:/core/images/export-button}} {{$:/language/Buttons/ExportPage/Caption}}
description: {{$:/language/Buttons/ExportPage/Hint}}
<$macrocall $name="exportButton" exportFilter="[!is[system]sort[title]]" lingoBase="$:/language/Buttons/ExportPage/"/>
<$transclude $variable="exportButton" exportFilter="[!is[system]sort[title]]" lingoBase="$:/language/Buttons/ExportPage/"/>

View File

@ -6,12 +6,12 @@ description: {{$:/language/Buttons/FoldAll/Hint}}
\whitespace trim
<$button tooltip={{$:/language/Buttons/FoldAll/Hint}} aria-label={{$:/language/Buttons/FoldAll/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-fold-all-tiddlers" $param=<<currentTiddler>> foldedStatePrefix="$:/state/folded/"/>
<$list filter="[<tv-config-toolbar-icons>match[yes]]" variable="listItem">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/fold-all-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/FoldAll/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/FullScreen/Hint}}
\whitespace trim
<$button message="tm-full-screen" tooltip={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/full-screen-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/FullScreen/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Home/Hint}}
\whitespace trim
<$button message="tm-home" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/home-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Home/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -6,14 +6,14 @@ description: {{$:/language/Buttons/Import/Hint}}
\whitespace trim
<div class="tc-file-input-wrapper">
<$button tooltip={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/import-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Import/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
<$browse tooltip={{$:/language/Buttons/Import/Hint}}/>
</div>

View File

@ -4,21 +4,18 @@ caption: {{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}}
description: {{$:/language/Buttons/Language/Hint}}
\whitespace trim
\define flag-title()
$(languagePluginTitle)$/icon
\end
<span class="tc-popup-keep">
<$button popup=<<qualify "$:/state/popup/language">> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<span class="tc-image-button">
<$set name="languagePluginTitle" value={{$:/language}}>
<$image source=<<flag-title>>/>
</$set>
</span>
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
<span class="tc-image-button">
<$set name="languagePluginTitle" value={{$:/language}}>
<$image source=`$(languagePluginTitle)$/icon`/>
</$set>
</span>
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Language/Caption}}/></span>
</$list>
<%endif%>
</$button>
</span>
<$reveal state=<<qualify "$:/state/popup/language">> type="popup" position="below" animate="yes">

View File

@ -6,10 +6,10 @@ description: {{$:/language/LayoutSwitcher/Description}}
\whitespace trim
<$button tooltip={{$:/language/Buttons/LayoutSwitcher/Hint}} aria-label={{$:/language/Buttons/LayoutSwitcher/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-show-switcher" switch="layout"/>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/layout-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/LayoutSwitcher/Caption}}/></span>
</$list>
<%endif%>
</$button>

View File

@ -4,17 +4,16 @@ caption: {{$:/core/images/list}} {{$:/language/Buttons/Manager/Caption}}
description: {{$:/language/Buttons/Manager/Hint}}
\whitespace trim
\define manager-button(class)
\whitespace trim
<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
\procedure manager-button(class)
<$button to="$:/Manager" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`>
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/list}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Manager/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
\end

View File

@ -12,20 +12,18 @@ description: {{$:/language/Buttons/More/Hint}}
class=<<tv-config-toolbar-class>>
selectedClass="tc-selected"
>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/down-arrow}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/More/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
<div class="tc-drop-down">
<$set name="tv-config-toolbar-icons" value="yes">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$let tv-config-toolbar-icons="yes" tv-config-toolbar-text="yes" tv-config-toolbar-class="tc-btn-invisible">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]"
variable="listItem"
>
@ -37,8 +35,6 @@ description: {{$:/language/Buttons/More/Hint}}
</$set>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</$let>
</div>
</$reveal>

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/NetworkActivity/Hint}}
\whitespace trim
<$button message="tm-http-cancel-all-requests" tooltip={{$:/language/Buttons/NetworkActivity/Hint}} aria-label={{$:/language/Buttons/NetworkActivity/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/network-activity}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/NetworkActivity/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/NewImage/Hint}}
\whitespace trim
<$button tooltip={{$:/language/Buttons/NewImage/Hint}} aria-label={{$:/language/Buttons/NewImage/Caption}} class=<<tv-config-toolbar-class>> actions={{$:/core/ui/Actions/new-image}}>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/new-image-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/NewImage/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -4,17 +4,16 @@ caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/
description: {{$:/language/Buttons/NewJournal/Hint}}
\whitespace trim
\define journalButton()
\whitespace trim
\procedure journalButton()
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>> actions={{$:/core/ui/Actions/new-journal}}>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/new-journal-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/NewJournal/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
\end
<<journalButton>>

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/NewTiddler/Hint}}
\whitespace trim
<$button actions={{$:/core/ui/Actions/new-tiddler}} tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/new-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/NewTiddler/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -6,12 +6,12 @@ description: {{$:/language/Buttons/Palette/Hint}}
\whitespace trim
<span class="tc-popup-keep">
<$button popup=<<qualify "$:/state/popup/palette">> tooltip={{$:/language/Buttons/Palette/Hint}} aria-label={{$:/language/Buttons/Palette/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/palette}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Palette/Caption}}/></span>
</$list>
<%endif%>
</$button>
</span>
<$reveal state=<<qualify "$:/state/popup/palette">> type="popup" position="below" animate="yes">

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Print/Hint}}
\whitespace trim
<$button message="tm-print" tooltip={{$:/language/Buttons/Print/Hint}} aria-label={{$:/language/Buttons/Print/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/print-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Print/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -5,12 +5,12 @@ description: {{$:/language/Buttons/Refresh/Hint}}
\whitespace trim
<$button message="tm-browser-refresh" tooltip={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/refresh-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Refresh/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -9,13 +9,13 @@ description: {{$:/language/Buttons/SaveWiki/Hint}}
<$action-sendmessage $message="tm-save-wiki" $param={{$:/config/SaveWikiButton/Template}} filename=<<site-title>>/>
</$wikify>
<span class="tc-dirty-indicator">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/save-button-dynamic}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/SaveWiki/Caption}}/>
</span>
</$list>
<%endif%>
</span>
</$button>

View File

@ -4,19 +4,16 @@ caption: {{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Ca
description: {{$:/language/Buttons/StoryView/Hint}}
\whitespace trim
\define icon()
$:/core/images/storyview-$(storyview)$
\end
<span class="tc-popup-keep">
<$button popup=<<qualify "$:/state/popup/storyview">> tooltip={{$:/language/Buttons/StoryView/Hint}} aria-label={{$:/language/Buttons/StoryView/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
<$set name="storyview" value={{$:/view}}>
<$transclude tiddler=<<icon>>/>
<$transclude tiddler=`$:/core/images/storyview-$(storyview)$`/>
</$set>
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/StoryView/Caption}}/></span>
</$list>
<%endif%>
</$button>
</span>
<$reveal state=<<qualify "$:/state/popup/storyview">> type="popup" position="below" animate="yes">

View File

@ -4,17 +4,16 @@ caption: {{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption}
description: {{$:/language/Buttons/TagManager/Hint}}
\whitespace trim
\define control-panel-button(class)
\whitespace trim
<$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class="""$(tv-config-toolbar-class)$ $class$""">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
\procedure control-panel-button(class)
<$button to="$:/TagManager" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=`$(tv-config-toolbar-class)$ $(class)$`>
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/tag-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/TagManager/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
\end

View File

@ -6,12 +6,12 @@ description: {{$:/language/Buttons/Theme/Hint}}
\whitespace trim
<span class="tc-popup-keep">
<$button popup=<<qualify "$:/state/popup/theme">> tooltip={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/theme-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Theme/Caption}}/></span>
</$list>
<%endif%>
</$button>
</span>
<$reveal state=<<qualify "$:/state/popup/theme">> type="popup" position="below" animate="yes">

View File

@ -7,26 +7,26 @@ description: {{$:/language/Buttons/Timestamp/Hint}}
<$reveal type="nomatch" state="$:/config/TimestampDisable" text="yes">
<$button tooltip={{$:/language/Buttons/Timestamp/On/Hint}} aria-label={{$:/language/Buttons/Timestamp/On/Caption}} class=<<tv-config-toolbar-class>>>
<$action-setfield $tiddler="$:/config/TimestampDisable" $value="yes"/>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/timestamp-on}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Timestamp/On/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
</$reveal>
<$reveal type="match" state="$:/config/TimestampDisable" text="yes">
<$button tooltip={{$:/language/Buttons/Timestamp/Off/Hint}} aria-label={{$:/language/Buttons/Timestamp/Off/Caption}} class=<<tv-config-toolbar-class>>>
<$action-setfield $tiddler="$:/config/TimestampDisable" $value="no"/>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/timestamp-off}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/Timestamp/Off/Caption}}/>
</span>
</$list>
<%endif%>
</$button>
</$reveal>

View File

@ -6,12 +6,12 @@ description: {{$:/language/Buttons/UnfoldAll/Hint}}
\whitespace trim
<$button tooltip={{$:/language/Buttons/UnfoldAll/Hint}} aria-label={{$:/language/Buttons/UnfoldAll/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-unfold-all-tiddlers" $param=<<currentTiddler>> foldedStatePrefix="$:/state/folded/"/>
<$list filter="[<tv-config-toolbar-icons>match[yes]]" variable="listItem">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/unfold-all-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text">
<$text text={{$:/language/Buttons/UnfoldAll/Caption}}/>
</span>
</$list>
<%endif%>
</$button>

View File

@ -8,22 +8,22 @@ description: {{$:/language/Buttons/Help/Hint}}
\whitespace trim
<$list filter="[[$:/config/ShowHelp]get[text]] +[else[no]match[yes]]" variable="ignore">
<$button set="$:/config/ShowHelp" setTo="no" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class="""$(tv-config-toolbar-class)$ tc-selected""">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/help}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Help/Caption}}/></span>
</$list>
<%endif%>
</$button>
</$list>
<$list filter="[[$:/config/ShowHelp]get[text]] +[else[no]!match[yes]]" variable="ignore">
<$button set="$:/config/ShowHelp" setTo="yes" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/core/images/help}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Help/Caption}}/></span>
</$list>
<%endif%>
</$button>
</$list>
\end

View File

@ -7,10 +7,10 @@ list-after: $:/core/ui/Buttons/new-tiddler
\whitespace trim
<$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" type="text/markdown"/>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/plugins/tiddlywiki/markdown-legacy/images/new-markdown-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewMarkdown/Caption}}/></span>
</$list>
<%endif%>
</$button>

View File

@ -7,10 +7,10 @@ list-after: $:/core/ui/Buttons/new-tiddler
\whitespace trim
<$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" type="text/markdown"/>
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/plugins/tiddlywiki/markdown/images/new-markdown-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewMarkdown/Caption}}/></span>
</$list>
<%endif%>
</$button>

View File

@ -9,12 +9,12 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
\end
<$button popup=<<qualify "$:/state/popup/save-wiki">> tooltip="Status of synchronisation with server" aria-label="Server status" class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<span class="tc-dirty-indicator">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<%if [<tv-config-toolbar-icons>match[yes]] %>
{{$:/plugins/tiddlywiki/tiddlyweb/icon/cloud}}
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<%endif%>
<%if [<tv-config-toolbar-text>match[yes]] %>
<span class="tc-btn-text"><$text text="Server status"/></span>
</$list>
<%endif%>
</span>
</$button>
<$reveal state=<<qualify "$:/state/popup/save-wiki">> type="popup" position="belowleft" animate="yes">