mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
AddPlugins: Add new "updates" tab
This commit is contained in:
parent
bc8859b550
commit
308ac8c5b0
@ -87,6 +87,9 @@ Plugins/Plugins/Hint: Plugins
|
||||
Plugins/Reinstall/Caption: reinstall
|
||||
Plugins/Themes/Caption: Themes
|
||||
Plugins/Themes/Hint: Theme plugins
|
||||
Plugins/Updates/Caption: Updates
|
||||
Plugins/Updates/Hint: Available updates to installed plugins
|
||||
Plugins/Updates/UpdateAll/Caption: Update <<upgrade-count>> plugins
|
||||
Plugins/SubPluginPrompt: With <<count>> sub-plugins available
|
||||
Saving/Caption: Saving
|
||||
Saving/DownloadSaver/AutoSave/Description: Permit automatic saving for the download saver
|
||||
|
@ -131,7 +131,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
\define display-server-connection()
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<<load-plugin-library-button>>>
|
||||
|
||||
<<tabs "[[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]" "$:/core/ui/ControlPanel/Plugins/Add/Plugins">>
|
||||
<<tabs "[[$:/core/ui/ControlPanel/Plugins/Add/Updates]] [[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]" "$:/core/ui/ControlPanel/Plugins/Add/Plugins">>
|
||||
|
||||
</$list>
|
||||
\end
|
||||
|
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>
|
Loading…
Reference in New Issue
Block a user