fixes UID display, adding new secret key when none are available, showing intro ui
This commit is contained in:
@@ -22,7 +22,7 @@ public class ServerConfigurationManager
|
||||
|
||||
public bool HasValidConfig()
|
||||
{
|
||||
return CurrentServer != null && (CurrentServer?.Authentications.Any() ?? false);
|
||||
return CurrentServer != null;
|
||||
}
|
||||
|
||||
public string[] GetServerApiUrls()
|
||||
|
||||
@@ -802,7 +802,7 @@ public class CompactUi : Window, IDisposable
|
||||
ServerState.Offline => "Unavailable",
|
||||
ServerState.RateLimited => "Rate Limited",
|
||||
ServerState.NoSecretKey => "No Secret Key",
|
||||
ServerState.Connected => _apiController.UID,
|
||||
ServerState.Connected => _apiController.DisplayName,
|
||||
_ => string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ public class SettingsUi : Window, IDisposable
|
||||
ImGui.Separator();
|
||||
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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user