Merge pull request #780 from Artemis-RGB/feature/plugin-help

Plugins - Added help pages
This commit is contained in:
RobertBeekman authored and GitHub committed 2023-04-14 14:51:52 +02:00
commit 1bad68dbc8
24 files changed
+175 -98

No files matched your search

@@ -44,31 +44,9 @@ public class ArtemisPluginException : Exception
public ArtemisPluginException(string message, Exception inner) : base(message, inner)
{
}
/// <summary>
/// Creates a new instance of the <see cref="ArtemisPluginException" /> class
/// </summary>
public ArtemisPluginException(string message, string helpDocument) : base(message)
{
HelpDocument = helpDocument;
}
/// <summary>
/// Creates a new instance of the <see cref="ArtemisPluginException" /> class
/// </summary>
public ArtemisPluginException(string message, Exception inner, string helpDocument) : base(message, inner)
{
HelpDocument = helpDocument;
}
/// <summary>
/// Gets the plugin the error is related to
/// </summary>
public Plugin? Plugin { get; }
/// <summary>
/// Gets or sets the help document related to this exception.
/// </summary>
public string? HelpDocument { get; }
}
+1 -1
View File
@@ -57,7 +57,7 @@ public class Plugin : CorePropertyChanged, IDisposable
/// Gets or sets a configuration dialog for this plugin that is accessible in the UI under Settings > Plugins
/// </summary>
public IPluginConfigurationDialog? ConfigurationDialog { get; set; }
/// <summary>
/// Indicates whether the user enabled the plugin or not
/// </summary>
+11
View File
@@ -27,6 +27,7 @@ public class PluginInfo : CorePropertyChanged, IPrerequisitesSubject
private bool _requiresAdmin;
private string _version = null!;
private Uri? _website;
private Uri? _helpPage;
internal PluginInfo()
{
@@ -91,6 +92,16 @@ public class PluginInfo : CorePropertyChanged, IPrerequisitesSubject
get => _repository;
set => SetAndNotify(ref _repository, value);
}
/// <summary>
/// Gets or sets the help page of this plugin
/// </summary>
[JsonProperty]
public Uri? HelpPage
{
get => _helpPage;
set => SetAndNotify(ref _helpPage, value);
}
/// <summary>
/// The plugins display icon that's shown in the settings see <see href="https://materialdesignicons.com" /> for