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:
@@ -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: "" },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user