diff --git a/lib/components/activity/actions/more_actions_live.sface b/lib/components/activity/actions/more_actions_live.sface index f6ba27b1..859ccaa0 100644 --- a/lib/components/activity/actions/more_actions_live.sface +++ b/lib/components/activity/actions/more_actions_live.sface @@ -140,9 +140,9 @@ {/if} -
  • +
  • @@ -222,6 +222,7 @@ module={maybe_component(Bonfire.Label.Web.ContentLabelLive, @__context__)} object={@object} object_boundary={@object_boundary} + target={"##{@activity_component_id}"} /> {!-- Block the author, etc --} diff --git a/lib/components/activity/activity_live.ex b/lib/components/activity/activity_live.ex index 61ac71a7..bc016a22 100644 --- a/lib/components/activity/activity_live.ex +++ b/lib/components/activity/activity_live.ex @@ -170,6 +170,7 @@ defmodule Bonfire.UI.Social.ActivityLive do existing -> existing end, published_in: maybe_published_in(activity, extras[:verb]), + labelled: maybe_labelled(activity, extras[:verb]), # e(socket_assigns[:activity], :peered, nil) != nil or is_remote: (assigns[:is_remote] || socket_assigns[:is_remote] || @@ -378,8 +379,17 @@ defmodule Bonfire.UI.Social.ActivityLive do parent_id end - def maybe_published_in(_none, _) do - # debug(none, "none") + def maybe_published_in(none, verb) do + # debug(none, "none for #{verb}") + nil + end + + def maybe_labelled(%{subject: %{table_id: "2AGSCANBECATEG0RY0RHASHTAG"} = subject}, "Label") do + subject + end + + def maybe_labelled(none, verb) do + debug(none, "none for #{verb}") nil end @@ -570,6 +580,12 @@ defmodule Bonfire.UI.Social.ActivityLive do + + {#for {component, component_assigns} when is_atom(component) <- activity_components( @activity, @@ -769,6 +785,12 @@ defmodule Bonfire.UI.Social.ActivityLive do /> {/case} {/for} + + {/if} """ diff --git a/lib/components/activity/context/labelled_live.ex b/lib/components/activity/context/labelled_live.ex new file mode 100644 index 00000000..4ca7999a --- /dev/null +++ b/lib/components/activity/context/labelled_live.ex @@ -0,0 +1,7 @@ +defmodule Bonfire.UI.Social.Activity.LabelledLive do + use Bonfire.UI.Common.Web, :stateless_component + + prop labelled, :any, default: nil + prop showing_within, :atom, default: nil + prop class, :css_class, default: ["flex items-center -ml-6 justify-start pb-2 mb-2"] +end diff --git a/lib/components/activity/context/labelled_live.sface b/lib/components/activity/context/labelled_live.sface new file mode 100644 index 00000000..c98291a9 --- /dev/null +++ b/lib/components/activity/context/labelled_live.sface @@ -0,0 +1,24 @@ +
    + + +
    +
    + + {e(@labelled, :profile, :name, nil) || e(@labelled, :character, :username, nil)} + +
    +
    +
    \ No newline at end of file diff --git a/lib/components/activity/subject/no_subject_live.sface b/lib/components/activity/subject/no_subject_live.sface index d82c39a1..ec8e9040 100644 --- a/lib/components/activity/subject/no_subject_live.sface +++ b/lib/components/activity/subject/no_subject_live.sface @@ -1,9 +1,4 @@
    - - -
    tags} = params, socket) do - with {:ok, _} <- - Bonfire.Social.Tags.maybe_tag( - current_user_required!(socket), - e(params, "id", nil) || e(socket.assigns, :object, nil), - tags - ) do - Bonfire.UI.Common.OpenModalLive.close() - - {:noreply, - socket - |> assign_flash(:info, l("Tagged!"))} - end - end - def handle_event("delete", %{"id" => id} = _params, socket) do with {:ok, _} <- Objects.delete(id,