fixes UID display, adding new secret key when none are available, showing intro ui

This commit is contained in:
rootdarkarchon
2023-01-29 15:51:50 +01:00
parent 0288e7bcb3
commit 9c51b78fde
3 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ public class ServerConfigurationManager
public bool HasValidConfig() public bool HasValidConfig()
{ {
return CurrentServer != null && (CurrentServer?.Authentications.Any() ?? false); return CurrentServer != null;
} }
public string[] GetServerApiUrls() public string[] GetServerApiUrls()

View File

@@ -802,7 +802,7 @@ public class CompactUi : Window, IDisposable
ServerState.Offline => "Unavailable", ServerState.Offline => "Unavailable",
ServerState.RateLimited => "Rate Limited", ServerState.RateLimited => "Rate Limited",
ServerState.NoSecretKey => "No Secret Key", ServerState.NoSecretKey => "No Secret Key",
ServerState.Connected => _apiController.UID, ServerState.Connected => _apiController.DisplayName,
_ => string.Empty _ => string.Empty
}; };
} }

View File

@@ -368,7 +368,7 @@ public class SettingsUi : Window, IDisposable
ImGui.Separator(); ImGui.Separator();
if (UiShared.IconTextButton(FontAwesomeIcon.Plus, "Add new Secret Key")) if (UiShared.IconTextButton(FontAwesomeIcon.Plus, "Add new Secret Key"))
{ {
selectedServer.SecretKeys.Add(selectedServer.SecretKeys.Last().Key + 1, new SecretKey() selectedServer.SecretKeys.Add(selectedServer.SecretKeys.LastOrDefault().Key + 1, new SecretKey()
{ {
FriendlyName = "New Secret Key", FriendlyName = "New Secret Key",
}); });