From 10756907dcc95ddfdc671c7394be30d0e68c97f2 Mon Sep 17 00:00:00 2001 From: miraikumiko Date: Tue, 17 Jun 2025 12:56:08 +0200 Subject: [PATCH] Add actor/show.html.heex --- .../templates/{user => actor}/show.html.heex | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) rename lib/nulla_web/components/templates/{user => actor}/show.html.heex (75%) diff --git a/lib/nulla_web/components/templates/user/show.html.heex b/lib/nulla_web/components/templates/actor/show.html.heex similarity index 75% rename from lib/nulla_web/components/templates/user/show.html.heex rename to lib/nulla_web/components/templates/actor/show.html.heex index 5a41a2f..fb5fedf 100644 --- a/lib/nulla_web/components/templates/user/show.html.heex +++ b/lib/nulla_web/components/templates/actor/show.html.heex @@ -16,10 +16,10 @@
- +
- {@user.realname} - @{@user.username}@{@domain} + {@actor.name} + @{@actor.preferredUsername}@{@actor.domain}
-

{@user.bio}

+

{@actor.summary}

- <%= if @user.location do %> + <%= if @actor.vcard_Address do %>
<.icon name="hero-map-pin" class="mt-0.5 h-5 w-5 flex-none" />
-
{@user.location}
+
{@actor.vcard_Address}
<% end %> - <%= if @user.birthday do %> + <%= if @actor.vcard_bday do %>
<.icon name="hero-cake" class="mt-0.5 h-5 w-5 flex-none" />
-
{format_birthdate(@user.birthday)}
+
{format_birthdate(@actor.vcard_bday)}
<% end %>
<.icon name="hero-calendar" class="mt-0.5 h-5 w-5 flex-none" />
-
{format_registration_date(@user.inserted_at)}
+
{format_registration_date(@actor.published)}
- <%= if @user.fields do %> + <%= if @actor.attachment do %>
- <%= for {key, value} <- @user.fields do %> -
{key}
+ <%= for %{"type" => "PropertyValue", "name" => name, "value" => value} <- @actor.attachment do %> +
{name}
<%= if Regex.match?(~r{://}, value) do %> {Regex.replace(~r{^\w+://}, value, "")} @@ -66,30 +66,30 @@
<% end %>
<%= for note <- @notes do %>
- +
- {@user.realname} + {@actor.name} - @{@user.username}@{@domain} + @{@actor.preferredUsername}@{@actor.domain}