1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-08 19:09:57 +00:00
TiddlyWiki5/core/ui/ControlPanel/Plugins.tid

102 lines
3.2 KiB
Plaintext
Raw Normal View History

title: $:/core/ui/ControlPanel/Plugins
tags: $:/tags/ControlPanel
caption: {{$:/language/ControlPanel/Plugins/Caption}}
\define lingo-base() $:/language/ControlPanel/Plugins/
\define popup-state-macro()
$(qualified-state)$-$(currentTiddler)$
\end
\define tabs-state-macro()
$(popup-state)$-$(pluginInfoType)$
\end
\define plugin-icon-title()
$(currentTiddler)$/icon
\end
2014-08-15 20:10:40 +00:00
\define plugin-disable-title()
$:/config/Plugins/Disabled/$(currentTiddler)$
\end
\define plugin-table-body(type,disabledMessage)
<div class="tw-plugin-info-chunk">
<$reveal type="nomatch" state=<<popup-state>> text="yes">
<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="yes">
{{$:/core/images/right-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<popup-state>> text="yes">
<$button class="btn-invisible btn-dropdown" set=<<popup-state>> setTo="no">
{{$:/core/images/down-arrow}}
</$button>
</$reveal>
</div>
<div class="tw-plugin-info-chunk">
<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>
<$transclude tiddler="$:/core/images/plugin-generic-$type$"/>
</$transclude>
</div>
<div class="tw-plugin-info-chunk">
<div>
2014-08-15 20:10:40 +00:00
''<$view field="description"><$view field="title"/></$view>'' $disabledMessage$
</div>
<div>
<$view field="title"/>
</div>
<div>
<$view field="version"/>
</div>
</div>
2014-08-15 20:10:40 +00:00
\end
\define plugin-table(type)
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]" emptyMessage=<<lingo "Empty/Hint">>>
<$set name="popup-state" value=<<popup-state-macro>>>
<$reveal type="nomatch" state=<<plugin-disable-title>> text="yes">
<$link to={{!!title}} class="tw-plugin-info">
<<plugin-table-body type:"$type$">>
</$link>
</$reveal>
<$reveal type="match" state=<<plugin-disable-title>> text="yes">
<$link to={{!!title}} class="tw-plugin-info tw-plugin-info-disabled">
<<plugin-table-body type:"$type$" disabledMessage:"<$macrocall $name='lingo' title='Disabled/Status'/>">>
</$link>
2014-08-15 20:10:40 +00:00
</$reveal>
<$reveal type="match" text="yes" state=<<popup-state>>>
<div class="tw-plugin-info-dropdown">
2014-08-15 20:10:40 +00:00
<$list filter="[all[current]] -[[$:/core]]">
<div style="float:right;">
<$reveal type="nomatch" state=<<plugin-disable-title>> text="yes">
<$button set=<<plugin-disable-title>> setTo="yes" title={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}>
<<lingo Disable/Caption>>
</$button>
</$reveal>
<$reveal type="match" state=<<plugin-disable-title>> text="yes">
<$button set=<<plugin-disable-title>> setTo="no" title={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}>
<<lingo Enable/Caption>>
</$button>
</$reveal>
</div>
2014-08-15 20:10:40 +00:00
</$list>
<$reveal type="nomatch" text="" state="!!list">
<$macrocall $name="tabs" state=<<tabs-state-macro>> tabsList={{!!list}} default="readme" template="$:/core/ui/PluginInfo"/>
</$reveal>
<$reveal type="match" text="" state="!!list">
No information provided
</$reveal>
2014-08-15 20:10:40 +00:00
</div>
</$reveal>
</$set>
</$list>
</$set>
\end
! <<lingo Plugin/Prompt>>
<<plugin-table plugin>>
! <<lingo Theme/Prompt>>
<<plugin-table theme>>
! <<lingo Language/Prompt>>
<<plugin-table language>>