mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-16 10:42:06 -04:00
@@ -606,6 +606,8 @@ Item {
|
||||
property var allLauncherPlugins: {
|
||||
SettingsData.launcherPluginVisibility;
|
||||
SettingsData.launcherPluginOrder;
|
||||
SettingsData.dankLauncherV2IncludeFilesInAll;
|
||||
SettingsData.dankLauncherV2IncludeFoldersInAll;
|
||||
var plugins = [];
|
||||
var builtIn = AppSearchService.getBuiltInLauncherPlugins() || {};
|
||||
for (var pluginId in builtIn) {
|
||||
@@ -616,6 +618,7 @@ Item {
|
||||
icon: plugin.cornerIcon || "extension",
|
||||
iconType: "material",
|
||||
isBuiltIn: true,
|
||||
isVirtual: false,
|
||||
trigger: AppSearchService.getBuiltInPluginTrigger(pluginId) || ""
|
||||
});
|
||||
}
|
||||
@@ -629,9 +632,32 @@ Item {
|
||||
icon: rawIcon.startsWith("material:") ? rawIcon.substring(9) : rawIcon.startsWith("unicode:") ? rawIcon.substring(8) : rawIcon,
|
||||
iconType: rawIcon.startsWith("unicode:") ? "unicode" : "material",
|
||||
isBuiltIn: false,
|
||||
isVirtual: false,
|
||||
trigger: PluginService.getPluginTrigger(pluginId) || ""
|
||||
});
|
||||
}
|
||||
if (SettingsData.dankLauncherV2IncludeFilesInAll) {
|
||||
plugins.push({
|
||||
id: "__files",
|
||||
name: I18n.tr("Files"),
|
||||
icon: "insert_drive_file",
|
||||
iconType: "material",
|
||||
isBuiltIn: false,
|
||||
isVirtual: true,
|
||||
trigger: "/"
|
||||
});
|
||||
}
|
||||
if (SettingsData.dankLauncherV2IncludeFoldersInAll) {
|
||||
plugins.push({
|
||||
id: "__folders",
|
||||
name: I18n.tr("Folders"),
|
||||
icon: "folder",
|
||||
iconType: "material",
|
||||
isBuiltIn: false,
|
||||
isVirtual: true,
|
||||
trigger: "/"
|
||||
});
|
||||
}
|
||||
return SettingsData.getOrderedLauncherPlugins(plugins);
|
||||
}
|
||||
|
||||
@@ -750,9 +776,27 @@ Item {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.spacingM
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
checked: SettingsData.getPluginAllowWithoutTrigger(visibilityDelegateItem.modelData.id)
|
||||
checked: {
|
||||
switch (visibilityDelegateItem.modelData.id) {
|
||||
case "__files":
|
||||
return SettingsData.dankLauncherV2IncludeFilesInAll;
|
||||
case "__folders":
|
||||
return SettingsData.dankLauncherV2IncludeFoldersInAll;
|
||||
default:
|
||||
return SettingsData.getPluginAllowWithoutTrigger(visibilityDelegateItem.modelData.id);
|
||||
}
|
||||
}
|
||||
onToggled: function (isChecked) {
|
||||
SettingsData.setPluginAllowWithoutTrigger(visibilityDelegateItem.modelData.id, isChecked);
|
||||
switch (visibilityDelegateItem.modelData.id) {
|
||||
case "__files":
|
||||
SettingsData.set("dankLauncherV2IncludeFilesInAll", isChecked);
|
||||
break;
|
||||
case "__folders":
|
||||
SettingsData.set("dankLauncherV2IncludeFoldersInAll", isChecked);
|
||||
break;
|
||||
default:
|
||||
SettingsData.setPluginAllowWithoutTrigger(visibilityDelegateItem.modelData.id, isChecked);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -840,6 +884,24 @@ Item {
|
||||
checked: SettingsData.rememberLastQuery
|
||||
onToggled: checked => SettingsData.set("rememberLastQuery", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dankLauncherV2IncludeFilesInAll"
|
||||
tags: ["launcher", "files", "dsearch", "all", "results", "indexed"]
|
||||
text: I18n.tr("Include Files in All Tab")
|
||||
description: I18n.tr("Merge indexed file results into the All tab (requires dsearch).")
|
||||
checked: SettingsData.dankLauncherV2IncludeFilesInAll
|
||||
onToggled: checked => SettingsData.set("dankLauncherV2IncludeFilesInAll", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
settingKey: "dankLauncherV2IncludeFoldersInAll"
|
||||
tags: ["launcher", "folders", "dirs", "dsearch", "all", "results", "indexed"]
|
||||
text: I18n.tr("Include Folders in All Tab")
|
||||
description: I18n.tr("Merge indexed folder results into the All tab (requires dsearch).")
|
||||
checked: SettingsData.dankLauncherV2IncludeFoldersInAll
|
||||
onToggled: checked => SettingsData.set("dankLauncherV2IncludeFoldersInAll", checked)
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
|
||||
Reference in New Issue
Block a user