Add Visible api

This commit is contained in:
Jack251970 2025-06-25 22:41:16 +08:00
parent f2358a56e8
commit 30b9b1f371
2 changed files with 9 additions and 0 deletions

View file

@ -53,6 +53,11 @@ public class BasePluginHotkey
/// Indicates whether the hotkey is editable by the user in the settings page.
/// </summary>
public bool Editable { get; set; } = false;
/// <summary>
/// Whether to show the hotkey in the settings page.
/// </summary>
public bool Visible { get; set; } = true;
}
/// <summary>

View file

@ -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)