2015-03-18 11:46:28 +00:00
|
|
|
title: $:/core/ui/ControlPanel/Modals/AddPlugins
|
|
|
|
subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}}
|
|
|
|
|
2020-04-09 10:06:54 +00:00
|
|
|
\define install-plugin-actions()
|
2015-03-18 11:46:28 +00:00
|
|
|
<$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>
|
2019-09-25 20:57:22 +00:00
|
|
|
<$set name="url" value={{!!url}}>
|
|
|
|
<$set name="currentTiddler" value=<<assetInfo>>>
|
|
|
|
<$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[title]]" variable="dependency">
|
|
|
|
<$action-sendmessage $message="tm-load-plugin-from-library" url=<<url>> title=<<dependency>>/>
|
|
|
|
</$list>
|
|
|
|
</$set>
|
|
|
|
</$set>
|
2020-04-09 10:06:54 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
\define install-plugin-button()
|
|
|
|
<div>
|
2020-04-13 09:04:14 +00:00
|
|
|
<$set name="libraryVersion" value={{{ [<assetInfo>get[version]] }}}>
|
|
|
|
<$set name="installedVersion" value={{{ [<assetInfo>get[original-title]get[version]] }}}>
|
|
|
|
<$set name="reinstall-type" value={{{ [<libraryVersion>compare:version:eq<installedVersion>then[tc-reinstall]] [<libraryVersion>compare:version:gt<installedVersion>then[tc-reinstall-upgrade]] [<libraryVersion>compare:version:lt<installedVersion>then[tc-reinstall-downgrade]] }}}>
|
|
|
|
<$button actions=<<install-plugin-actions>> class={{{ [<assetInfo>get[original-title]has[version]then<reinstall-type>] tc-btn-invisible tc-install-plugin +[join[ ]] }}}>
|
2019-09-19 12:20:07 +00:00
|
|
|
{{$:/core/images/download-button}}
|
2020-04-13 09:04:14 +00:00
|
|
|
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Install/Caption}}">
|
|
|
|
<$list filter="[<libraryVersion>compare:version:gt<installedVersion>]" variable="ignore" emptyMessage="""
|
|
|
|
<$list filter="[<libraryVersion>compare:version:lt<installedVersion>]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}">
|
|
|
|
{{$:/language/ControlPanel/Plugins/Downgrade/Caption}}
|
|
|
|
</$list>
|
|
|
|
""">
|
|
|
|
{{$:/language/ControlPanel/Plugins/Update/Caption}}
|
|
|
|
</$list>
|
2015-03-18 11:46:28 +00:00
|
|
|
</$list>
|
|
|
|
</$button>
|
2019-09-19 12:20:07 +00:00
|
|
|
<div>
|
|
|
|
</div>
|
2019-09-27 15:47:55 +00:00
|
|
|
<$reveal stateTitle=<<assetInfo>> stateField="requires-reload" type="match" text="yes">{{$:/language/ControlPanel/Plugins/PluginWillRequireReload}}</$reveal>
|
2020-04-13 09:04:14 +00:00
|
|
|
</$set>
|
|
|
|
</$set>
|
|
|
|
</$set>
|
2019-09-19 12:20:07 +00:00
|
|
|
</div>
|
2015-03-18 11:46:28 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
\define popup-state-macro()
|
|
|
|
$:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
|
|
|
\end
|
|
|
|
|
|
|
|
\define display-plugin-info(type)
|
|
|
|
<$set name="popup-state" value=<<popup-state-macro>>>
|
|
|
|
<div class="tc-plugin-info">
|
2019-09-19 12:20:07 +00:00
|
|
|
<div class="tc-plugin-info-chunk tc-plugin-info-toggle">
|
2015-03-18 11:46:28 +00:00
|
|
|
<$reveal type="nomatch" state=<<popup-state>> text="yes">
|
|
|
|
<$button class="tc-btn-invisible tc-btn-dropdown" set=<<popup-state>> setTo="yes">
|
2019-09-20 13:30:52 +00:00
|
|
|
{{$:/core/images/chevron-right}}
|
2015-03-18 11:46:28 +00:00
|
|
|
</$button>
|
|
|
|
</$reveal>
|
|
|
|
<$reveal type="match" state=<<popup-state>> text="yes">
|
|
|
|
<$button class="tc-btn-invisible tc-btn-dropdown" set=<<popup-state>> setTo="no">
|
2019-09-20 13:30:52 +00:00
|
|
|
{{$:/core/images/chevron-down}}
|
2015-03-18 11:46:28 +00:00
|
|
|
</$button>
|
|
|
|
</$reveal>
|
|
|
|
</div>
|
2019-09-19 12:20:07 +00:00
|
|
|
<div class="tc-plugin-info-chunk tc-plugin-info-icon">
|
2015-03-18 11:46:28 +00:00
|
|
|
<$list filter="[<assetInfo>has[icon]]" emptyMessage="""<$transclude tiddler="$:/core/images/plugin-generic-$type$"/>""">
|
|
|
|
<img src={{$(assetInfo)$!!icon}}/>
|
|
|
|
</$list>
|
|
|
|
</div>
|
2019-09-19 12:20:07 +00:00
|
|
|
<div class="tc-plugin-info-chunk tc-plugin-info-description">
|
2019-09-16 11:15:39 +00:00
|
|
|
<h1><strong><$text text={{{ [<assetInfo>get[name]] ~[<assetInfo>get[original-title]split[/]last[1]] }}}/></strong>: <$view tiddler=<<assetInfo>> field="description"/></h1>
|
2015-03-18 11:46:28 +00:00
|
|
|
<h2><$view tiddler=<<assetInfo>> field="original-title"/></h2>
|
|
|
|
<div><em><$view tiddler=<<assetInfo>> field="version"/></em></div>
|
2020-04-13 09:03:24 +00:00
|
|
|
<$list filter="[<assetInfo>get[original-title]get[version]]" variable="installedVersion"><div><em>{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}</em></div></$list>
|
2015-03-18 11:46:28 +00:00
|
|
|
</div>
|
2019-09-19 12:20:07 +00:00
|
|
|
<div class="tc-plugin-info-chunk tc-plugin-info-buttons">
|
2015-03-18 11:46:28 +00:00
|
|
|
<<install-plugin-button>>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-09 10:06:54 +00:00
|
|
|
<$set name="original-title" value={{{ [<assetInfo>get[original-title]] }}}>
|
2015-03-18 11:46:28 +00:00
|
|
|
<$reveal type="match" text="yes" state=<<popup-state>>>
|
|
|
|
<div class="tc-plugin-info-dropdown">
|
2020-04-13 10:35:52 +00:00
|
|
|
<$list filter="[enlist{!!dependents}] [<currentTiddler>get[parent-plugin]] +[limit[1]] ~[<assetInfo>get[original-title]!is[tiddler]]" variable="ignore">
|
2015-03-18 11:46:28 +00:00
|
|
|
<div class="tc-plugin-info-dropdown-message">
|
2020-04-13 10:35:52 +00:00
|
|
|
<$list filter="[<assetInfo>get[original-title]!is[tiddler]]">
|
|
|
|
{{$:/language/ControlPanel/Plugins/NotInstalled/Hint}}
|
2015-03-18 11:46:28 +00:00
|
|
|
</$list>
|
2019-09-25 20:57:22 +00:00
|
|
|
<$set name="currentTiddler" value=<<assetInfo>>>
|
|
|
|
<$list filter="[enlist{!!dependents}] [<currentTiddler>get[parent-plugin]] +[limit[1]]" variable="ignore">
|
|
|
|
<div>
|
2019-09-28 09:06:18 +00:00
|
|
|
{{$:/language/ControlPanel/Plugins/AlsoRequires}}
|
2019-09-25 20:57:22 +00:00
|
|
|
<$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[title]]" variable="dependency">
|
|
|
|
<$text text=<<dependency>>/>
|
|
|
|
</$list>
|
|
|
|
</div>
|
|
|
|
</$list>
|
|
|
|
</$set>
|
2015-03-18 11:46:28 +00:00
|
|
|
</div>
|
2020-04-13 10:35:52 +00:00
|
|
|
</$list>
|
2015-03-18 11:46:28 +00:00
|
|
|
<div class="tc-plugin-info-dropdown-body">
|
|
|
|
<$transclude tiddler=<<assetInfo>> field="readme" mode="block"/>
|
|
|
|
</div>
|
2019-09-28 10:49:09 +00:00
|
|
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>limit[1]]" variable="ignore">
|
|
|
|
<div class="tc-plugin-info-sub-plugins">
|
2020-04-06 09:15:18 +00:00
|
|
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>sort[title]]" variable="assetInfo">
|
2019-09-25 15:16:28 +00:00
|
|
|
<<display-plugin-info "$type$">>
|
|
|
|
</$list>
|
|
|
|
</div>
|
2019-09-28 10:49:09 +00:00
|
|
|
</$list>
|
2015-03-18 11:46:28 +00:00
|
|
|
</div>
|
|
|
|
</$reveal>
|
2020-04-09 10:06:54 +00:00
|
|
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>limit[1]]" variable="ignore">
|
|
|
|
<$reveal type="nomatch" text="yes" state=<<popup-state>> tag="div" class="tc-plugin-info-sub-plugin-indicator">
|
|
|
|
<$wikify name="count" text="""<$count filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-plugin<original-title>]"/>""">
|
|
|
|
<$button class="tc-btn-invisible" set=<<popup-state>> setTo="yes">
|
|
|
|
{{$:/language/ControlPanel/Plugins/SubPluginPrompt}}
|
|
|
|
</$button>
|
|
|
|
</$wikify>
|
|
|
|
</$reveal>
|
|
|
|
</$list>
|
|
|
|
</$set>
|
2015-03-18 11:46:28 +00:00
|
|
|
</$set>
|
|
|
|
\end
|
|
|
|
|
|
|
|
\define load-plugin-library-button()
|
2020-04-20 12:28:02 +00:00
|
|
|
<$list filter="[<currentTiddler>get[enabled]else[yes]match[yes]]" variable="ignore">
|
2015-03-18 11:46:28 +00:00
|
|
|
<$button class="tc-btn-big-green">
|
|
|
|
<$action-sendmessage $message="tm-load-plugin-library" url={{!!url}} infoTitlePrefix="$:/temp/RemoteAssetInfo/"/>
|
2015-10-18 09:18:22 +00:00
|
|
|
{{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}}
|
2015-03-18 11:46:28 +00:00
|
|
|
</$button>
|
2020-04-20 12:28:02 +00:00
|
|
|
</$list>
|
2015-03-18 11:46:28 +00:00
|
|
|
\end
|
|
|
|
|
|
|
|
\define display-server-assets(type)
|
2015-10-18 09:18:22 +00:00
|
|
|
{{$:/language/Search/Search}}: <$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input"/>
|
2015-03-18 11:46:28 +00:00
|
|
|
<$reveal state="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" type="nomatch" text="">
|
|
|
|
<$button class="tc-btn-invisible">
|
|
|
|
<$action-setfield $tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" $field="text" $value=""/>
|
|
|
|
{{$:/core/images/close-button}}
|
|
|
|
</$button>
|
|
|
|
</$reveal>
|
|
|
|
<div class="tc-plugin-library-listing">
|
2020-04-06 09:15:18 +00:00
|
|
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]search:author,description,original-title,readme,title{$:/temp/RemoteAssetSearch/$(currentTiddler)$}sort[title]]" variable="assetInfo">
|
2019-09-25 15:16:28 +00:00
|
|
|
<$list filter="[[$:/temp/RemoteAssetSearch/$(currentTiddler)$]has[text]] ~[<assetInfo>!has[parent-plugin]]" variable="ignore"><!-- Hide sub-plugins if we're not searching -->
|
2015-03-18 11:46:28 +00:00
|
|
|
<<display-plugin-info "$type$">>
|
|
|
|
</$list>
|
2019-09-25 15:16:28 +00:00
|
|
|
</$list>
|
2015-03-18 11:46:28 +00:00
|
|
|
</div>
|
|
|
|
\end
|
|
|
|
|
|
|
|
\define display-server-connection()
|
|
|
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<<load-plugin-library-button>>>
|
|
|
|
|
2020-04-13 10:28:24 +00:00
|
|
|
<$set name="transclusion" value=<<connectionTiddler>>>
|
|
|
|
|
2020-04-09 10:07:13 +00:00
|
|
|
<<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">>
|
2015-03-18 11:46:28 +00:00
|
|
|
|
2020-04-13 10:28:24 +00:00
|
|
|
</$set>
|
|
|
|
|
2015-03-18 11:46:28 +00:00
|
|
|
</$list>
|
|
|
|
\end
|
|
|
|
|
2017-02-22 12:15:26 +00:00
|
|
|
\define close-library-button()
|
|
|
|
<$reveal type='nomatch' state='$:/temp/ServerConnection/$(PluginLibraryURL)$' text=''>
|
|
|
|
<$button class='tc-btn-big-green'>
|
|
|
|
<$action-sendmessage $message="tm-unload-plugin-library" url={{!!url}}/>
|
|
|
|
{{$:/core/images/chevron-left}} {{$:/language/ControlPanel/Plugins/ClosePluginLibrary}}
|
|
|
|
<$action-deletetiddler $filter="[prefix[$:/temp/ServerConnection/$(PluginLibraryURL)$]][prefix[$:/temp/RemoteAssetInfo/$(PluginLibraryURL)$]]"/>
|
|
|
|
</$button>
|
|
|
|
</$reveal>
|
|
|
|
\end
|
|
|
|
|
2015-03-18 11:46:28 +00:00
|
|
|
\define plugin-library-listing()
|
2020-04-15 09:20:17 +00:00
|
|
|
<div class="tc-tab-set">
|
|
|
|
<$set name="defaultTab" value={{{ [all[tiddlers+shadows]tag[$:/tags/PluginLibrary]] }}}>
|
|
|
|
<div class="tc-tab-buttons">
|
2015-03-18 11:46:28 +00:00
|
|
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]">
|
2020-04-15 09:20:17 +00:00
|
|
|
<$button set=<<qualify "$:/state/addplugins/tab">> setTo=<<currentTiddler>> default=<<defaultTab>> selectedClass="tc-tab-selected">
|
|
|
|
<$set name="tv-wikilinks" value="no">
|
|
|
|
<$transclude field="caption"/>
|
|
|
|
</$set>
|
|
|
|
</$button>
|
|
|
|
</$list>
|
|
|
|
</div>
|
|
|
|
<div class="tc-tab-divider"/>
|
|
|
|
<div class="tc-tab-content">
|
|
|
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]">
|
|
|
|
<$reveal type="match" state=<<qualify "$:/state/addplugins/tab">> text=<<currentTiddler>> default=<<defaultTab>>>
|
|
|
|
<h2><$link><$transclude field="caption"><$view field="title"/></$transclude></$link></h2>
|
2015-03-18 11:46:28 +00:00
|
|
|
//<$view field="url"/>//
|
2020-04-15 09:20:17 +00:00
|
|
|
<$transclude mode="block"/>
|
2017-02-22 12:15:26 +00:00
|
|
|
<$set name=PluginLibraryURL value={{!!url}}>
|
|
|
|
<<close-library-button>>
|
|
|
|
</$set>
|
2015-03-18 11:46:28 +00:00
|
|
|
<<display-server-connection>>
|
2020-04-15 09:20:17 +00:00
|
|
|
</$reveal>
|
2015-03-18 11:46:28 +00:00
|
|
|
</$list>
|
2020-04-15 09:20:17 +00:00
|
|
|
</div>
|
|
|
|
</$set>
|
|
|
|
</div>
|
2015-03-18 11:46:28 +00:00
|
|
|
\end
|
|
|
|
|
2018-09-28 17:18:07 +00:00
|
|
|
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
2015-03-18 11:46:28 +00:00
|
|
|
|
|
|
|
<div>
|
|
|
|
<<plugin-library-listing>>
|
|
|
|
</div>
|