mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-13 14:04:15 +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
|
|
@ -632,8 +632,10 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||
string[] comboEntries = _serverConfigurationManager.GetServerNames();
|
||||
|
||||
if (_serverSelectionIndex == -1)
|
||||
{
|
||||
_serverSelectionIndex = Array.IndexOf(_serverConfigurationManager.GetServerApiUrls(), _serverConfigurationManager.CurrentApiUrl);
|
||||
if (_serverSelectionIndex == -1)
|
||||
}
|
||||
if (_serverSelectionIndex == -1 || _serverSelectionIndex >= comboEntries.Length)
|
||||
{
|
||||
_serverSelectionIndex = 0;
|
||||
}
|
||||
|
|
@ -669,7 +671,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||
{
|
||||
ImGui.SameLine();
|
||||
var text = "Connect";
|
||||
if (_serverSelectionIndex == _serverConfigurationManager.GetCurrentServerIndex()) text = "Reconnect";
|
||||
if (_serverSelectionIndex == _serverConfigurationManager.CurrentServerIndex) text = "Reconnect";
|
||||
if (IconTextButton(FontAwesomeIcon.Link, text))
|
||||
{
|
||||
_serverConfigurationManager.SelectServer(_serverSelectionIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue