mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
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:
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; }
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user