add debug button to copy character data
This commit is contained in:
@@ -12,6 +12,7 @@ using MareSynchronos.API;
|
||||
using MareSynchronos.Utils;
|
||||
using MareSynchronos.WebAPI.Utils;
|
||||
using Dalamud.Utility;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MareSynchronos.UI;
|
||||
|
||||
@@ -22,6 +23,8 @@ public class SettingsUi : Window, IDisposable
|
||||
private readonly WindowSystem _windowSystem;
|
||||
private readonly ApiController _apiController;
|
||||
private readonly UiShared _uiShared;
|
||||
public CharacterCacheDto LastCreatedCharacterData { private get; set; }
|
||||
|
||||
public event SwitchUi? SwitchToIntroUi;
|
||||
private bool _overwriteExistingLabels = false;
|
||||
private bool? _notesSuccessfullyApplied = null;
|
||||
@@ -542,6 +545,19 @@ public class SettingsUi : Window, IDisposable
|
||||
{
|
||||
_uiShared.DrawServiceSelection(() => { });
|
||||
}
|
||||
|
||||
if (UiShared.IconTextButton(FontAwesomeIcon.Copy, "[DEBUG] Copy Last created Character Data to clipboard"))
|
||||
{
|
||||
if (LastCreatedCharacterData != null)
|
||||
{
|
||||
ImGui.SetClipboardText(JsonConvert.SerializeObject(LastCreatedCharacterData, Formatting.Indented));
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.SetClipboardText("ERROR: No created character data, cannot copy.");
|
||||
}
|
||||
}
|
||||
UiShared.AttachToolTip("Use this when reporting mods being rejected from the server.");
|
||||
}
|
||||
|
||||
private void DrawBlockedTransfers()
|
||||
|
||||
Reference in New Issue
Block a user