🚸 PMGR: Filter for plugin list

We can now filter all/bundled/3rdparty. Should improve overview.
This commit is contained in:
Gina Häußge committed 2019-09-24 11:07:45 +02:00
1 parent 75f6ef4bae
commit 04a13268ad
2 files changed
+21 -2

No files matched your search

@@ -32,13 +32,27 @@ $(function() {
}
},
{
"all": function(item) {
return true;
},
"bundled": function(item) {
return item.bundled;
},
"3rdparty": function(item) {
return !item.bundled;
}
},
"name",
[],
[],
["all"],
[["all", "bundled", "3rdparty"]],
0
);
if (self.plugins.currentFilters().length === 0) {
// old versions didn't have filters, we might still have that stuck in the local storage
self.plugins.addFilter("all");
}
self.repositoryplugins = new ItemListHelper(
"plugin.pluginmanager.repositoryplugins",
{
@@ -40,6 +40,11 @@
{{ pluginmanager_throttled() }}
<div class="pull-right">
<div class="btn-group">
<button class="btn btn-small" data-bind="click: function() { plugins.addFilter('all') }, css: {active: _.contains(plugins.currentFilters(), 'all')}" title="{{ _('Show all plugins')|edq }}">All</button>
<button class="btn btn-small" data-bind="click: function() { plugins.addFilter('bundled') }, css: {active: _.contains(plugins.currentFilters(), 'bundled')}" title="{{ _('Show only bundled plugins')|edq }}">Bundled</button>
<button class="btn btn-small" data-bind="click: function() { plugins.addFilter('3rdparty') }, css: {active: _.contains(plugins.currentFilters(), '3rdparty')}" title="{{ _('Show only third-party plugins')|edq }}">3rd Party</button>
</div>
<button class="btn btn-small" data-bind="click: function() { $root.showPluginSettings(); }" title="{{ _('Plugin Configuration')|edq }}"><i class="fa fa-wrench"></i></button>
</div>