From 737685149c49337b77601653b46e27d72a6cbcfd Mon Sep 17 00:00:00 2001 From: Mohammad Rahmani <830394+kookma@users.noreply.github.com> Date: Sun, 29 Aug 2021 21:05:18 +0430 Subject: [PATCH] Plugins tab in control panel display tabs using tag filter instead of hardcoded list (#5694) * Plugins tab in control panel display tabs using filter instead of hard coded list * Update ControlPanelPlugins.tid The two entries `[[$:/core/ui/ControlPanel/Plugins/Installed]] [[$:/core/ui/ControlPanel/Plugins/Add]]` were removed from list filed as per @Jermelon confirmation! * Create SystemTag_ $__tags_ControlPanel_Plugins.tid Update the SystemTags documentation tiddler --- core/ui/ControlPanel/Plugins.tid | 2 +- core/ui/ControlPanel/Plugins/Installed/Languages.tid | 1 + core/ui/ControlPanel/Plugins/Installed/Plugins.tid | 1 + core/ui/ControlPanel/Plugins/Installed/Themes.tid | 1 + core/wiki/tags/ControlPanelPlugins.tid | 2 +- .../SystemTag_ $__tags_ControlPanel_Plugins.tid | 9 +++++++++ 6 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ControlPanel_Plugins.tid diff --git a/core/ui/ControlPanel/Plugins.tid b/core/ui/ControlPanel/Plugins.tid index 3161787b8..fa4292fec 100644 --- a/core/ui/ControlPanel/Plugins.tid +++ b/core/ui/ControlPanel/Plugins.tid @@ -16,4 +16,4 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}} <> -<$macrocall $name="tabs" tabsList="[[$:/core/ui/ControlPanel/Plugins/Installed/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Installed/Themes]] [[$:/core/ui/ControlPanel/Plugins/Installed/Languages]]" default="$:/core/ui/ControlPanel/Plugins/Installed/Plugins" explicitState="$:/state/tab--86143343"/> +<$macrocall $name="tabs" tabsList="[all[tiddlers+shadows]tag[$:/tags/ControlPanel/Plugins]!has[draft.of]]" default="$:/core/ui/ControlPanel/Plugins/Installed/Plugins" explicitState="$:/state/tab--86143343"/> diff --git a/core/ui/ControlPanel/Plugins/Installed/Languages.tid b/core/ui/ControlPanel/Plugins/Installed/Languages.tid index e66d04ef3..ddd5396ef 100644 --- a/core/ui/ControlPanel/Plugins/Installed/Languages.tid +++ b/core/ui/ControlPanel/Plugins/Installed/Languages.tid @@ -1,4 +1,5 @@ title: $:/core/ui/ControlPanel/Plugins/Installed/Languages +tags: $:/tags/ControlPanel/Plugins caption: {{$:/language/ControlPanel/Plugins/Languages/Caption}} (<$count filter="[!has[draft.of]plugin-type[language]]"/>) <> diff --git a/core/ui/ControlPanel/Plugins/Installed/Plugins.tid b/core/ui/ControlPanel/Plugins/Installed/Plugins.tid index b603bb37b..879f6cfaa 100644 --- a/core/ui/ControlPanel/Plugins/Installed/Plugins.tid +++ b/core/ui/ControlPanel/Plugins/Installed/Plugins.tid @@ -1,4 +1,5 @@ title: $:/core/ui/ControlPanel/Plugins/Installed/Plugins +tags: $:/tags/ControlPanel/Plugins caption: {{$:/language/ControlPanel/Plugins/Plugins/Caption}} (<$count filter="[!has[draft.of]plugin-type[plugin]]"/>) <> diff --git a/core/ui/ControlPanel/Plugins/Installed/Themes.tid b/core/ui/ControlPanel/Plugins/Installed/Themes.tid index fe52e7599..6be33a236 100644 --- a/core/ui/ControlPanel/Plugins/Installed/Themes.tid +++ b/core/ui/ControlPanel/Plugins/Installed/Themes.tid @@ -1,4 +1,5 @@ title: $:/core/ui/ControlPanel/Plugins/Installed/Themes +tags: $:/tags/ControlPanel/Plugins caption: {{$:/language/ControlPanel/Plugins/Themes/Caption}} (<$count filter="[!has[draft.of]plugin-type[theme]]"/>) <> diff --git a/core/wiki/tags/ControlPanelPlugins.tid b/core/wiki/tags/ControlPanelPlugins.tid index 32851ce74..c821304e9 100644 --- a/core/wiki/tags/ControlPanelPlugins.tid +++ b/core/wiki/tags/ControlPanelPlugins.tid @@ -1,2 +1,2 @@ title: $:/tags/ControlPanel/Plugins -list: [[$:/core/ui/ControlPanel/Plugins/Installed]] [[$:/core/ui/ControlPanel/Plugins/Add]] +list: $:/core/ui/ControlPanel/Plugins/Installed/Plugins $:/core/ui/ControlPanel/Plugins/Installed/Themes $:/core/ui/ControlPanel/Plugins/Installed/Languages diff --git a/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ControlPanel_Plugins.tid b/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ControlPanel_Plugins.tid new file mode 100644 index 000000000..7869e7bb8 --- /dev/null +++ b/editions/tw5.com/tiddlers/systemtags/SystemTag_ $__tags_ControlPanel_Plugins.tid @@ -0,0 +1,9 @@ +caption: $:/tags/ControlPanel/Plugins +created: 20210807123106257 +description: marks elements to be placed under "Plugins" tab in Control Panel +modified: 20210807123621182 +tags: SystemTags +title: SystemTag: $:/tags/ControlPanel/Plugins +type: text/vnd.tiddlywiki + +The [[system tag|SystemTags]] `$:/tags/ControlPanel/Plugins` marks elements to be placed under "Plugins" tab in [[$:/ControlPanel]] \ No newline at end of file