kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Extend control panel plugins tab
Now we display plugin icons, and an accordion containing information tabs exposed by the plugin.print-window-tiddler
rodzic
c5b941dc1a
commit
2c4e9a64e9
|
@ -3,11 +3,24 @@ 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
|
||||
\define plugin-table(type)
|
||||
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
<th>
|
||||
<<lingo Fields/Description>>
|
||||
</th>
|
||||
<th>
|
||||
|
@ -15,9 +28,23 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
|||
</th>
|
||||
</tr>
|
||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]">
|
||||
<$set name="popup-state" value=<<popup-state-macro>>>
|
||||
<tr>
|
||||
<td>
|
||||
<$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>
|
||||
</td>
|
||||
<td>
|
||||
<$link to={{!!title}}>
|
||||
<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>/>
|
||||
''<$view field="description"><$view field="title"/></$view>''<br>
|
||||
<$view field="title"/>
|
||||
</$link>
|
||||
|
@ -26,9 +53,23 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
|||
<$view field="version"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<$reveal type="match" text="yes" state=<<popup-state>>>
|
||||
<$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">
|
||||
<$transclude tiddler="$:/core/ui/TiddlerInfo/Advanced/PluginInfo"/>
|
||||
</$reveal>
|
||||
</$reveal>
|
||||
</td>
|
||||
</tr>
|
||||
</$set>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
! <<lingo Plugin/Prompt>>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
title: $:/core/ui/PluginInfo
|
||||
|
||||
\define localised-info-tiddler-title()
|
||||
$(currentTiddler)$/$(languageTitle)$/$(currentTab)$
|
||||
\end
|
||||
\define info-tiddler-title()
|
||||
$(currentTiddler)$/$(currentTab)$
|
||||
\end
|
||||
<$transclude tiddler=<<localised-info-tiddler-title>> mode="block">
|
||||
<$transclude tiddler=<<currentTiddler>> subtiddler=<<localised-info-tiddler-title>> mode="block">
|
||||
<$transclude tiddler=<<currentTiddler>> subtiddler=<<info-tiddler-title>> mode="block">
|
||||
No ''"<$text text=<<currentTab>>/>"'' found
|
||||
</$transclude>
|
||||
</$transclude>
|
||||
</$transclude>
|
Ładowanie…
Reference in New Issue