diff --git a/Iceshrimp.Frontend/Components/JsonViewer.razor b/Iceshrimp.Frontend/Components/JsonViewer.razor
index 20b47a2c..e9c824a0 100644
--- a/Iceshrimp.Frontend/Components/JsonViewer.razor
+++ b/Iceshrimp.Frontend/Components/JsonViewer.razor
@@ -53,7 +53,7 @@
),
JsonValueKind.Number => (@
@element.GetDouble()),
- JsonValueKind.String => (element.GetString() is { } s && Uri.TryCreate(s, UriKind.Absolute, out var _)
+ JsonValueKind.String => (element.GetString() is { } s && s.StartsWith("https://") && Uri.TryCreate(s, UriKind.Absolute, out var _)
? @@s
: @"@element.GetString()?.ReplaceLineEndings("\\n")"),
_ => throw new ArgumentOutOfRangeException()
diff --git a/Iceshrimp.Frontend/Components/JsonViewer.razor.css b/Iceshrimp.Frontend/Components/JsonViewer.razor.css
index d1f15593..bbaff0d3 100644
--- a/Iceshrimp.Frontend/Components/JsonViewer.razor.css
+++ b/Iceshrimp.Frontend/Components/JsonViewer.razor.css
@@ -1,4 +1,5 @@
.json {
+ word-break: break-word;
dt {
color: #66C3CC;
font-weight: bold;
diff --git a/Iceshrimp.Frontend/Core/ControllerModels/AdminControllerModel.cs b/Iceshrimp.Frontend/Core/ControllerModels/AdminControllerModel.cs
index 5a1663a5..2927a214 100644
--- a/Iceshrimp.Frontend/Core/ControllerModels/AdminControllerModel.cs
+++ b/Iceshrimp.Frontend/Core/ControllerModels/AdminControllerModel.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Nodes;
using Iceshrimp.Frontend.Core.Services;
using Iceshrimp.Shared.Schemas.Web;
@@ -8,6 +9,11 @@ internal class AdminControllerModel(ApiClient api)
public Task GenerateInviteAsync() =>
api.CallAsync(HttpMethod.Post, "/invites/generate");
- //TODO: ActivityStreams debug endpoints
+ public Task GetActivityByNoteIdAsync(string id) =>
+ api.CallNullableAsync(HttpMethod.Get, $"/admin/activities/notes/{id}");
+
+ public Task GetActivityByUserIdAsync(string id) =>
+ api.CallNullableAsync(HttpMethod.Get, $"/admin/activities/users/{id}");
+
//TODO: other endpoints
}
\ No newline at end of file
diff --git a/Iceshrimp.Frontend/Pages/About.razor b/Iceshrimp.Frontend/Pages/About.razor
index f24f50d0..c6f68094 100644
--- a/Iceshrimp.Frontend/Pages/About.razor
+++ b/Iceshrimp.Frontend/Pages/About.razor
@@ -13,6 +13,7 @@
@attribute [Authorize]
@inject ApiService Api;
@inject IStringLocalizer Loc;
+@inject SessionService SessionSvc;
@@ -55,6 +56,14 @@
}
Documents.Add(Loc["Note response"], JsonSerializer.SerializeToDocument(noteResponse));
+
+ if (SessionSvc.Current?.IsAdmin is true)
+ {
+ var activity = await Api.Admin.GetActivityByNoteIdAsync(noteResponse.Id);
+
+ if (activity != null)
+ Documents.Add(Loc["Activity"], JsonSerializer.SerializeToDocument(activity));
+ }
State = State.Loaded;
}
@@ -75,6 +84,14 @@
Documents.Add(Loc["User response"], JsonSerializer.SerializeToDocument(userResponse));
Documents.Add(Loc["Profile response"], JsonSerializer.SerializeToDocument(profileResponse));
+ if (SessionSvc.Current?.IsAdmin is true)
+ {
+ var activity = await Api.Admin.GetActivityByUserIdAsync(userResponse.Id);
+
+ if (activity != null)
+ Documents.Add(Loc["Activity"], JsonSerializer.SerializeToDocument(activity));
+ }
+
State = State.Loaded;
}
else