mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 17:52:56 +00:00
Add maintenance and deprecation message flags to plugins
This commit is contained in:
parent
24f5127785
commit
ff788b33f2
@ -28,6 +28,12 @@ CATEGORIES = { "CORE" }
|
|||||||
-- The target groups for the plugin:
|
-- The target groups for the plugin:
|
||||||
TARGET_GROUPS = { "EVERYONE" }
|
TARGET_GROUPS = { "EVERYONE" }
|
||||||
|
|
||||||
|
-- The flag for whether the plugin is maintained:
|
||||||
|
IS_MAINTAINED = true
|
||||||
|
|
||||||
|
-- When the plugin is deprecated, this message will be shown to users:
|
||||||
|
DEPRECATION_MESSAGE = nil
|
||||||
|
|
||||||
CONTENT = {
|
CONTENT = {
|
||||||
Home_LetsGetStarted = "Lass uns anfangen",
|
Home_LetsGetStarted = "Lass uns anfangen",
|
||||||
}
|
}
|
@ -30,6 +30,12 @@ CATEGORIES = { "CORE" }
|
|||||||
-- The target groups for the plugin:
|
-- The target groups for the plugin:
|
||||||
TARGET_GROUPS = { "EVERYONE" }
|
TARGET_GROUPS = { "EVERYONE" }
|
||||||
|
|
||||||
|
-- The flag for whether the plugin is maintained:
|
||||||
|
IS_MAINTAINED = true
|
||||||
|
|
||||||
|
-- When the plugin is deprecated, this message will be shown to users:
|
||||||
|
DEPRECATION_MESSAGE = nil
|
||||||
|
|
||||||
CONTENT = {
|
CONTENT = {
|
||||||
HOME = CONTENT_HOME,
|
HOME = CONTENT_HOME,
|
||||||
}
|
}
|
@ -64,6 +64,16 @@ public abstract class PluginBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public PluginTargetGroup[] TargetGroups { get; } = [];
|
public PluginTargetGroup[] TargetGroups { get; } = [];
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// True, when the plugin is maintained.
|
||||||
|
/// </summary>
|
||||||
|
public bool IsMaintained { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The message that should be displayed when the plugin is deprecated.
|
||||||
|
/// </summary>
|
||||||
|
public string? DeprecationMessage { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The issues that occurred during the initialization of this plugin.
|
/// The issues that occurred during the initialization of this plugin.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -146,6 +156,16 @@ public abstract class PluginBase
|
|||||||
else if(this is not NoPlugin)
|
else if(this is not NoPlugin)
|
||||||
issues.Add(issue);
|
issues.Add(issue);
|
||||||
|
|
||||||
|
if(this.TryInitIsMaintained(out issue, out var isMaintained))
|
||||||
|
this.IsMaintained = isMaintained;
|
||||||
|
else if(this is not NoPlugin)
|
||||||
|
issues.Add(issue);
|
||||||
|
|
||||||
|
if(this.TryInitDeprecationMessage(out issue, out var deprecationMessage))
|
||||||
|
this.DeprecationMessage = deprecationMessage;
|
||||||
|
else if(this is not NoPlugin)
|
||||||
|
issues.Add(issue);
|
||||||
|
|
||||||
this.baseIssues = issues;
|
this.baseIssues = issues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user