diff --git a/Flow.Launcher.Core/Plugin/JsonRPCConfigurationModel.cs b/Flow.Launcher.Core/Plugin/JsonRPCConfigurationModel.cs index 1f63f85a8..6dc4be881 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCConfigurationModel.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCConfigurationModel.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace Flow.Launcher.Core.Plugin { @@ -26,6 +27,8 @@ namespace Flow.Launcher.Core.Plugin public string Name { get; set; } public string Label { get; set; } public string Description { get; set; } + public string urlLabel { get; set; } + public Uri url { get; set; } public bool Validation { get; set; } public List Options { get; set; } public string DefaultValue { get; set; } @@ -40,4 +43,4 @@ namespace Flow.Launcher.Core.Plugin DefaultValue = this.DefaultValue; } } -} \ No newline at end of file +} diff --git a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs index 3b809db2a..91d7d662a 100644 --- a/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs +++ b/Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs @@ -22,6 +22,9 @@ using Control = System.Windows.Controls.Control; using Orientation = System.Windows.Controls.Orientation; using TextBox = System.Windows.Controls.TextBox; using UserControl = System.Windows.Controls.UserControl; +using System.Windows.Documents; +using static System.Windows.Forms.LinkLabel; +using Droplex; namespace Flow.Launcher.Core.Plugin { @@ -33,7 +36,6 @@ namespace Flow.Launcher.Core.Plugin { protected PluginInitContext context; public const string JsonRPC = "JsonRPC"; - /// /// The language this JsonRPCPlugin support /// @@ -552,6 +554,28 @@ namespace Flow.Launcher.Core.Plugin Grid.SetColumn(sep, 0); Grid.SetColumnSpan(sep, 2); break; + case "hyperlink": + var hyperlink = new Hyperlink + { + ToolTip = attribute.Description, + NavigateUri = attribute.url + }; + var linkbtn = new Button + { + HorizontalAlignment = HorizontalAlignment.Right, + Margin = settingControlMargin + }; + linkbtn.Content = attribute.urlLabel; + + contentControl = linkbtn; + Grid.SetColumn(contentControl, 1); + Grid.SetRow(contentControl, rowCount); + if (rowCount != 0) + mainPanel.Children.Add(sep); + Grid.SetRow(sep, rowCount); + Grid.SetColumn(sep, 0); + Grid.SetColumnSpan(sep, 2); + break; default: continue; }