mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-14 13:44:15 +01:00
add contextual information to settings ui
This commit is contained in:
parent
18ece74c6d
commit
c671003bac
1 changed files with 16 additions and 1 deletions
|
|
@ -1325,7 +1325,16 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||||
{
|
{
|
||||||
thisIsYou = true;
|
thisIsYou = true;
|
||||||
}
|
}
|
||||||
if (ImGui.TreeNode($"chara", (thisIsYou ? "[CURRENT] " : "") + $"Character: {item.CharacterName}, World: {worldPreview}, {friendlyNameTranslation}: {friendlyName}"))
|
bool misManaged = false;
|
||||||
|
if (selectedServer.UseOAuth2 && !string.IsNullOrEmpty(selectedServer.OAuthToken) && string.IsNullOrEmpty(item.UID))
|
||||||
|
{
|
||||||
|
misManaged = true;
|
||||||
|
}
|
||||||
|
if (!selectedServer.UseOAuth2 && item.SecretKeyIdx == -1)
|
||||||
|
{
|
||||||
|
misManaged = true;
|
||||||
|
}
|
||||||
|
if (ImGui.TreeNode($"chara", (misManaged ? "[!! MISMANAGED !!] " : "") + (thisIsYou ? "[CURRENT] " : "") + $"Character: {item.CharacterName}, World: {worldPreview}, {friendlyNameTranslation}: {friendlyName}"))
|
||||||
{
|
{
|
||||||
var charaName = item.CharacterName;
|
var charaName = item.CharacterName;
|
||||||
if (ImGui.InputText("Character Name", ref charaName, 64))
|
if (ImGui.InputText("Character Name", ref charaName, 64))
|
||||||
|
|
@ -1477,6 +1486,12 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||||
if (useOauth)
|
if (useOauth)
|
||||||
{
|
{
|
||||||
_uiShared.DrawOAuth(selectedServer);
|
_uiShared.DrawOAuth(selectedServer);
|
||||||
|
if (!string.IsNullOrEmpty(_serverConfigurationManager.GetDiscordUserFromToken(selectedServer))
|
||||||
|
&& selectedServer.Authentications.TrueForAll(u => string.IsNullOrEmpty(u.UID)))
|
||||||
|
{
|
||||||
|
UiSharedService.ColorTextWrapped("You have enabled OAuth2 but no characters configured. Set the correct UIDs for your characters in \"Character Management\".",
|
||||||
|
ImGuiColors.DalamudRed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isMain && selectedServer != _serverConfigurationManager.CurrentServer)
|
if (!isMain && selectedServer != _serverConfigurationManager.CurrentServer)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue