Plugin Settings - When searching, search in plugin and features

Plugin Settings - Never scroll inside feature list, just show everything if a plugin has many features
This commit is contained in:
Robert committed 2025-02-16 17:06:22 +01:00
1 parent 37b8c2c3e9
commit 10a10b9149
5 files changed
+28 -7

No files matched your search

@@ -95,5 +95,16 @@ public class PluginFeatureInfo : IPrerequisitesSubject
return Instance?.Id ?? "Uninitialized feature";
}
/// <summary>
/// Returns a boolean indicating whether this feature info matches the provided search string
/// </summary>
/// <param name="search">The search string to match</param>
/// <returns>A boolean indicating whether this plugin info matches the provided search string</returns>
public bool MatchesSearch(string search)
{
return Name.Contains(search, StringComparison.InvariantCultureIgnoreCase) ||
(Description != null && Description.Contains(search, StringComparison.InvariantCultureIgnoreCase));
}
internal PluginFeatureEntity Entity { get; }
}
+14 -3
View File
@@ -155,19 +155,30 @@ public class PluginInfo : IPrerequisitesSubject
{
return PlatformPrerequisites.All(p => p.IsMet());
}
/// <inheritdoc />
public override string ToString()
{
return $"{Name} v{Version} - {Guid}";
}
private bool MatchesMinimumVersion()
{
if (Constants.CurrentVersion == "local")
return true;
Version currentVersion = new(Constants.CurrentVersion);
return currentVersion >= MinimumVersion;
}
/// <summary>
/// Returns a boolean indicating whether this plugin info matches the provided search string
/// </summary>
/// <param name="search">The search string to match</param>
/// <returns>A boolean indicating whether this plugin info matches the provided search string</returns>
public bool MatchesSearch(string search)
{
return Name.Contains(search, StringComparison.InvariantCultureIgnoreCase) ||
(Description != null && Description.Contains(search, StringComparison.InvariantCultureIgnoreCase));
}
}