From bc8859b5501a1f0b7d6421909ad2cb61c5c623e5 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 9 Apr 2020 11:06:54 +0100 Subject: [PATCH] AddPlugins: Add a clearer prompt for plugins that have subplugins --- core/language/en-GB/ControlPanel.multids | 1 + core/ui/ControlPanel/Modals/AddPlugins.tid | 22 ++++++++++++++----- themes/tiddlywiki/vanilla/base.tid | 25 ++++++++++++++++------ 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/core/language/en-GB/ControlPanel.multids b/core/language/en-GB/ControlPanel.multids index 990f0b1aa..7bdace795 100644 --- a/core/language/en-GB/ControlPanel.multids +++ b/core/language/en-GB/ControlPanel.multids @@ -87,6 +87,7 @@ Plugins/Plugins/Hint: Plugins Plugins/Reinstall/Caption: reinstall Plugins/Themes/Caption: Themes Plugins/Themes/Hint: Theme plugins +Plugins/SubPluginPrompt: With <> sub-plugins available Saving/Caption: Saving Saving/DownloadSaver/AutoSave/Description: Permit automatic saving for the download saver Saving/DownloadSaver/AutoSave/Hint: Enable Autosave for Download Saver diff --git a/core/ui/ControlPanel/Modals/AddPlugins.tid b/core/ui/ControlPanel/Modals/AddPlugins.tid index e0f8bbcaa..8fea4e522 100644 --- a/core/ui/ControlPanel/Modals/AddPlugins.tid +++ b/core/ui/ControlPanel/Modals/AddPlugins.tid @@ -1,9 +1,7 @@ title: $:/core/ui/ControlPanel/Modals/AddPlugins subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}} -\define install-plugin-button() -
-<$button class={{{ [get[original-title]get[version]then[tc-reinstall]] tc-btn-invisible tc-install-plugin +[join[ ]] }}}> +\define install-plugin-actions() <$action-sendmessage $message="tm-load-plugin-from-library" url={{!!url}} title={{$(assetInfo)$!!original-title}}/> <$set name="url" value={{!!url}}> <$set name="currentTiddler" value=<>> @@ -12,6 +10,11 @@ subtitle: {{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/ +\end + +\define install-plugin-button() +
+<$button actions=<> class={{{ [get[original-title]get[version]then[tc-reinstall]] tc-btn-invisible tc-install-plugin +[join[ ]] }}}> {{$:/core/images/download-button}} <$list filter="[get[original-title]get[version]]" variable="installedVersion" emptyMessage="""{{$:/language/ControlPanel/Plugins/Install/Caption}}"""> {{$:/language/ControlPanel/Plugins/Reinstall/Caption}} @@ -56,6 +59,7 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$ <>
+<$set name="original-title" value={{{ [get[original-title]] }}}> <$reveal type="match" text="yes" state=<>>
@@ -78,7 +82,6 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$
<$transclude tiddler=<> field="readme" mode="block"/>
-<$set name="original-title" value={{{ [get[original-title]] }}}> <$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[title]]" variable="assetInfo"> @@ -86,9 +89,18 @@ $:/state/add-plugin-info/$(connectionTiddler)$/$(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 diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 9809dcf11..07e9d2046 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -2106,8 +2106,20 @@ html body.tc-body.tc-single-tiddler-window { } .tc-plugin-info-sub-plugins .tc-plugin-info { - margin: 0.5em 1em 0.5em 1em; - background: rgba(255,255,0,0.05); + margin: 0.5em; + background: <>; +} + +.tc-plugin-info-sub-plugin-indicator { + margin: -16px 1em 0 2em; +} + +.tc-plugin-info-sub-plugin-indicator button { + color: <>; + background: <>; + border-radius: 8px; + padding: 2px 7px; + font-size: 0.75em; } .tc-plugin-info-sub-plugins .tc-plugin-info-dropdown { @@ -2211,11 +2223,12 @@ a.tc-tiddlylink.tc-plugin-info:hover .tc-plugin-info > .tc-plugin-info-chunk > s } .tc-plugin-info-sub-plugins { - padding-top: 0.5em; - background: <>; + padding: 0.5em; + margin: 0 1em 1em 1em; + background: <>; } -.tc-plugin-library-listing .tc-install-plugin { +.tc-install-plugin { font-weight: bold; background: green; color: white; @@ -2224,7 +2237,7 @@ a.tc-tiddlylink.tc-plugin-info:hover .tc-plugin-info > .tc-plugin-info-chunk > s padding: 3px; } -.tc-plugin-library-listing .tc-install-plugin.tc-reinstall { +.tc-install-plugin.tc-reinstall { background: blue; }