From 30b9b1f371f26768a5a2033adf3064d611505ec6 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 25 Jun 2025 22:41:16 +0800 Subject: [PATCH] Add Visible api --- Flow.Launcher.Plugin/PluginHotkey.cs | 5 +++++ Plugins/Flow.Launcher.Plugin.Explorer/Main.cs | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Flow.Launcher.Plugin/PluginHotkey.cs b/Flow.Launcher.Plugin/PluginHotkey.cs index eae080e49..4ab6d6120 100644 --- a/Flow.Launcher.Plugin/PluginHotkey.cs +++ b/Flow.Launcher.Plugin/PluginHotkey.cs @@ -53,6 +53,11 @@ public class BasePluginHotkey /// Indicates whether the hotkey is editable by the user in the settings page. /// public bool Editable { get; set; } = false; + + /// + /// Whether to show the hotkey in the settings page. + /// + public bool Visible { get; set; } = true; } /// diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs index 6f230edab..df2fed09f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Main.cs @@ -124,6 +124,7 @@ namespace Flow.Launcher.Plugin.Explorer Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue838"), DefaultHotkey = "Ctrl+Enter", Editable = false, + Visible = true, Action = (r) => { if (r.ContextData is SearchResult record) @@ -160,6 +161,7 @@ namespace Flow.Launcher.Plugin.Explorer Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue700"), DefaultHotkey = "Alt+Enter", Editable = false, + Visible = true, Action = (r) => { if (r.ContextData is SearchResult record && record.Type is not ResultType.Volume) @@ -185,6 +187,7 @@ namespace Flow.Launcher.Plugin.Explorer Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\uE7EF"), DefaultHotkey = "Ctrl+Shift+Enter", Editable = false, + Visible = true, Action = (r) => { if (r.ContextData is SearchResult record) @@ -223,6 +226,7 @@ namespace Flow.Launcher.Plugin.Explorer Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8ac"), DefaultHotkey = "F2", Editable = true, + Visible = true, Action = (r) => { if (r.ContextData is SearchResult record)