Wire the client to PrivaPub: one sign-in, real feeds, a globe, nerd stats
One sign-in for both of PrivaPub's APIs: the root logs in on /clientapi, picks a persona, and each persona gets its own Mastodon token in exchange for the JWT (PersonaExchange). HttpService picks credentials and JSON by route (JWT and camelCase for /clientapi, the persona token and snake_case for /api, nothing for /oauth), retries a refused persona token once, and records every request for the nerd stats. The feed page is three columns: navigation with a persona switcher, the feed with a tab per kind (home, local, federated, nearby, communities and circles, direct, notifications, favourites, bookmarks, hashtags), and a 3D globe that looks at the spherical mean of the posts in view and draws a pulse and an arc to a hovered one. Posts sit at their own place, their event's venue, the reader (located posts) or their author's server as PrivaPub publishes it. Cards favourite, boost, bookmark, reply, mute, block and delete; the composer posts with a content warning, visibility, media and alt text, or as a located post. Older pages load as the end nears; newer ones are polled while visible. Nerd stats in tooltips: provenance, author and server, place, media, counts, paging, the globe's camera and frame rate. The mock (Faker, MessagesService, the Message models and store) and the OIDC template leftovers are gone. Strings in English and Italian. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
f41ebf2160
commit
827ecb770e
56 files changed
+5367
-832
No files matched your search
@@ -0,0 +1,90 @@
|
||||
namespace decePubClient.Models.Mastodon;
|
||||
|
||||
/// <summary>Status.privapub: what a Mastodon status cannot say (PrivaPub's Mastodon client API invariant 7).</summary>
|
||||
public class PrivaPubStatus
|
||||
{
|
||||
/// <summary>The ActivityPub type of a remote object: Note, Article, Page, Video, Audio, Event, Question…</summary>
|
||||
public string ObjectType { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Excerpt { get; set; }
|
||||
public string Cover { get; set; }
|
||||
public PrivaPubSource Source { get; set; }
|
||||
public PrivaPubLink Link { get; set; }
|
||||
public PrivaPubVideo Video { get; set; }
|
||||
public PrivaPubAudio Audio { get; set; }
|
||||
public PrivaPubEvent Event { get; set; }
|
||||
/// <summary>A remote post's own place (Pixelfed's location), shown only.</summary>
|
||||
public PrivaPubPlace Place { get; set; }
|
||||
public PrivaPubVotes Votes { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubSource
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public string MediaType { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubLink
|
||||
{
|
||||
public string Url { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Image { get; set; }
|
||||
public bool FromPublisher { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubVariant
|
||||
{
|
||||
public string Url { get; set; }
|
||||
public string MediaType { get; set; }
|
||||
public int? Width { get; set; }
|
||||
public int? Height { get; set; }
|
||||
public double? Fps { get; set; }
|
||||
public long? Size { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubVideo
|
||||
{
|
||||
public double? Duration { get; set; }
|
||||
public List<PrivaPubVariant> Variants { get; set; } = [];
|
||||
public bool IsLive { get; set; }
|
||||
public long? Views { get; set; }
|
||||
public string Licence { get; set; }
|
||||
public string Category { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubAudio
|
||||
{
|
||||
public double? Duration { get; set; }
|
||||
public List<PrivaPubVariant> Variants { get; set; } = [];
|
||||
public string Album { get; set; }
|
||||
public string Licence { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubEvent
|
||||
{
|
||||
public DateTime? Start { get; set; }
|
||||
public DateTime? End { get; set; }
|
||||
public string TimeZone { get; set; }
|
||||
public List<PrivaPubPlace> Places { get; set; } = [];
|
||||
public string OnlineUrl { get; set; }
|
||||
public int? Participants { get; set; }
|
||||
public int? Capacity { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubPlace
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Address { get; set; }
|
||||
public string Country { get; set; }
|
||||
public double? Latitude { get; set; }
|
||||
public double? Longitude { get; set; }
|
||||
public string Url { get; set; }
|
||||
}
|
||||
|
||||
public class PrivaPubVotes
|
||||
{
|
||||
public int Up { get; set; }
|
||||
public int Down { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user