This commit is contained in:
Stanley Dimant
2023-03-20 11:06:25 +01:00
34 changed files with 1496 additions and 739 deletions

View File

@@ -23,17 +23,29 @@ public class ServerConfigurationManager
_serverTagConfig = serverTagConfig;
_notesConfig = notesConfig;
_dalamudUtil = dalamudUtil;
if (_configService.Current.CurrentServer < 0)
{
_configService.Current.CurrentServer = 0;
_configService.Save();
}
}
public string CurrentApiUrl => CurrentServer.ServerUri;
public ServerStorage CurrentServer => _configService.Current.ServerStorage[CurrentServerIndex];
public int CurrentServerIndex => _configService.Current.CurrentServer;
public int CurrentServerIndex
{
set
{
_configService.Current.CurrentServer = value;
_configService.Save();
}
get
{
if (_configService.Current.CurrentServer < 0)
{
_configService.Current.CurrentServer = 0;
_configService.Save();
}
return _configService.Current.CurrentServer;
}
}
public string? GetSecretKey(int serverIdx = -1)
{