CDN-fronted servers grouped per CDN, and servers through time
A post whose server is behind a CDN has no place of its own: the globe groups such posts per CDN in labels on a ring above the Arctic, and hovering one draws its arc to the CDN's group and a ring where the server was before the CDN. The card's CDN chip names the CDN, its domain, how PrivaPub found it (published ranges, response headers or network), the place before the CDN and the CDN's servers week by week (/api/privapub/v1/cdns/:domain); the author's tooltip lists the server's changes of place and CDN week by week (/instances/:host/history). Both are read on the first hover and kept for the session. 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
5ec70b3357
commit
620cbef219
12 files changed
+386
-41
No files matched your search
+13
-3
@@ -1,4 +1,4 @@
|
||||
using decePubClient.Models.Mastodon;
|
||||
using decePubClient.Models.Mastodon;
|
||||
|
||||
namespace decePubClient.Models;
|
||||
|
||||
@@ -65,10 +65,20 @@ public enum LocationSource
|
||||
/// <summary>The author's server, known only by country: a point in that country.</summary>
|
||||
Country,
|
||||
/// <summary>A located post, within its range of the reader: drawn at the reader.</summary>
|
||||
NearYou
|
||||
NearYou,
|
||||
/// <summary>The author's server is behind a CDN, whose address says nothing of its place: drawn with the CDN's group.</summary>
|
||||
Cdn
|
||||
}
|
||||
|
||||
public sealed record FeedLocation(double Latitude, double Longitude, LocationSource Source, string Label, double PrecisionKm);
|
||||
/// <summary>
|
||||
/// Where a feed item is drawn. For a CDN-fronted server (Source Cdn) Latitude/Longitude mean nothing: the globe groups it
|
||||
/// under CdnKey, and Before is where the server was before the CDN, when PrivaPub saw it.
|
||||
/// </summary>
|
||||
public sealed record FeedLocation(double Latitude, double Longitude, LocationSource Source, string Label, double PrecisionKm, string CdnKey = default,
|
||||
InstancePlace Before = default)
|
||||
{
|
||||
public bool HasPoint => Source is not LocationSource.Cdn;
|
||||
}
|
||||
|
||||
/// <summary>What the client keeps about a server (from /api/privapub/v1/instances), cached for a day.</summary>
|
||||
public class ServerInfo
|
||||
|
||||
Reference in new issue
Block a user