From e1f1b97b7e158d015f122e02f393e6d72ae08697 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 21 Feb 2025 12:27:38 +0800 Subject: [PATCH] Support allow modify action keywords & WebSearch does not let user change its keywords --- Flow.Launcher.Plugin/PluginMetadata.cs | 2 ++ Flow.Launcher/ViewModel/PluginViewModel.cs | 2 +- Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs index b4e06913e..14a720203 100644 --- a/Flow.Launcher.Plugin/PluginMetadata.cs +++ b/Flow.Launcher.Plugin/PluginMetadata.cs @@ -34,6 +34,8 @@ namespace Flow.Launcher.Plugin public List ActionKeywords { get; set; } + public bool AllowModifyActionKeywords { get; set; } = true; + public string IcoPath { get; set;} public override string ToString() diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs index a46b98d64..4b628f96e 100644 --- a/Flow.Launcher/ViewModel/PluginViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginViewModel.cs @@ -100,7 +100,7 @@ namespace Flow.Launcher.ViewModel : null; private ImageSource _image = ImageLoader.MissingImage; - public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed; + public Visibility ActionKeywordsVisibility => PluginPair.Metadata.AllowModifyActionKeywords ? Visibility.Visible : Visibility.Collapsed; public string InitilizaTime => PluginPair.Metadata.InitTime + "ms"; public string QueryTime => PluginPair.Metadata.AvgQueryTime + "ms"; public string Version => InternationalizationManager.Instance.GetTranslation("plugin_query_version") + " " + PluginPair.Metadata.Version; diff --git a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json index 6b6792ad3..1fc9967fc 100644 --- a/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json @@ -23,6 +23,7 @@ "yahoo", "bd" ], + "AllowModifyActionKeywords": false, "Name": "Web Searches", "Description": "Provide the web search ability", "Author": "qianlifeng",