mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-13 16:14:14 +01:00
move groups into separate class, allow setting comments for groups, add new api methods
This commit is contained in:
parent
a2d884718a
commit
8bad3fd91c
6 changed files with 597 additions and 410 deletions
|
|
@ -26,6 +26,23 @@ public static class ConfigurationExtensions
|
|||
: new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetCurrentServerGidComments(this Configuration configuration)
|
||||
{
|
||||
return configuration.GidServerComments.ContainsKey(configuration.ApiUri)
|
||||
? configuration.GidServerComments[configuration.ApiUri]
|
||||
: new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public static void SetCurrentServerGidComment(this Configuration configuration, string gid, string comment)
|
||||
{
|
||||
if (!configuration.GidServerComments.ContainsKey(configuration.ApiUri))
|
||||
{
|
||||
configuration.GidServerComments[configuration.ApiUri] = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
configuration.GidServerComments[configuration.ApiUri][gid] = comment;
|
||||
}
|
||||
|
||||
public static void SetCurrentServerUidComment(this Configuration configuration, string uid, string comment)
|
||||
{
|
||||
if (!configuration.UidServerComments.ContainsKey(configuration.ApiUri))
|
||||
|
|
@ -66,6 +83,7 @@ public class Configuration : IPluginConfiguration
|
|||
|
||||
public bool FullPause { get; set; } = false;
|
||||
public Dictionary<string, Dictionary<string, string>> UidServerComments { get; set; } = new();
|
||||
public Dictionary<string, Dictionary<string, string>> GidServerComments { get; set; } = new();
|
||||
|
||||
public Dictionary<string, string> UidComments { get; set; } = new();
|
||||
public int Version { get; set; } = 5;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue