mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-02 08:33:01 +00:00
AddPlugins: Add new "updates" tab
This commit is contained in:
66
core/ui/ControlPanel/Plugins/Add/Updates.tid
Normal file
66
core/ui/ControlPanel/Plugins/Add/Updates.tid
Normal file
@@ -0,0 +1,66 @@
|
||||
title: $:/core/ui/ControlPanel/Plugins/Add/Updates
|
||||
caption: <$importvariables filter="$:/core/ui/ControlPanel/Plugins/Add/Updates">{{$:/language/ControlPanel/Plugins/Updates/Caption}} (<<upgrade-count>>)</$importvariables>
|
||||
|
||||
\define each-upgradeable-plugin(body)
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}sort[title]]" variable="assetInfo">
|
||||
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
||||
<$list filter="[<assetInfo>get[original-title]has[version]!version<libraryVersion>]" variable="ignore">
|
||||
<$set name="installedVersion" value={{{ [<assetInfo>get[original-title]get[version]] }}}>
|
||||
<$list filter="[<installedversion>!match<libraryVersion>]" variable="ignore">
|
||||
$body$
|
||||
</$list>
|
||||
</$set>
|
||||
</$list>
|
||||
</$set>
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\define upgrade-all-actions()
|
||||
<$macrocall $name="each-upgradeable-plugin" body="""
|
||||
<<install-plugin-actions>>
|
||||
"""/>
|
||||
\end
|
||||
|
||||
\define upgrade-count()
|
||||
<$wikify name="count-filter" text=<<each-upgradeable-plugin "[[<$text text=<<assetInfo>>/>]]">>><$count filter=<<count-filter>>/></$wikify>
|
||||
\end
|
||||
|
||||
<$button actions=<<upgrade-all-actions>> class="tc-btn-invisible tc-install-plugin">
|
||||
{{$:/core/images/download-button}} {{||$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption}}
|
||||
</$button>
|
||||
|
||||
<table class="tc-plugin-library-listing">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Plugin
|
||||
</th>
|
||||
<th>
|
||||
Installed
|
||||
</th>
|
||||
<th>
|
||||
Available
|
||||
</th>
|
||||
<th>
|
||||
Install
|
||||
</th>
|
||||
</tr>
|
||||
<$macrocall $name="each-upgradeable-plugin" body="""<tr>
|
||||
<td>
|
||||
<strong><$text text={{{ [<assetInfo>get[name]] ~[<assetInfo>get[original-title]split[/]last[1]] }}}/></strong>: <$view tiddler=<<assetInfo>> field="description"/>
|
||||
<br>
|
||||
<$text text={{{ [<assetInfo>get[original-title]] }}}/>
|
||||
</td>
|
||||
<td>
|
||||
<$text text=<<installedVersion>>/>
|
||||
</td>
|
||||
<td>
|
||||
<$text text=<<libraryVersion>>/>
|
||||
</td>
|
||||
<td>
|
||||
<<install-plugin-button>>
|
||||
</td>
|
||||
</tr>
|
||||
"""/>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user