1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-08 04:09:15 -04:00

feat(PluginBrowser): add sorting and filtering options for plugins

- Introduced sorting and filtering by installed, default, category, name, and author
This commit is contained in:
purian23
2026-05-31 23:58:13 -04:00
parent a44bef5796
commit 0c3659a612
3 changed files with 425 additions and 8 deletions
+16
View File
@@ -154,6 +154,8 @@ Singleton {
property var trayItemOrder: []
property var recentColors: []
property bool showThirdPartyPlugins: false
property bool pluginBrowserInstalledFirst: false
property string pluginBrowserSortMode: "default"
property string launchPrefix: ""
property string lastBrightnessDevice: ""
property var brightnessExponentialDevices: ({})
@@ -964,6 +966,20 @@ Singleton {
saveSettings();
}
function setPluginBrowserInstalledFirst(enabled) {
pluginBrowserInstalledFirst = enabled;
saveSettings();
}
function setPluginBrowserSortMode(mode) {
if (mode === "type" || mode === "contributor")
mode = "author";
if (mode !== "default" && mode !== "name" && mode !== "author" && mode !== "category")
mode = "default";
pluginBrowserSortMode = mode;
saveSettings();
}
function setLaunchPrefix(prefix) {
launchPrefix = prefix;
saveSettings();
@@ -56,6 +56,8 @@ var SPEC = {
trayItemOrder: { def: [] },
recentColors: { def: [] },
showThirdPartyPlugins: { def: false },
pluginBrowserInstalledFirst: { def: false },
pluginBrowserSortMode: { def: "default" },
launchPrefix: { def: "" },
lastBrightnessDevice: { def: "" },