1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-04-24 15:51:30 +00:00

Display subplugins in control panel listing

This commit is contained in:
Jeremy Ruston
2025-02-27 16:54:32 +00:00
parent 12ced06d1d
commit 9dadd3fafb
6 changed files with 41 additions and 4 deletions

View File

@@ -5,5 +5,6 @@ author: JeremyRuston
core-version: >=5.0.0"
plugin-type: language
type: application/json
hidden: yes
{tidddlers:{}}

View File

@@ -0,0 +1,36 @@
/*\
title: $:/core/modules/filters/is/plugin.js
type: application/javascript
module-type: isfilteroperator
Filter function for [is[plugin]]
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter function
*/
exports.plugin = function(source,prefix,options) {
var results = [];
if(prefix === "!") {
source(function(tiddler,title) {
if(!tiddler.isPlugin()) {
results.push(title);
}
});
} else {
source(function(tiddler,title) {
if(tiddler.isPlugin()) {
results.push(title);
}
});
}
return results;
};
})();

View File

@@ -8,7 +8,7 @@ caption: {{$:/language/ControlPanel/Plugins/Caption}}
\whitespace trim
<$set name="plugin-type" value="""$type$""">
<$set name="qualified-state" value=<<qualify "$:/state/plugin-info">>>
<$list filter="[!has[draft.of]plugin-type[$type$]sort[name]]" emptyMessage=<<lingo "Empty/Hint">> template="$:/core/ui/Components/plugin-info"/>
<$list filter="[all[tiddlers+shadows]!has[draft.of]plugin-type[$type$]!field:hidden[yes]sort[name]]" emptyMessage=<<lingo "Empty/Hint">> template="$:/core/ui/Components/plugin-info"/>
</$set>
</$set>
\end

View File

@@ -1,5 +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]]"/>)
caption: {{$:/language/ControlPanel/Plugins/Languages/Caption}} (<$count filter="[all[tiddlers+shadows]is[plugin]!field:hidden[yes]plugin-type[language]]"/>)
<<plugin-table language>>

View File

@@ -1,5 +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]]"/>)
caption: {{$:/language/ControlPanel/Plugins/Plugins/Caption}} (<$count filter="[all[tiddlers+shadows]is[plugin]plugin-type[plugin]]"/>)
<<plugin-table plugin>>

View File

@@ -1,5 +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]]"/>)
caption: {{$:/language/ControlPanel/Plugins/Themes/Caption}} (<$count filter="[all[tiddlers+shadows]is[plugin]plugin-type[theme]]"/>)
<<plugin-table theme>>