add copy user notes to clipboard
This commit is contained in:
@@ -9,6 +9,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace MareSynchronos.UI
|
namespace MareSynchronos.UI
|
||||||
{
|
{
|
||||||
@@ -329,6 +330,24 @@ namespace MareSynchronos.UI
|
|||||||
}
|
}
|
||||||
UiShared.AttachToolTip("Copy Syncshell ID to Clipboard");
|
UiShared.AttachToolTip("Copy Syncshell ID to Clipboard");
|
||||||
|
|
||||||
|
if (UiShared.IconTextButton(FontAwesomeIcon.UserSecret, "Copy Notes"))
|
||||||
|
{
|
||||||
|
var entries = _apiController.GroupPairedClients.Where(p => string.Equals(p.GroupGID, entry.GID, StringComparison.Ordinal));
|
||||||
|
var comments = _configuration.GetCurrentServerUidComments();
|
||||||
|
StringBuilder sb = new();
|
||||||
|
sb.AppendLine("##MARE_SYNCHRONOS_USER_NOTES_START##");
|
||||||
|
foreach (var userEntry in entries)
|
||||||
|
{
|
||||||
|
if (comments.TryGetValue(userEntry.UserUID, out var comment))
|
||||||
|
{
|
||||||
|
sb.AppendLine(userEntry.UserUID + ":\"" + comment + "\"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sb.AppendLine("##MARE_SYNCHRONOS_USER_NOTES_END##");
|
||||||
|
ImGui.SetClipboardText(sb.ToString());
|
||||||
|
}
|
||||||
|
UiShared.AttachToolTip("Copies all your notes for all users in this Syncshell to the clipboard");
|
||||||
|
|
||||||
if (isOwner || (entry.IsModerator ?? false))
|
if (isOwner || (entry.IsModerator ?? false))
|
||||||
{
|
{
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|||||||
Reference in New Issue
Block a user