title: $:/core/ui/ControlPanel/Modals/AddPlugins subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}} \define install-plugin-actions() \whitespace trim <$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/> <$set name="url" value={{!!url}}> <$set name="currentTiddler" value=<>> <$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[name]]" variable="dependency"> <$action-sendmessage $message="tm-load-plugin-from-library" url=<> title=<>/> \end \define install-plugin-button() \whitespace trim
<$set name="libraryVersion" value={{{ [get[version]] }}}> <$set name="installedVersion" value={{{ [get[original-title]get[version]] }}}> <$set name="reinstall-type" value={{{ [compare:version:eqthen[tc-reinstall]] [compare:version:gtthen[tc-reinstall-upgrade]] [compare:version:ltthen[tc-reinstall-downgrade]] }}}> <$button actions=<> class={{{ [get[original-title]has[version]then] tc-btn-invisible tc-install-plugin +[join[ ]] }}}> {{$:/core/images/download-button}} <$list filter="[get[original-title]get[version]]" variable="ignore" emptyMessage="{{$:/language/ControlPanel/Plugins/Install/Caption}}"> <$list filter="[compare:version:gt]" variable="ignore" emptyMessage=" \whitespace trim <$list filter='[compare:version:lt]' variable='ignore' emptyMessage='{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}'> {{$:/language/ControlPanel/Plugins/Downgrade/Caption}} "> {{$:/language/ControlPanel/Plugins/Update/Caption}}
<$reveal stateTitle=<> stateField="requires-reload" type="match" text="yes">{{$:/language/ControlPanel/Plugins/PluginWillRequireReload}}
\end \define popup-state-macro() $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$ \end \define display-plugin-info(type) \whitespace trim <$set name="popup-state" value=<>>
<$reveal type="nomatch" state=<> text="yes"> <$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="yes"> {{$:/core/images/chevron-right}} <$reveal type="match" state=<> text="yes"> <$button class="tc-btn-invisible tc-btn-dropdown" set=<> setTo="no"> {{$:/core/images/chevron-down}}
<$list filter="[has[icon]]" emptyMessage="""<$transclude tiddler="$:/core/images/plugin-generic-$type$"/>""">

<$text text={{{ [get[name]] ~[get[original-title]split[/]last[1]] }}}/>: <$view tiddler=<> field="description"/>

<$view tiddler=<> field="original-title"/>

<%if [get[stability]match[STABILITY_0_DEPRECATED]] %> {{$:/language/ControlPanel/Plugins/Stability/Deprecated}} <%elseif [get[stability]match[STABILITY_1_EXPERIMENTAL]] %> {{$:/language/ControlPanel/Plugins/Stability/Experimental}} <%elseif [get[stability]match[STABILITY_2_STABLE]] %> {{$:/language/ControlPanel/Plugins/Stability/Stable}} <%elseif [get[stability]match[STABILITY_3_LEGACY]] %> {{$:/language/ControlPanel/Plugins/Stability/Legacy}} <%endif%> <$view tiddler=<> field="version"/>
<$list filter="[get[original-title]get[version]]" variable="installedVersion">
{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}
<>
<$set name="original-title" value={{{ [get[original-title]] }}}> <$reveal type="match" text="yes" state=<>>
<$list filter="[enlist{!!dependents}] [get[parent-plugin]] +[limit[1]] ~[get[original-title]!is[tiddler]]" variable="ignore">
<$list filter="[get[original-title]!is[tiddler]]"> {{$:/language/ControlPanel/Plugins/NotInstalled/Hint}} <$set name="currentTiddler" value=<>> <$list filter="[enlist{!!dependents}] [get[parent-plugin]] +[limit[1]]" variable="ignore">
{{$:/language/ControlPanel/Plugins/AlsoRequires}} <$list filter="[enlist{!!dependents}] [{!!parent-plugin}] +[sort[name]]" variable="dependency"> <$text text=<>/>
<$transclude tiddler=<> field="readme" mode="block"/>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginlimit[1]]" variable="ignore">
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginsort[name]]" variable="assetInfo"> <>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]has[parent-plugin]parent-pluginlimit[1]]" variable="ignore"> <$reveal type="nomatch" text="yes" 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]"/>"""> <$button class="tc-btn-invisible" set=<> setTo="yes"> {{$:/language/ControlPanel/Plugins/SubPluginPrompt}} \end \define load-plugin-library-button() \whitespace trim <$list filter="[get[enabled]else[yes]match[yes]]" variable="ignore"> <$button class="tc-btn-big-green"> <$action-sendmessage $message="tm-load-plugin-library" url={{!!url}} infoTitlePrefix="$:/temp/RemoteAssetInfo/"/> {{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}} \end \define display-server-assets(type) \whitespace trim {{$:/language/Search/Search}}: <$edit-text tiddler="""$:/temp/RemoteAssetSearch/$(currentTiddler)$""" default="" type="search" tag="input"/> <$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}}
<$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[name]]" variable="assetInfo"> <$list filter="[[$:/temp/RemoteAssetSearch/$(currentTiddler)$]has[text]] ~[!has[parent-plugin]]" variable="ignore"> <>
\end \define display-server-connection() \whitespace trim <$list filter="[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]" variable="connectionTiddler" emptyMessage=<>> <$set name="transclusion" value=<>> <> \end \define close-library-button() \whitespace trim <$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)$]]"/> \end \define plugin-library-listing() \whitespace trim
<$set name="defaultTab" value={{{ [all[tiddlers+shadows]tag[$:/tags/PluginLibrary]] }}}>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]"> <$button set=<> setTo=<> default=<> selectedClass="tc-tab-selected"> <$set name="tv-wikilinks" value="no"> <$transclude field="caption"/>
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]"> <$reveal type="match" state=<> text=<> default=<>>

<$link><$transclude field="caption"><$view field="title"/>

//<$view field="url"/>// <$transclude mode="block"/> <$set name=PluginLibraryURL value={{!!url}}> <> <>
\end \import [subfilter{$:/core/config/GlobalImportFilter}] \whitespace trim
<>