mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 18:07:22 +01:00
migrate server config from v0 to v1, add more transfer bar settings
This commit is contained in:
parent
82991a1172
commit
549bef1afb
13 changed files with 144 additions and 50 deletions
|
|
@ -3,4 +3,4 @@
|
|||
public interface IMareConfiguration
|
||||
{
|
||||
int Version { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -31,6 +31,9 @@ public class MareConfig : IMareConfiguration
|
|||
public bool ShowUploadingBigText { get; set; } = true;
|
||||
public bool ShowVisibleUsersSeparately { get; set; } = true;
|
||||
public int TimeSpanBetweenScansInSeconds { get; set; } = 30;
|
||||
public int TransferBarsHeight { get; set; } = 12;
|
||||
public bool TransferBarsShowText { get; set; } = true;
|
||||
public int TransferBarsWidth { get; set; } = 250;
|
||||
public int Version { get; set; } = 1;
|
||||
public NotificationLocation WarningNotification { get; set; } = NotificationLocation.Both;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using MareSynchronos.MareConfiguration.Models;
|
||||
using MareSynchronos.WebAPI;
|
||||
|
||||
namespace MareSynchronos.MareConfiguration.Configurations.Obsolete;
|
||||
|
||||
[Serializable]
|
||||
[Obsolete]
|
||||
public class ServerConfigV0 : IMareConfiguration
|
||||
{
|
||||
public string CurrentServer { get; set; } = string.Empty;
|
||||
|
||||
public Dictionary<string, ServerStorage> ServerStorage { get; set; } = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
{ ApiController.MainServiceUri, new ServerStorage() { ServerName = ApiController.MainServer, ServerUri = ApiController.MainServiceUri } },
|
||||
};
|
||||
|
||||
public int Version { get; set; } = 0;
|
||||
}
|
||||
|
|
@ -6,11 +6,12 @@ namespace MareSynchronos.MareConfiguration.Configurations;
|
|||
[Serializable]
|
||||
public class ServerConfig : IMareConfiguration
|
||||
{
|
||||
public int Version { get; set; } = 0;
|
||||
public int CurrentServer { get; set; } = 0;
|
||||
|
||||
public Dictionary<string, ServerStorage> ServerStorage { get; set; } = new(StringComparer.OrdinalIgnoreCase)
|
||||
public List<ServerStorage> ServerStorage { get; set; } = new()
|
||||
{
|
||||
{ ApiController.MainServiceUri, new ServerStorage() { ServerName = ApiController.MainServer, ServerUri = ApiController.MainServiceUri } },
|
||||
{ new ServerStorage() { ServerName = ApiController.MainServer, ServerUri = ApiController.MainServiceUri } },
|
||||
};
|
||||
public string CurrentServer { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public int Version { get; set; } = 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue