mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Extend control panel plugins tab
Now we display plugin icons, and an accordion containing information tabs exposed by the plugin.
This commit is contained in:
parent
c5b941dc1a
commit
2c4e9a64e9
@ -3,11 +3,24 @@ tags: $:/tags/ControlPanel
|
|||||||
caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Plugins/
|
\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)
|
\define plugin-table(type)
|
||||||
|
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
|
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
<<lingo Fields/Description>>
|
<<lingo Fields/Description>>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@ -15,9 +28,23 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]">
|
<$list filter="[!has[draft.of]plugin-type[$type$]sort[description]]">
|
||||||
|
<$set name="popup-state" value=<<popup-state-macro>>>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<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}}>
|
<$link to={{!!title}}>
|
||||||
|
<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>/>
|
||||||
''<$view field="description"><$view field="title"/></$view>''<br>
|
''<$view field="description"><$view field="title"/></$view>''<br>
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
</$link>
|
</$link>
|
||||||
@ -26,9 +53,23 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
|
|||||||
<$view field="version"/>
|
<$view field="version"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
</$list>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</$set>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
! <<lingo Plugin/Prompt>>
|
! <<lingo Plugin/Prompt>>
|
||||||
|
15
core/ui/PluginInfo.tid
Normal file
15
core/ui/PluginInfo.tid
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user