mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-02 08:33:01 +00:00
Add a "close plugin library" button (#2072)
* provides a "close plugin library" button * starting from #1718 by @inmysocks * possibly fixes all of #1718, #1597, and #2067 * corrected code comment * add back title No idea why I overlooked this beforehand. Next time I will not suggest such changes that have little to do with the PR, but rather just comment the code. * ah, sorry, "fixed" wrong spot now ``` <$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/> ``` ...should be back at the right spot. * mhhh... still fixing the mess load, unload, puh... let's see if I got it now * added unloadIFrame and minor syntax fixes
This commit is contained in:
committed by
Jeremy Ruston
parent
6085936475
commit
88a65f038e
@@ -90,6 +90,16 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
</$list>
|
||||
\end
|
||||
|
||||
\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
|
||||
|
||||
\define plugin-library-listing()
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]">
|
||||
<div class="tc-plugin-library">
|
||||
@@ -100,6 +110,10 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
|
||||
|
||||
<$transclude/>
|
||||
|
||||
<$set name=PluginLibraryURL value={{!!url}}>
|
||||
<<close-library-button>>
|
||||
</$set>
|
||||
|
||||
<<display-server-connection>>
|
||||
</div>
|
||||
</$list>
|
||||
|
||||
Reference in New Issue
Block a user