diff --git a/lib/claper_web/live/event_live/form_component.ex b/lib/claper_web/live/event_live/form_component.ex index 2dbff18..4c3017c 100644 --- a/lib/claper_web/live/event_live/form_component.ex +++ b/lib/claper_web/live/event_live/form_component.ex @@ -120,25 +120,30 @@ defmodule ClaperWeb.EventLive.FormComponent do type="submit" class="btn-gradient w-full rounded-lg px-3 py-2 text-sm font-bold transition-colors" > - {gettext("Submit")} + {gettext("Send")} <% else %> <% end %> diff --git a/lib/claper_web/live/event_live/manage.ex b/lib/claper_web/live/event_live/manage.ex index 87bf5ba..ea47e96 100644 --- a/lib/claper_web/live/event_live/manage.ex +++ b/lib/claper_web/live/event_live/manage.ex @@ -1338,9 +1338,11 @@ defmodule ClaperWeb.EventLive.Manage do _ -> :date end - Claper.Posts.list_questions(event_id, [:event, :reactions], sort_atom) - |> Enum.filter(&(ClaperWeb.Helpers.body_without_links(&1.body) =~ "?")) - |> Enum.reverse() + questions = + Claper.Posts.list_questions(event_id, [:event, :reactions], sort_atom) + |> Enum.filter(&(ClaperWeb.Helpers.body_without_links(&1.body) =~ "?")) + + if sort_atom == :date, do: Enum.reverse(questions), else: questions end defp list_form_submits(_socket, presentation_file_id) do diff --git a/lib/claper_web/live/event_live/manage_attendees_options_component.ex b/lib/claper_web/live/event_live/manage_attendees_options_component.ex index 876a53d..c8bf5ce 100644 --- a/lib/claper_web/live/event_live/manage_attendees_options_component.ex +++ b/lib/claper_web/live/event_live/manage_attendees_options_component.ex @@ -13,16 +13,28 @@ defmodule ClaperWeb.EventLive.ManageAttendeesOptionsComponent do xmlns="http://www.w3.org/2000/svg" width="24" height="24" - viewBox="0 0 20 20" + viewBox="0 0 24 24" fill="none" - class="shrink-0" + stroke="currentColor" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round" + class="icon icon-tabler icons-tabler-outline icon-tabler-mood-cog shrink-0 text-[#140553]" > - + + + + + + + + + + + + - {gettext("Attendees Settings")} + {gettext("Attendee Settings")}
diff --git a/lib/claper_web/live/event_live/manage_audience_responses_component.ex b/lib/claper_web/live/event_live/manage_audience_responses_component.ex index 8d48aec..9c989b6 100644 --- a/lib/claper_web/live/event_live/manage_audience_responses_component.ex +++ b/lib/claper_web/live/event_live/manage_audience_responses_component.ex @@ -16,16 +16,18 @@ defmodule ClaperWeb.EventLive.ManageAudienceResponsesComponent do xmlns="http://www.w3.org/2000/svg" width="24" height="24" - viewBox="0 0 20 20" + viewBox="0 0 24 24" fill="none" - class="shrink-0" + stroke="currentColor" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round" + class="icon icon-tabler icons-tabler-outline icon-tabler-message shrink-0 text-[#140553]" > - + + + + {gettext("Audience Responses")}
@@ -233,35 +235,75 @@ defmodule ClaperWeb.EventLive.ManageAudienceResponsesComponent do data-forms-nb={@form_submit_count} phx-hook="ScrollIntoDiv" > -
-
-
- + {avatar_emoji(submission)} +
-
-
-
- {avatar_emoji(submission)} +
+ +
+
+ + {submission.form.title} + +
+
+
-
- <%= for res <- submission.response do %> -

- {elem(res, 0)}: - {elem(res, 1)} -

- <% end %> -
+
+ +
+
+
+
+ {elem(response, 0)} +
+
+ {elem(response, 1)} +
+
+
diff --git a/lib/claper_web/live/event_live/manage_interaction_list_component.ex b/lib/claper_web/live/event_live/manage_interaction_list_component.ex index fe3562c..175e83f 100644 --- a/lib/claper_web/live/event_live/manage_interaction_list_component.ex +++ b/lib/claper_web/live/event_live/manage_interaction_list_component.ex @@ -48,22 +48,19 @@ defmodule ClaperWeb.EventLive.ManageInteractionListComponent do xmlns="http://www.w3.org/2000/svg" width="24" height="24" - viewBox="0 0 20 20" + viewBox="0 0 24 24" fill="none" - class="shrink-0" + stroke="currentColor" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round" + class="icon icon-tabler icons-tabler-outline icon-tabler-north-star shrink-0 text-[#140553]" > - - - + + + + + {gettext("Interactions")}
diff --git a/lib/claper_web/live/event_live/manage_interaction_options_component.ex b/lib/claper_web/live/event_live/manage_interaction_options_component.ex index d535d0e..3cac552 100644 --- a/lib/claper_web/live/event_live/manage_interaction_options_component.ex +++ b/lib/claper_web/live/event_live/manage_interaction_options_component.ex @@ -13,24 +13,27 @@ defmodule ClaperWeb.EventLive.ManageInteractionOptionsComponent do xmlns="http://www.w3.org/2000/svg" width="24" height="24" - viewBox="0 0 20 20" + viewBox="0 0 24 24" fill="none" - class="shrink-0" + stroke="currentColor" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round" + class="icon icon-tabler icons-tabler-outline icon-tabler-pointer-cog shrink-0 text-[#140553]" > - - - + + + + + + + + + - {gettext("Current interaction options")} + + {gettext("Current Interaction Settings")} +
diff --git a/lib/claper_web/live/event_live/manage_presentation_options_component.ex b/lib/claper_web/live/event_live/manage_presentation_options_component.ex index 9d6e746..9076d34 100644 --- a/lib/claper_web/live/event_live/manage_presentation_options_component.ex +++ b/lib/claper_web/live/event_live/manage_presentation_options_component.ex @@ -13,18 +13,26 @@ defmodule ClaperWeb.EventLive.ManagePresentationOptionsComponent do xmlns="http://www.w3.org/2000/svg" width="24" height="24" - viewBox="0 0 20 20" + viewBox="0 0 24 24" fill="none" - class="shrink-0" + stroke="currentColor" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round" + class="icon icon-tabler icons-tabler-outline icon-tabler-eye-cog shrink-0 text-[#140553]" > - + + + + + + + + + + - {gettext("Presentation Options")} + {gettext("Presentation Settings")}
diff --git a/lib/claper_web/live/event_live/manage_slide_preview_component.ex b/lib/claper_web/live/event_live/manage_slide_preview_component.ex index fb7afb3..db97ead 100644 --- a/lib/claper_web/live/event_live/manage_slide_preview_component.ex +++ b/lib/claper_web/live/event_live/manage_slide_preview_component.ex @@ -18,20 +18,15 @@ defmodule ClaperWeb.EventLive.ManageSlidePreviewComponent do height="24" viewBox="0 0 24 24" fill="none" - class="shrink-0" + stroke="currentColor" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round" + class="icon icon-tabler icons-tabler-outline icon-tabler-eye shrink-0 text-[#140553]" > - - + + + {gettext("Preview")}
diff --git a/lib/claper_web/live/event_live/manage_slide_sidebar_component.ex b/lib/claper_web/live/event_live/manage_slide_sidebar_component.ex index 0f1b70d..b1bf32e 100644 --- a/lib/claper_web/live/event_live/manage_slide_sidebar_component.ex +++ b/lib/claper_web/live/event_live/manage_slide_sidebar_component.ex @@ -18,24 +18,20 @@ defmodule ClaperWeb.EventLive.ManageSlideSidebarComponent do xmlns="http://www.w3.org/2000/svg" width="24" height="24" - viewBox="0 0 20 18" + viewBox="0 0 24 24" fill="none" - class="shrink-0" + stroke="currentColor" + stroke-width="2" + stroke-linecap="round" + stroke-linejoin="round" + class="icon icon-tabler icons-tabler-outline icon-tabler-presentation shrink-0 text-[#140553]" > - - + + + + + + {gettext("Content")} diff --git a/lib/claper_web/live/event_live/manageable_post_component.ex b/lib/claper_web/live/event_live/manageable_post_component.ex index 0b5e7d3..b0e88b2 100644 --- a/lib/claper_web/live/event_live/manageable_post_component.ex +++ b/lib/claper_web/live/event_live/manageable_post_component.ex @@ -14,7 +14,13 @@ defmodule ClaperWeb.EventLive.ManageablePostComponent do |> assign(:avatar_emoji, avatar_emoji(assigns.post)) ~H""" -
+
@@ -38,7 +44,8 @@ defmodule ClaperWeb.EventLive.ManageablePostComponent do
- <%= if @post.pinned do %> - - - - <% else %> - - - - <% end %> + + + + + +
<%= if @post.attendee_identifier do %> @@ -98,15 +90,19 @@ defmodule ClaperWeb.EventLive.ManageablePostComponent do > - + + +
@@ -124,15 +120,19 @@ defmodule ClaperWeb.EventLive.ManageablePostComponent do > - + + +
@@ -146,15 +146,22 @@ defmodule ClaperWeb.EventLive.ManageablePostComponent do > - + + + + + +
@@ -177,7 +184,7 @@ defmodule ClaperWeb.EventLive.ManageablePostComponent do true -> "background: #fff" end %> -
+
- {gettext("Submitted")} + {gettext("Voted")} <% else %> <%= if (length @selected_poll_opt) == 0 do %> diff --git a/lib/claper_web/live/event_live/post_component.ex b/lib/claper_web/live/event_live/post_component.ex index fd5e92d..51490e0 100644 --- a/lib/claper_web/live/event_live/post_component.ex +++ b/lib/claper_web/live/event_live/post_component.ex @@ -50,8 +50,18 @@ defmodule ClaperWeb.EventLive.PostComponent do + {gettext("Pinned")} diff --git a/lib/claper_web/live/event_live/quiz_component.ex b/lib/claper_web/live/event_live/quiz_component.ex index 1f3990c..cd90545 100644 --- a/lib/claper_web/live/event_live/quiz_component.ex +++ b/lib/claper_web/live/event_live/quiz_component.ex @@ -183,7 +183,7 @@ defmodule ClaperWeb.EventLive.QuizComponent do <% else %>

{gettext("Waiting for results...")}

Floki.parse_document!() - assert_submitted_button(submitted_document) + assert_submitted_button(submitted_document, "Voted") end test "form uses the feature preview card and field styling" do @@ -89,6 +89,11 @@ defmodule ClaperWeb.EventLive.InteractionComponentsTest do assert "btn-gradient" in submit_classes assert "w-full" in submit_classes + assert document + |> Floki.find(~s(button[type="submit"])) + |> Floki.text() + |> String.trim() == "Send" + submitted_document = FormComponent |> render_component( @@ -101,7 +106,7 @@ defmodule ClaperWeb.EventLive.InteractionComponentsTest do ) |> Floki.parse_document!() - assert_submitted_button(submitted_document) + assert_submitted_button(submitted_document, "Sent") assert Floki.attribute( submitted_document, @@ -328,14 +333,15 @@ defmodule ClaperWeb.EventLive.InteractionComponentsTest do assert Floki.attribute(document, close_selector, "aria-label") == ["Close"] end - defp assert_submitted_button(document) do + defp assert_submitted_button(document, text) do assert "w-full" in classes(document, "button[data-submitted]") assert Floki.attribute(document, "button[data-submitted]", "disabled") == ["disabled"] + assert Floki.find(document, "button[data-submitted] svg") != [] assert document |> Floki.find("button[data-submitted]") |> Floki.text() - |> String.trim() == "Submitted" + |> String.trim() == text end defp classes(document, selector) do