asuh
This commit is contained in:
parent
a12f96341b
commit
eb9a5c7d46
|
@ -1,6 +1,7 @@
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
using OrangeGuidanceTomestone.Helpers;
|
||||||
|
|
||||||
namespace OrangeGuidanceTomestone.Ui;
|
namespace OrangeGuidanceTomestone.Ui;
|
||||||
|
|
||||||
|
@ -72,6 +73,32 @@ internal class Viewer {
|
||||||
ImGui.PushTextWrapPos();
|
ImGui.PushTextWrapPos();
|
||||||
ImGui.TextUnformatted(message.Text);
|
ImGui.TextUnformatted(message.Text);
|
||||||
ImGui.PopTextWrapPos();
|
ImGui.PopTextWrapPos();
|
||||||
|
|
||||||
|
if (ImGui.Button("Like")) {
|
||||||
|
Task.Run(async () => {
|
||||||
|
await ServerHelper.SendRequest(
|
||||||
|
this.Plugin.Config.ApiKey,
|
||||||
|
HttpMethod.Patch,
|
||||||
|
$"/messages/{message.Id}/votes",
|
||||||
|
null,
|
||||||
|
new StringContent("1")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
|
||||||
|
if (ImGui.Button("Dislike")) {
|
||||||
|
Task.Run(async () => {
|
||||||
|
await ServerHelper.SendRequest(
|
||||||
|
this.Plugin.Config.ApiKey,
|
||||||
|
HttpMethod.Patch,
|
||||||
|
$"/messages/{message.Id}/votes",
|
||||||
|
null,
|
||||||
|
new StringContent("-1")
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.TableSetColumnIndex(2)) {
|
if (ImGui.TableSetColumnIndex(2)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user