diff --git a/lib/claper/embeds.ex b/lib/claper/embeds.ex new file mode 100644 index 00000000..772b2156 --- /dev/null +++ b/lib/claper/embeds.ex @@ -0,0 +1,189 @@ +defmodule Claper.Embeds do + @moduledoc """ + The Embeds context. + """ + + import Ecto.Query, warn: false + alias Claper.Repo + + alias Claper.Embeds.Embed + + @doc """ + Returns the list of embeds for a given presentation file. + + ## Examples + + iex> list_embeds(123) + [%Embed{}, ...] + + """ + def list_embeds(presentation_file_id) do + from(e in Embed, + where: e.presentation_file_id == ^presentation_file_id, + order_by: [asc: e.id, asc: e.position] + ) + |> Repo.all() + end + + @doc """ + Returns the list of embeds for a given presentation file and a given position. + + ## Examples + + iex> list_embeds_at_position(123, 0) + [%Embed{}, ...] + + """ + def list_embeds_at_position(presentation_file_id, position) do + from(e in Embed, + where: e.presentation_file_id == ^presentation_file_id and e.position == ^position, + order_by: [asc: e.id] + ) + |> Repo.all() + end + + @doc """ + Gets a single embed. + + Raises `Ecto.NoResultsError` if the Embed does not exist. + + ## Examples + + iex> get_embed!(123) + %Embed{} + + iex> get_embed!(456) + ** (Ecto.NoResultsError) + + """ + def get_embed!(id, preload \\ []), + do: Repo.get!(Embed, id) |> Repo.preload(preload) + + @doc """ + Gets a single embed for a given position. + + ## Examples + + iex> get_embed_current_position(123, 0) + %Embed{} + + """ + def get_embed_current_position(presentation_file_id, position) do + from(e in Embed, + where: + e.position == ^position and e.presentation_file_id == ^presentation_file_id and + e.enabled == true + ) + |> Repo.one() + end + + @doc """ + Creates a embed. + + ## Examples + + iex> create_embed(%{field: value}) + {:ok, %Embed{}} + + iex> create_embed(%{field: bad_value}) + {:error, %Ecto.Changeset{}} + + """ + def create_embed(attrs \\ %{}) do + %Embed{} + |> Embed.changeset(attrs) + |> Repo.insert() + end + + @doc """ + Updates a embed. + + ## Examples + + iex> update_embed("123e4567-e89b-12d3-a456-426614174000", embed, %{field: new_value}) + {:ok, %Embed{}} + + iex> update_embed("123e4567-e89b-12d3-a456-426614174000", embed, %{field: bad_value}) + {:error, %Ecto.Changeset{}} + + """ + def update_embed(event_uuid, %Embed{} = embed, attrs) do + embed + |> Embed.changeset(attrs) + |> Repo.update() + |> case do + {:ok, embed} -> + broadcast({:ok, embed, event_uuid}, :embed_updated) + + {:error, changeset} -> + {:error, %{changeset | action: :update}} + end + end + + @doc """ + Deletes a embed. + + ## Examples + + iex> delete_embed("123e4567-e89b-12d3-a456-426614174000", embed) + {:ok, %Embed{}} + + iex> delete_embed("123e4567-e89b-12d3-a456-426614174000", embed) + {:error, %Ecto.Changeset{}} + + """ + def delete_embed(event_uuid, %Embed{} = embed) do + {:ok, embed} = Repo.delete(embed) + broadcast({:ok, embed, event_uuid}, :embed_deleted) + end + + @doc """ + Returns an `%Ecto.Changeset{}` for tracking embed changes. + + ## Examples + + iex> change_embed(embed) + %Ecto.Changeset{data: %Embed{}} + + """ + def change_embed(%Embed{} = embed, attrs \\ %{}) do + Embed.changeset(embed, attrs) + end + + def disable_all(presentation_file_id, position) do + from(e in Embed, + where: e.presentation_file_id == ^presentation_file_id and e.position == ^position + ) + |> Repo.update_all(set: [enabled: false]) + end + + def set_status(id, presentation_file_id, position, status) do + if status do + from(e in Embed, + where: + e.presentation_file_id == ^presentation_file_id and e.position == ^position and + e.id != ^id + ) + |> Repo.update_all(set: [enabled: false]) + end + + from(e in Embed, + where: + e.presentation_file_id == ^presentation_file_id and e.position == ^position and + e.id == ^id + ) + |> Repo.update_all(set: [enabled: status]) + end + + defp broadcast({:error, _reason} = error, _embed), do: error + + defp broadcast({:ok, embed, event_uuid}, event) do + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{event_uuid}", + {event, embed} + ) + + {:ok, embed} + end +end diff --git a/lib/claper/embeds/embed.ex b/lib/claper/embeds/embed.ex new file mode 100644 index 00000000..7727e397 --- /dev/null +++ b/lib/claper/embeds/embed.ex @@ -0,0 +1,38 @@ +defmodule Claper.Embeds.Embed do + use Ecto.Schema + import Ecto.Changeset + + @derive {Jason.Encoder, only: [:title, :content, :position, :attendee_visibility]} + schema "embeds" do + field :title, :string + field :content, :string + field :enabled, :boolean, default: true + field :position, :integer, default: 0 + field :attendee_visibility, :boolean, default: false + + belongs_to :presentation_file, Claper.Presentations.PresentationFile + + timestamps() + end + + @doc false + def changeset(embed, attrs \\ %{}) do + embed + |> cast(attrs, [ + :enabled, + :title, + :content, + :presentation_file_id, + :position, + :attendee_visibility + ]) + |> validate_required([ + :title, + :content, + :presentation_file_id, + :position, + :attendee_visibility + ]) + |> validate_format(:content, ~r//, message: "Invalid embed format") + end +end diff --git a/lib/claper/events.ex b/lib/claper/events.ex index 0d98eb76..e52d59b1 100644 --- a/lib/claper/events.ex +++ b/lib/claper/events.ex @@ -275,11 +275,12 @@ defmodule Claper.Events do |> Ecto.Multi.run(:from_event, fn _repo, _changes -> {:ok, get_user_event!(user_id, from_event_uuid, - presentation_file: [polls: [:poll_opts], forms: []] + presentation_file: [polls: [:poll_opts], forms: [], embeds: []] )} end) |> Ecto.Multi.run(:to_event, fn _repo, _changes -> - {:ok, get_user_event!(user_id, to_event_uuid, presentation_file: [:polls, :forms])} + {:ok, + get_user_event!(user_id, to_event_uuid, presentation_file: [:polls, :forms, :embeds])} end) |> Ecto.Multi.run(:polls, fn _repo, %{from_event: from_event, to_event: to_event} -> {:ok, @@ -321,6 +322,22 @@ defmodule Claper.Events do end end)} end) + |> Ecto.Multi.run(:embeds, fn _repo, %{from_event: from_event, to_event: to_event} -> + {:ok, + from_event.presentation_file.embeds + |> Enum.each(fn embed -> + if embed.position < to_event.presentation_file.length do + Claper.Embeds.create_embed(%{ + title: embed.title, + content: embed.content, + position: embed.position, + enabled: embed.enabled, + attendee_visibility: embed.attendee_visibility, + presentation_file_id: to_event.presentation_file.id + }) + end + end)} + end) |> Repo.transaction() do {:ok, %{to_event: to_event}} -> {:ok, to_event} end diff --git a/lib/claper/forms.ex b/lib/claper/forms.ex index aa6ff9be..210d8d8d 100644 --- a/lib/claper/forms.ex +++ b/lib/claper/forms.ex @@ -181,20 +181,22 @@ defmodule Claper.Forms do |> Repo.update_all(set: [enabled: false]) end - def set_default(id, presentation_file_id, position) do - from(f in Form, - where: - f.presentation_file_id == ^presentation_file_id and f.position == ^position and - f.id != ^id - ) - |> Repo.update_all(set: [enabled: false]) + def set_status(id, presentation_file_id, position, status) do + if status do + from(f in Form, + where: + f.presentation_file_id == ^presentation_file_id and f.position == ^position and + f.id != ^id + ) + |> Repo.update_all(set: [enabled: false]) + end from(f in Form, where: f.presentation_file_id == ^presentation_file_id and f.position == ^position and f.id == ^id ) - |> Repo.update_all(set: [enabled: true]) + |> Repo.update_all(set: [enabled: status]) end defp broadcast({:error, _reason} = error, _form), do: error diff --git a/lib/claper/polls.ex b/lib/claper/polls.ex index 729e71fb..724dec21 100644 --- a/lib/claper/polls.ex +++ b/lib/claper/polls.ex @@ -275,20 +275,22 @@ defmodule Claper.Polls do |> Repo.update_all(set: [enabled: false]) end - def set_default(id, presentation_file_id, position) do - from(p in Poll, - where: - p.presentation_file_id == ^presentation_file_id and p.position == ^position and - p.id != ^id - ) - |> Repo.update_all(set: [enabled: false]) + def set_status(id, presentation_file_id, position, status) do + if status do + from(p in Poll, + where: + p.presentation_file_id == ^presentation_file_id and p.position == ^position and + p.id != ^id + ) + |> Repo.update_all(set: [enabled: false]) + end from(p in Poll, where: p.presentation_file_id == ^presentation_file_id and p.position == ^position and p.id == ^id ) - |> Repo.update_all(set: [enabled: true]) + |> Repo.update_all(set: [enabled: status]) end defp broadcast({:error, _reason} = error, _poll), do: error diff --git a/lib/claper/presentations/presentation_file.ex b/lib/claper/presentations/presentation_file.ex index 1c49e4de..787334ad 100644 --- a/lib/claper/presentations/presentation_file.ex +++ b/lib/claper/presentations/presentation_file.ex @@ -10,6 +10,7 @@ defmodule Claper.Presentations.PresentationFile do belongs_to :event, Claper.Events.Event has_many :polls, Claper.Polls.Poll has_many :forms, Claper.Forms.Form + has_many :embeds, Claper.Embeds.Embed has_one :presentation_state, Claper.Presentations.PresentationState, on_replace: :delete timestamps() diff --git a/lib/claper_web/live/embed_live/form_component.ex b/lib/claper_web/live/embed_live/form_component.ex new file mode 100644 index 00000000..28fdb0ce --- /dev/null +++ b/lib/claper_web/live/embed_live/form_component.ex @@ -0,0 +1,92 @@ +defmodule ClaperWeb.EmbedLive.FormComponent do + use ClaperWeb, :live_component + + alias Claper.Embeds + + @impl true + def update(%{embed: embed} = assigns, socket) do + changeset = Embeds.change_embed(embed) + + {:ok, + socket + |> assign(assigns) + |> assign_new(:dark, fn -> false end) + |> assign(:embeds, list_embeds(assigns)) + |> assign(:changeset, changeset)} + end + + @impl true + def handle_event("delete", %{"id" => id}, socket) do + embed = Embeds.get_embed!(id) + {:ok, _} = Embeds.delete_embed(socket.assigns.event_uuid, embed) + + {:noreply, socket |> push_redirect(to: socket.assigns.return_to)} + end + + @impl true + def handle_event("validate", %{"embed" => embed_params}, socket) do + changeset = + socket.assigns.embed + |> Embeds.change_embed(embed_params) + |> Map.put(:action, :validate) + + {:noreply, socket |> assign(:changeset, changeset)} + end + + @impl true + def handle_event("save", %{"embed" => embed_params}, socket) do + save_embed(socket, socket.assigns.live_action, embed_params) + end + + defp save_embed(socket, :edit, embed_params) do + case Embeds.update_embed( + socket.assigns.event_uuid, + socket.assigns.embed, + embed_params + ) do + {:ok, _embed} -> + {:noreply, + socket + |> push_redirect(to: socket.assigns.return_to)} + + {:error, %Ecto.Changeset{} = changeset} -> + {:noreply, assign(socket, :changeset, changeset)} + end + end + + defp save_embed(socket, :new, embed_params) do + case Embeds.create_embed( + embed_params + |> Map.put("presentation_file_id", socket.assigns.presentation_file.id) + |> Map.put("position", socket.assigns.position) + |> Map.put("enabled", false) + ) do + {:ok, embed} -> + {:noreply, + socket + |> maybe_change_current_embed(embed) + |> push_redirect(to: socket.assigns.return_to)} + + {:error, %Ecto.Changeset{} = changeset} -> + {:noreply, assign(socket, changeset: changeset)} + end + end + + defp maybe_change_current_embed(socket, %{enabled: true} = embed) do + embed = Embeds.get_embed!(embed.id) + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event_uuid}", + {:current_embed, embed} + ) + + socket + end + + defp maybe_change_current_embed(socket, _), do: socket + + defp list_embeds(assigns) do + Embeds.list_embeds(assigns.presentation_file.id) + end +end diff --git a/lib/claper_web/live/embed_live/form_component.html.heex b/lib/claper_web/live/embed_live/form_component.html.heex new file mode 100644 index 00000000..787a40fb --- /dev/null +++ b/lib/claper_web/live/embed_live/form_component.html.heex @@ -0,0 +1,64 @@ +
+ <.form + :let={f} + for={@changeset} + id="embed-form" + phx-target={@myself} + phx-change="validate" + phx-submit="save" + > +
+ + + +
+ <%= checkbox(f, :attendee_visibility, class: "h-4 w-5") %> + <%= label(f, :attendee_visibility, gettext("Attendee can access the embed on the device"), + class: "text-sm font-medium" + ) %> +
+
+ +
+ + <%= if @live_action == :edit do %> + <%= link(gettext("Delete"), + to: "#", + phx_click: "delete", + phx_target: @myself, + phx_value_id: @embed.id, + data: [ + confirm: gettext("This will delete the embed, are you sure?") + ], + class: + "w-full lg:w-auto px-6 text-center text-white py-2 rounded-md tracking-wide font-bold focus:outline-none focus:shadow-outline bg-gradient-to-tl from-supporting-red-600 to-supporting-red-400 bg-size-200 bg-pos-0 hover:bg-pos-100 transition-all duration-500" + ) %> + <% end %> +
+ +
diff --git a/lib/claper_web/live/event_live/embed_component.ex b/lib/claper_web/live/event_live/embed_component.ex new file mode 100644 index 00000000..fc16a65a --- /dev/null +++ b/lib/claper_web/live/event_live/embed_component.ex @@ -0,0 +1,84 @@ +defmodule ClaperWeb.EventLive.EmbedComponent do + use ClaperWeb, :live_component + + @impl true + def render(assigns) do + ~H""" +
+ +
+
+
+ + + +
+ +

<%= gettext("Current embed") %>

+

<%= @embed.title %>

+
+
+ <%= raw(@embed.content) %> +
+
+
+ """ + end + + def toggle_embed(js \\ %JS{}) do + js + |> JS.toggle( + out: "animate__animated animate__zoomOut", + in: "animate__animated animate__zoomIn", + to: "#collapsed-embed", + time: 50 + ) + |> JS.toggle( + out: "animate__animated animate__zoomOut", + in: "animate__animated animate__zoomIn", + to: "#extended-embed" + ) + end +end diff --git a/lib/claper_web/live/event_live/manage.ex b/lib/claper_web/live/event_live/manage.ex index 0cec26ae..c441e0a8 100644 --- a/lib/claper_web/live/event_live/manage.ex +++ b/lib/claper_web/live/event_live/manage.ex @@ -4,6 +4,7 @@ defmodule ClaperWeb.EventLive.Manage do alias ClaperWeb.Presence alias Claper.Polls alias Claper.Forms + alias Claper.Embeds @impl true def mount(%{"code" => code}, session, socket) do @@ -43,6 +44,7 @@ defmodule ClaperWeb.EventLive.Manage do |> assign(:posts, list_posts(socket, event.uuid)) |> assign(:polls, list_polls(socket, event.presentation_file.id)) |> assign(:forms, list_forms(socket, event.presentation_file.id)) + |> assign(:embeds, list_embeds(socket, event.presentation_file.id)) |> assign(:create, nil) |> assign(:list_tab, :posts) |> assign(:create_action, :new) @@ -52,6 +54,7 @@ defmodule ClaperWeb.EventLive.Manage do }) |> poll_at_position(false) |> form_at_position(false) + |> embed_at_position(false) {:ok, socket, temporary_assigns: [posts: [], form_submits: []]} end @@ -128,6 +131,21 @@ defmodule ClaperWeb.EventLive.Manage do {:noreply, socket |> assign(:current_poll, poll)} end + @impl true + def handle_info({:embed_updated, embed}, socket) do + {:noreply, + socket + |> update(:current_embed, fn _current_embed -> embed end)} + end + + @impl true + def handle_info( + {:current_embed, embed}, + socket + ) do + {:noreply, socket |> assign(:current_embed, embed)} + end + @impl true def handle_info(_, socket) do {:noreply, socket} @@ -159,7 +177,8 @@ defmodule ClaperWeb.EventLive.Manage do socket |> assign(:state, new_state) |> poll_at_position - |> form_at_position} + |> form_at_position + |> embed_at_position} end @impl true @@ -185,13 +204,15 @@ defmodule ClaperWeb.EventLive.Manage do end end - def handle_event("poll-set-default", %{"id" => id}, socket) do + def handle_event("poll-set-active", %{"id" => id}, socket) do Forms.disable_all(socket.assigns.event.presentation_file.id, socket.assigns.state.position) + Embeds.disable_all(socket.assigns.event.presentation_file.id, socket.assigns.state.position) - Polls.set_default( + Polls.set_status( id, socket.assigns.event.presentation_file.id, - socket.assigns.state.position + socket.assigns.state.position, + true ) poll = Polls.get_poll!(id) @@ -208,19 +229,28 @@ defmodule ClaperWeb.EventLive.Manage do {:current_form, nil} ) + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_embed, nil} + ) + {:noreply, socket |> assign(:polls, list_polls(socket, socket.assigns.event.presentation_file.id)) - |> assign(:forms, list_forms(socket, socket.assigns.event.presentation_file.id))} + |> assign(:forms, list_forms(socket, socket.assigns.event.presentation_file.id)) + |> assign(:embeds, list_embeds(socket, socket.assigns.event.presentation_file.id))} end - def handle_event("form-set-default", %{"id" => id}, socket) do + def handle_event("form-set-active", %{"id" => id}, socket) do Polls.disable_all(socket.assigns.event.presentation_file.id, socket.assigns.state.position) + Embeds.disable_all(socket.assigns.event.presentation_file.id, socket.assigns.state.position) - Forms.set_default( + Forms.set_status( id, socket.assigns.event.presentation_file.id, - socket.assigns.state.position + socket.assigns.state.position, + true ) form = Forms.get_form!(id) @@ -237,12 +267,114 @@ defmodule ClaperWeb.EventLive.Manage do {:current_poll, nil} ) + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_embed, nil} + ) + + {:noreply, + socket + |> assign(:polls, list_polls(socket, socket.assigns.event.presentation_file.id)) + |> assign(:forms, list_forms(socket, socket.assigns.event.presentation_file.id)) + |> assign(:embeds, list_embeds(socket, socket.assigns.event.presentation_file.id))} + end + + def handle_event("embed-set-active", %{"id" => id}, socket) do + Polls.disable_all(socket.assigns.event.presentation_file.id, socket.assigns.state.position) + Forms.disable_all(socket.assigns.event.presentation_file.id, socket.assigns.state.position) + + Embeds.set_status( + id, + socket.assigns.event.presentation_file.id, + socket.assigns.state.position, + true + ) + + embed = Embeds.get_embed!(id) + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_embed, embed} + ) + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_poll, nil} + ) + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_form, nil} + ) + {:noreply, socket |> assign(:polls, list_polls(socket, socket.assigns.event.presentation_file.id)) + |> assign(:forms, list_forms(socket, socket.assigns.event.presentation_file.id)) + |> assign(:embeds, list_embeds(socket, socket.assigns.event.presentation_file.id))} + end + + def handle_event("poll-set-inactive", %{"id" => id}, socket) do + Polls.set_status( + id, + socket.assigns.event.presentation_file.id, + socket.assigns.state.position, + false + ) + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_poll, nil} + ) + + {:noreply, + socket + |> assign(:polls, list_polls(socket, socket.assigns.event.presentation_file.id))} + end + + def handle_event("form-set-inactive", %{"id" => id}, socket) do + Forms.set_status( + id, + socket.assigns.event.presentation_file.id, + socket.assigns.state.position, + false + ) + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_form, nil} + ) + + {:noreply, + socket |> assign(:forms, list_forms(socket, socket.assigns.event.presentation_file.id))} end + def handle_event("embed-set-inactive", %{"id" => id}, socket) do + Embeds.set_status( + id, + socket.assigns.event.presentation_file.id, + socket.assigns.state.position, + false + ) + + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{socket.assigns.event.uuid}", + {:current_embed, nil} + ) + + {:noreply, + socket + |> assign(:embeds, list_embeds(socket, socket.assigns.event.presentation_file.id))} + end + @impl true def handle_event( "ban", @@ -459,6 +591,12 @@ defmodule ClaperWeb.EventLive.Manage do }) end + defp apply_action(socket, :add_embed, _params) do + socket + |> assign(:create, "embed") + |> assign(:embed, %Embeds.Embed{}) + end + defp apply_action(socket, :import, _params) do socket |> assign(:create, "import") @@ -474,6 +612,15 @@ defmodule ClaperWeb.EventLive.Manage do |> assign(:form, form) end + defp apply_action(socket, :edit_embed, %{"id" => id}) do + embed = Embeds.get_embed!(id) + + socket + |> assign(:create, "embed") + |> assign(:create_action, :edit) + |> assign(:embed, embed) + end + defp poll_at_position( %{assigns: %{event: event, state: state}} = socket, broadcast \\ true @@ -516,6 +663,27 @@ defmodule ClaperWeb.EventLive.Manage do end end + defp embed_at_position( + %{assigns: %{event: event, state: state}} = socket, + broadcast \\ true + ) do + with embed <- + Claper.Embeds.get_embed_current_position( + event.presentation_file.id, + state.position + ) do + if broadcast do + Phoenix.PubSub.broadcast( + Claper.PubSub, + "event:#{event.uuid}", + {:current_embed, embed} + ) + end + + socket |> assign(:current_embed, embed) + end + end + defp ban(user, %{assigns: %{event: event, state: state}} = socket) do {:ok, new_state} = Claper.Presentations.update_presentation_state(state, %{ @@ -543,6 +711,10 @@ defmodule ClaperWeb.EventLive.Manage do Claper.Forms.list_forms(presentation_file_id) end + defp list_embeds(_socket, presentation_file_id) do + Claper.Embeds.list_embeds(presentation_file_id) + end + defp list_form_submits(_socket, presentation_file_id) do Claper.Forms.list_form_submits(presentation_file_id) end diff --git a/lib/claper_web/live/event_live/manage.html.heex b/lib/claper_web/live/event_live/manage.html.heex index 0e959190..3101bd09 100644 --- a/lib/claper_web/live/event_live/manage.html.heex +++ b/lib/claper_web/live/event_live/manage.html.heex @@ -215,6 +215,37 @@ +
  • + +
    + + + +
    +
    +

    <%= gettext("Embeded") %>

    +

    + <%= gettext("Add a Youtube video or any web content.") %> +

    +
    +
    +
  • <%= if (length @polls) == 0 && (length @forms) == 0 do %> @@ -290,6 +321,27 @@ <% end %> + <%= if @create == "embed" do %> +
    +

    + <%= case @create_action do + :new -> gettext("New Embed") + :edit -> gettext("Edit Embed") + end %> +

    + <.live_component + module={ClaperWeb.EmbedLive.FormComponent} + id="embed-create" + event_uuid={@event.uuid} + presentation_file={@event.presentation_file} + embed={@embed} + live_action={@create_action} + position={@state.position} + return_to={Routes.event_manage_path(@socket, :show, @event.code)} + /> +
    + <% end %> + <%= if @create == "import" do %>

    <%= gettext("Select presentation") %>

    @@ -396,7 +448,11 @@ <%= if @state.position == index do %> <%= if poll.enabled do %> - + <% else %> <% else %>
    <% end %> + <%= for embed<- Enum.filter(@embeds, fn embed -> embed.position == index end) do %> +
    +
    + + + +
    +
    + + <%= gettext "Embed" %>: <%= embed.title %> + + <%= if @state.position == index do %> + <%= if embed.enabled do %> + + <% else %> + + <% end %> + + + + + + <% end %> +
    +
    +
    + <% end %> <%= if @state.position == index do %> @@ -773,7 +909,7 @@ <%= gettext("Show instructions") %>(Q) @@ -782,7 +918,7 @@ <%= gettext("Show messages") %>(W) @@ -792,7 +928,7 @@ key={:poll_visible} disabled={!@current_poll} checked={@state.poll_visible} - shortcut="E" + shortcut={if @create == nil, do: "E", else: nil} /> <%= gettext("Show poll results") %>(E) @@ -805,7 +941,7 @@ <%= gettext("Enable messages") %>(A) @@ -814,7 +950,7 @@ <%= gettext("Enable anonymous messages") %>(S) diff --git a/lib/claper_web/live/event_live/presenter.ex b/lib/claper_web/live/event_live/presenter.ex index d60ce577..3a9f4b6d 100644 --- a/lib/claper_web/live/event_live/presenter.ex +++ b/lib/claper_web/live/event_live/presenter.ex @@ -49,6 +49,7 @@ defmodule ClaperWeb.EventLive.Presenter do |> assign(:reacts, []) |> poll_at_position |> form_at_position + |> embed_at_position {:ok, socket, temporary_assigns: [posts: []]} end @@ -80,7 +81,8 @@ defmodule ClaperWeb.EventLive.Presenter do |> assign(:state, state) |> push_event("page", %{current_page: state.position}) |> push_event("reset-global-react", %{}) - |> poll_at_position} + |> poll_at_position + |> embed_at_position} end @impl true @@ -105,9 +107,15 @@ defmodule ClaperWeb.EventLive.Presenter do @impl true def handle_info({:poll_updated, poll}, socket) do - {:noreply, - socket - |> update(:current_poll, fn _current_poll -> poll end)} + if poll.enabled do + {:noreply, + socket + |> update(:current_poll, fn _current_poll -> poll end)} + else + {:noreply, + socket + |> update(:current_poll, fn _current_poll -> nil end)} + end end @impl true @@ -119,9 +127,15 @@ defmodule ClaperWeb.EventLive.Presenter do @impl true def handle_info({:form_updated, form}, socket) do - {:noreply, - socket - |> update(:current_form, fn _current_form -> form end)} + if form.active do + {:noreply, + socket + |> update(:current_form, fn _current_form -> form end)} + else + {:noreply, + socket + |> update(:current_form, fn _current_form -> nil end)} + end end @impl true @@ -131,6 +145,26 @@ defmodule ClaperWeb.EventLive.Presenter do |> update(:current_form, fn _current_form -> nil end)} end + @impl true + def handle_info({:embed_updated, embed}, socket) do + if embed.active do + {:noreply, + socket + |> update(:current_embed, fn _current_embed -> embed end)} + else + {:noreply, + socket + |> update(:current_embed, fn _current_embed -> nil end)} + end + end + + @impl true + def handle_info({:embed_deleted, _embed}, socket) do + {:noreply, + socket + |> update(:current_embed, fn _current_embed -> nil end)} + end + @impl true def handle_info({:chat_visible, value}, socket) do {:noreply, @@ -178,6 +212,14 @@ defmodule ClaperWeb.EventLive.Presenter do {:noreply, socket |> assign(:current_form, form)} end + @impl true + def handle_info( + {:current_embed, embed}, + socket + ) do + {:noreply, socket |> assign(:current_embed, embed)} + end + @impl true def handle_info(_, socket) do {:noreply, socket} @@ -212,6 +254,16 @@ defmodule ClaperWeb.EventLive.Presenter do end end + defp embed_at_position(%{assigns: %{event: event, state: state}} = socket) do + with embed <- + Claper.Embeds.get_embed_current_position( + event.presentation_file.id, + state.position + ) do + socket |> assign(:current_embed, embed) + end + end + defp list_posts(_socket, event_id) do Claper.Posts.list_posts(event_id, [:event, :reactions]) end diff --git a/lib/claper_web/live/event_live/presenter.html.heex b/lib/claper_web/live/event_live/presenter.html.heex index 139de44c..a6521279 100644 --- a/lib/claper_web/live/event_live/presenter.html.heex +++ b/lib/claper_web/live/event_live/presenter.html.heex @@ -1,7 +1,12 @@
    @@ -68,6 +73,15 @@
    <% end %> + <%= if @current_embed do %> + +
    + <%= raw(@current_embed.content) %> +
    + <% end %>
    starting_soon_assigns(event) |> get_current_poll(event) |> get_current_form(event) + |> get_current_embed(event) |> check_leader(event) |> leader_list(event) @@ -245,6 +246,14 @@ defmodule ClaperWeb.EventLive.Show do end end + @impl true + def handle_info( + {:current_embed, embed}, + socket + ) do + {:noreply, socket |> assign(:current_embed, embed)} + end + @impl true def handle_info({:post_updated, post}, socket) do {:noreply, socket |> update(:posts, fn posts -> [post | posts] end)} @@ -267,9 +276,15 @@ defmodule ClaperWeb.EventLive.Show do @impl true def handle_info({:poll_updated, poll}, socket) do - {:noreply, - socket - |> update(:current_poll, fn _current_poll -> poll end)} + if poll.enabled do + {:noreply, + socket + |> update(:current_poll, fn _current_poll -> poll end)} + else + {:noreply, + socket + |> update(:current_poll, fn _current_poll -> nil end)} + end end @impl true @@ -281,9 +296,15 @@ defmodule ClaperWeb.EventLive.Show do @impl true def handle_info({:form_updated, form}, socket) do - {:noreply, - socket - |> update(:current_form, fn _current_form -> form end)} + if form.enabled do + {:noreply, + socket + |> update(:current_form, fn _current_form -> form end)} + else + {:noreply, + socket + |> update(:current_form, fn _current_form -> nil end)} + end end @impl true @@ -293,6 +314,26 @@ defmodule ClaperWeb.EventLive.Show do |> update(:current_form, fn _current_form -> nil end)} end + @impl true + def handle_info({:embed_updated, embed}, socket) do + if embed.enabled do + {:noreply, + socket + |> update(:current_embed, fn _current_embed -> embed end)} + else + {:noreply, + socket + |> update(:current_embed, fn _current_embed -> nil end)} + end + end + + @impl true + def handle_info({:embed_deleted, _embed}, socket) do + {:noreply, + socket + |> update(:current_embed, fn _current_embed -> nil end)} + end + @impl true def handle_info({:react, type}, socket) do {:noreply, @@ -647,6 +688,16 @@ defmodule ClaperWeb.EventLive.Show do end end + defp get_current_embed(socket, event) do + with embed <- + Embeds.get_embed_current_position( + event.presentation_file.id, + event.presentation_file.presentation_state.position + ) do + socket |> assign(:current_embed, embed) + end + end + defp get_current_vote(%{assigns: %{current_user: current_user}} = socket, poll_id) when is_map(current_user) do vote = Polls.get_poll_vote(current_user.id, poll_id) diff --git a/lib/claper_web/live/event_live/show.html.heex b/lib/claper_web/live/event_live/show.html.heex index e7864c5a..e7d4aa86 100644 --- a/lib/claper_web/live/event_live/show.html.heex +++ b/lib/claper_web/live/event_live/show.html.heex @@ -88,6 +88,24 @@
    <% end %> + <%= if @current_embed != nil and @current_embed.attendee_visibility == true do %> +
    +
    + <.live_component + module={ClaperWeb.EventLive.EmbedComponent} + id={"#{@current_embed.id}-embed"} + embed={@current_embed} + current_user={@current_user} + attendee_identifier={@attendee_identifier} + event={@event} + /> +
    +
    + <% end %> +
    <% end %> + <%= for embed <- Enum.filter(@event.presentation_file.embeds , fn e -> e.position == position end) do %> + + <%= gettext("Embed") %>: <%= embed.title %> + +
    +
    + <%= raw(embed.content) %> +
    +
    + <% end %> + <% posts = Enum.filter(@posts, fn p -> p.position == position end) %> Messages diff --git a/lib/claper_web/router.ex b/lib/claper_web/router.ex index 323583bd..8cf4663b 100644 --- a/lib/claper_web/router.ex +++ b/lib/claper_web/router.ex @@ -68,6 +68,8 @@ defmodule ClaperWeb.Router do live("/e/:code/manage/add/form", EventLive.Manage, :add_form) live("/e/:code/manage/import", EventLive.Manage, :import) live("/e/:code/manage/edit/form/:id", EventLive.Manage, :edit_form) + live("/e/:code/manage/add/embed", EventLive.Manage, :add_embed) + live("/e/:code/manage/edit/embed/:id", EventLive.Manage, :edit_embed) end end diff --git a/lib/claper_web/views/components/input_component.ex b/lib/claper_web/views/components/input_component.ex index 12a0e8aa..864a5d14 100644 --- a/lib/claper_web/views/components/input_component.ex +++ b/lib/claper_web/views/components/input_component.ex @@ -37,6 +37,39 @@ defmodule ClaperWeb.Component.Input do """ end + def textarea(assigns) do + assigns = + assigns + |> assign_new(:required, fn -> false end) + |> assign_new(:autofocus, fn -> false end) + |> assign_new(:placeholder, fn -> false end) + |> assign_new(:readonly, fn -> false end) + |> assign_new(:labelClass, fn -> "text-gray-700" end) + |> assign_new(:fieldClass, fn -> "bg-white" end) + |> assign_new(:value, fn -> input_value(assigns.form, assigns.key) end) + + ~H""" +
    + <%= label(@form, @key, @name, class: "block text-sm font-medium #{@labelClass}") %> +
    + <%= text_input(@form, @key, + required: @required, + readonly: @readonly, + autofocus: @autofocus, + placeholder: @placeholder, + autocomplete: @key, + value: @value, + class: + "#{@fieldClass} read-only:opacity-50 outline-none shadow-base focus:ring-primary-500 focus:border-primary-500 focus:ring-2 block w-full text-lg border-gray-300 rounded-md py-4 px-3" + ) %> +
    + <%= if Keyword.has_key?(@form.errors, @key) do %> +

    <%= error_tag(@form, @key) %>

    + <% end %> +
    + """ + end + def select(assigns) do assigns = assigns diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index 940f2fe3..f59f3f4e 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -15,7 +15,7 @@ msgstr "" msgid "Settings" msgstr "Einstellungen" -#: lib/claper_web/live/event_live/manage.ex:457 +#: lib/claper_web/live/event_live/manage.ex:529 #: lib/claper_web/live/form_live/form_component.html.heex:37 #: lib/claper_web/live/user_settings_live/show.html.heex:34 #: lib/claper_web/templates/user_registration/new.html.heex:34 @@ -78,22 +78,22 @@ msgstr "Wir haben Ihnen eine E-Mail geschickt an" msgid "Your personal informations only visible by you" msgstr "Ihre persönlichen Informationen sind nur für Sie sichtbar" -#: lib/claper_web/live/event_live/show.html.heex:387 +#: lib/claper_web/live/event_live/show.html.heex:405 #, elixir-autogen, elixir-format msgid "days" msgstr "Tage" -#: lib/claper_web/live/event_live/show.html.heex:393 +#: lib/claper_web/live/event_live/show.html.heex:411 #, elixir-autogen, elixir-format msgid "hours" msgstr "Stunden" -#: lib/claper_web/live/event_live/show.html.heex:399 +#: lib/claper_web/live/event_live/show.html.heex:417 #, elixir-autogen, elixir-format msgid "minutes" msgstr "Minuten" -#: lib/claper_web/live/event_live/show.html.heex:118 +#: lib/claper_web/live/event_live/show.html.heex:136 #, elixir-autogen, elixir-format msgid "Be the first to react !" msgstr "Seien Sie der Erste, der reagiert!" @@ -101,7 +101,7 @@ msgstr "Seien Sie der Erste, der reagiert!" #: lib/claper_web/live/event_live/event_card_component.ex:98 #: lib/claper_web/live/event_live/join.ex:42 #: lib/claper_web/live/event_live/join.html.heex:106 -#: lib/claper_web/live/event_live/show.html.heex:239 +#: lib/claper_web/live/event_live/show.html.heex:257 #, elixir-autogen, elixir-format msgid "Join" msgstr "Teilnehmen" @@ -119,7 +119,7 @@ msgstr "Dashboard" msgid "Host" msgstr "Host" -#: lib/claper_web/live/event_live/show.html.heex:405 +#: lib/claper_web/live/event_live/show.html.heex:423 #, elixir-autogen, elixir-format msgid "seconds" msgstr "Sekunden" @@ -171,7 +171,7 @@ msgid "Name of your presentation" msgstr "Name Ihrer Präsentation" #: lib/claper_web/live/event_live/presenter.html.heex:21 -#: lib/claper_web/live/event_live/show.html.heex:414 +#: lib/claper_web/live/event_live/show.html.heex:432 #, elixir-autogen, elixir-format msgid "Scan to interact in real-time" msgstr "Scannen und in Echtzeit interagieren" @@ -213,7 +213,7 @@ msgstr "Zurück zur Startseite" msgid "Created successfully" msgstr "Erfolgreich erstellt" -#: lib/claper_web/live/event_live/manage.ex:23 +#: lib/claper_web/live/event_live/manage.ex:24 #: lib/claper_web/live/event_live/presenter.ex:21 #: lib/claper_web/live/event_live/show.ex:24 #, elixir-autogen, elixir-format @@ -228,6 +228,7 @@ msgstr "Präsentation existiert nicht" msgid "Edit" msgstr "Ändern" +#: lib/claper_web/live/embed_live/form_component.html.heex:38 #: lib/claper_web/live/event_live/event_form_component.html.heex:18 #: lib/claper_web/live/event_live/event_form_component.html.heex:25 #: lib/claper_web/live/event_live/index.ex:71 @@ -238,10 +239,11 @@ msgstr "Ändern" msgid "Create" msgstr "Erstellen" +#: lib/claper_web/live/embed_live/form_component.html.heex:43 #: lib/claper_web/live/event_live/event_card_component.ex:171 #: lib/claper_web/live/event_live/event_form_component.html.heex:30 -#: lib/claper_web/live/event_live/manage.html.heex:631 -#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:755 +#: lib/claper_web/live/event_live/manage.html.heex:855 #: lib/claper_web/live/event_live/post_component.ex:44 #: lib/claper_web/live/event_live/post_component.ex:116 #: lib/claper_web/live/form_live/form_component.html.heex:103 @@ -250,6 +252,7 @@ msgstr "Erstellen" msgid "Delete" msgstr "Löschen" +#: lib/claper_web/live/embed_live/form_component.html.heex:39 #: lib/claper_web/live/event_live/event_form_component.html.heex:17 #: lib/claper_web/live/event_live/event_form_component.html.heex:24 #: lib/claper_web/live/form_live/form_component.html.heex:99 @@ -373,12 +376,12 @@ msgstr "Datei ändern" msgid "Presentation replaced" msgstr "Präsentation ersetzt" -#: lib/claper_web/live/event_live/manage.html.heex:256 +#: lib/claper_web/live/event_live/manage.html.heex:287 #, elixir-autogen, elixir-format msgid "Edit poll" msgstr "Umfrage bearbeiten" -#: lib/claper_web/live/event_live/manage.html.heex:255 +#: lib/claper_web/live/event_live/manage.html.heex:286 #, elixir-autogen, elixir-format msgid "New poll" msgstr "Neue Umfrage" @@ -399,7 +402,7 @@ msgid "Add poll to know opinion of your public." msgstr "Fügen Sie eine Umfrage hinzu, um die Meinung Ihres Publikums zu erfahren." #: lib/claper_web/live/event_live/manage.html.heex:174 -#: lib/claper_web/live/event_live/manage.html.heex:395 +#: lib/claper_web/live/event_live/manage.html.heex:447 #, elixir-autogen, elixir-format msgid "Poll" msgstr "Umfrage" @@ -443,8 +446,9 @@ msgstr "Benutzer Email-Adresse" msgid "Present/Customize" msgstr "Vorstellen/Ändern" -#: lib/claper_web/live/event_live/manage.html.heex:408 -#: lib/claper_web/live/event_live/manage.html.heex:484 +#: lib/claper_web/live/event_live/manage.html.heex:460 +#: lib/claper_web/live/event_live/manage.html.heex:536 +#: lib/claper_web/live/event_live/manage.html.heex:606 #, elixir-autogen, elixir-format msgid "Active" msgstr "Aktiv" @@ -454,12 +458,12 @@ msgstr "Aktiv" msgid "Changing your file will remove all interaction elements like polls associated." msgstr "Wenn Sie Ihre Datei ändern, werden alle damit verbundenen Interaktionselemente wie Umfragen entfernt." -#: lib/claper_web/live/event_live/manage.html.heex:584 +#: lib/claper_web/live/event_live/manage.html.heex:708 #, elixir-autogen, elixir-format msgid "Messages from attendees will appear here." msgstr "Nachrichten von Teilnehmern werden hier erscheinen." -#: lib/claper_web/live/event_live/manage.html.heex:770 +#: lib/claper_web/live/event_live/manage.html.heex:894 #, elixir-autogen, elixir-format msgid "On screen settings" msgstr "Bildschirmeinstellungen" @@ -484,19 +488,20 @@ msgstr "Start" msgid "Press F in the presentation window to enable fullscreen" msgstr "Drücken Sie F im Präsentationsfenster, um den Vollbildmodus zu aktivieren" -#: lib/claper_web/live/event_live/show.html.heex:298 +#: lib/claper_web/live/event_live/show.html.heex:316 #, elixir-autogen, elixir-format msgid "Ask, comment..." msgstr "Fragen, kommentieren..." -#: lib/claper_web/live/event_live/manage.html.heex:556 +#: lib/claper_web/live/event_live/manage.html.heex:680 #: lib/claper_web/live/stat_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Messages" msgstr "Nachrichten" -#: lib/claper_web/live/event_live/manage.html.heex:416 -#: lib/claper_web/live/event_live/manage.html.heex:492 +#: lib/claper_web/live/event_live/manage.html.heex:468 +#: lib/claper_web/live/event_live/manage.html.heex:544 +#: lib/claper_web/live/event_live/manage.html.heex:614 #, elixir-autogen, elixir-format msgid "Set active" msgstr "Aktivieren" @@ -532,26 +537,26 @@ msgstr "Wenn Sie Probleme mit der obigen Schaltfläche haben, kopieren Sie die f msgid "You can change your email by visiting the URL below" msgstr "Sie können Ihre E-Mail-Adresse ändern, indem Sie die folgende URL aufrufen" -#: lib/claper_web/live/event_live/manage.html.heex:525 +#: lib/claper_web/live/event_live/manage.html.heex:649 #, elixir-autogen, elixir-format msgid "Add interaction" msgstr "Interaktion hinzufügen" -#: lib/claper_web/live/event_live/manage.html.heex:607 -#: lib/claper_web/live/event_live/manage.html.heex:622 +#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:746 #, elixir-autogen, elixir-format msgid "Blocking this user will delete all his messages and he will not be able to join again, confirm ?" msgstr "Wenn Sie diesen Benutzer sperren, werden alle seine Nachrichten gelöscht, und er kann nicht mehr beitreten. Bestätigen?" #: lib/claper_web/live/event_live/show.ex:50 -#: lib/claper_web/live/event_live/show.ex:197 -#: lib/claper_web/live/event_live/show.ex:212 +#: lib/claper_web/live/event_live/show.ex:198 +#: lib/claper_web/live/event_live/show.ex:213 #, elixir-autogen, elixir-format msgid "You have been banned from this event" msgstr "Sie wurden von dieser Veranstaltung ausgeschlossen" -#: lib/claper_web/live/event_live/manage.html.heex:601 -#: lib/claper_web/live/event_live/manage.html.heex:616 +#: lib/claper_web/live/event_live/manage.html.heex:725 +#: lib/claper_web/live/event_live/manage.html.heex:740 #, elixir-autogen, elixir-format msgid "Ban" msgstr "Ban" @@ -645,7 +650,7 @@ msgstr "Veranstaltung" msgid "Interactions history" msgstr "Interaktionsgeschichte" -#: lib/claper_web/live/stat_live/index.html.heex:260 +#: lib/claper_web/live/stat_live/index.html.heex:271 #, elixir-autogen, elixir-format msgid "No messages has been sent" msgstr "Es wurden keine Nachrichten gesendet" @@ -705,7 +710,7 @@ msgstr "Anmeldung" msgid "Connect to your account" msgstr "Verbinden Sie sich mit Ihrem Konto" -#: lib/claper_web/live/event_live/show.html.heex:423 +#: lib/claper_web/live/event_live/show.html.heex:441 #, elixir-autogen, elixir-format msgid "Or use the code:" msgstr "Oder verwenden Sie den Code:" @@ -776,34 +781,34 @@ msgstr "Fügen Sie ein Formular hinzu, um Daten von Ihrem Publikum zu sammeln." msgid "Current form" msgstr "Aktuelles Formular" -#: lib/claper_web/live/event_live/manage.html.heex:277 +#: lib/claper_web/live/event_live/manage.html.heex:308 #, elixir-autogen, elixir-format msgid "Edit form" msgstr "Formular bearbeiten" #: lib/claper_web/live/event_live/manage.html.heex:211 -#: lib/claper_web/live/event_live/manage.html.heex:471 +#: lib/claper_web/live/event_live/manage.html.heex:523 #: lib/claper_web/live/stat_live/index.html.heex:215 #, elixir-autogen, elixir-format msgid "Form" msgstr "Formular" -#: lib/claper_web/live/event_live/manage.html.heex:559 +#: lib/claper_web/live/event_live/manage.html.heex:683 #, elixir-autogen, elixir-format msgid "Form submissions" msgstr "Abgeschickte Formulare" -#: lib/claper_web/live/event_live/manage.html.heex:711 +#: lib/claper_web/live/event_live/manage.html.heex:835 #, elixir-autogen, elixir-format msgid "Form submissions from attendees will appear here." msgstr "Formulareinsendungen der Teilnehmer werden hier angezeigt." -#: lib/claper_web/live/event_live/manage.ex:456 +#: lib/claper_web/live/event_live/manage.ex:528 #, elixir-autogen, elixir-format msgid "Name" msgstr "Name" -#: lib/claper_web/live/event_live/manage.html.heex:276 +#: lib/claper_web/live/event_live/manage.html.heex:307 #, elixir-autogen, elixir-format msgid "New form" msgstr "Neues Formular" @@ -828,7 +833,7 @@ msgstr "Abschicken" msgid "Text" msgstr "Text" -#: lib/claper_web/live/event_live/manage.html.heex:736 +#: lib/claper_web/live/event_live/manage.html.heex:860 #, elixir-autogen, elixir-format msgid "This cannot be undone, confirm ?" msgstr "Dies kann nicht rückgängig gemacht werden. Bestätigen?" @@ -868,22 +873,22 @@ msgstr "Wählen Sie eine oder mehrere Optionen aus" msgid "Multiple answers" msgstr "Mehrere Antworten" -#: lib/claper_web/live/event_live/manage.html.heex:244 +#: lib/claper_web/live/event_live/manage.html.heex:275 #, elixir-autogen, elixir-format msgid "Import all interactions from another presentation" msgstr "Importieren Sie alle Interaktionen aus einer anderen Präsentation" -#: lib/claper_web/live/event_live/manage.ex:183 +#: lib/claper_web/live/event_live/manage.ex:202 #, elixir-autogen, elixir-format msgid "Interactions import failed" msgstr "Der Import der Interaktionen ist fehlgeschlagen" -#: lib/claper_web/live/event_live/manage.ex:176 +#: lib/claper_web/live/event_live/manage.ex:195 #, elixir-autogen, elixir-format msgid "Interactions imported successfully" msgstr "Interaktionen erfolgreich importiert" -#: lib/claper_web/live/event_live/manage.html.heex:295 +#: lib/claper_web/live/event_live/manage.html.heex:347 #, elixir-autogen, elixir-format msgid "Select presentation" msgstr "Präsentation auswählen" @@ -893,55 +898,55 @@ msgstr "Präsentation auswählen" msgid "PDF, PPT, PPTX up to %{size} MB" msgstr "PDF, PPT, PPTX bis zu %{size} MB" -#: lib/claper_web/live/event_live/manage.html.heex:796 +#: lib/claper_web/live/event_live/manage.html.heex:920 #, elixir-autogen, elixir-format msgid "Attendees settings" msgstr "Teilnehmereinstellungen" -#: lib/claper_web/live/event_live/manage.html.heex:800 +#: lib/claper_web/live/event_live/manage.html.heex:924 #, elixir-autogen, elixir-format msgid "Enable messages" msgstr "Nachrichten aktivieren" -#: lib/claper_web/live/event_live/manage.html.heex:777 +#: lib/claper_web/live/event_live/manage.html.heex:901 #, elixir-autogen, elixir-format msgid "Show instructions" msgstr "Anleitung anzeigen" -#: lib/claper_web/live/event_live/manage.html.heex:782 +#: lib/claper_web/live/event_live/manage.html.heex:906 #, elixir-autogen, elixir-format msgid "Show messages" msgstr "Nachrichten anzeigen" -#: lib/claper_web/live/event_live/manage.html.heex:791 +#: lib/claper_web/live/event_live/manage.html.heex:915 #, elixir-autogen, elixir-format msgid "Show poll results" msgstr "Umfrageergebnisse anzeigen" -#: lib/claper_web/live/event_live/show.html.heex:318 +#: lib/claper_web/live/event_live/show.html.heex:336 #, elixir-autogen, elixir-format msgid "Messages deactivated" msgstr "Nachrichten deaktiviert" -#: lib/claper_web/live/event_live/show.html.heex:161 -#: lib/claper_web/live/event_live/show.html.heex:182 -#: lib/claper_web/live/event_live/show.html.heex:282 +#: lib/claper_web/live/event_live/show.html.heex:179 +#: lib/claper_web/live/event_live/show.html.heex:200 +#: lib/claper_web/live/event_live/show.html.heex:300 #, elixir-autogen, elixir-format msgid "Anonymous" msgstr "Anonymous" -#: lib/claper_web/live/event_live/show.html.heex:208 +#: lib/claper_web/live/event_live/show.html.heex:226 #, elixir-autogen, elixir-format msgid "Close" msgstr "Schließen" -#: lib/claper_web/live/event_live/manage.html.heex:808 +#: lib/claper_web/live/event_live/manage.html.heex:932 #, elixir-autogen, elixir-format, fuzzy msgid "Enable anonymous messages" msgstr "Anonyme Nachrichten aktivieren" -#: lib/claper_web/live/event_live/show.html.heex:189 -#: lib/claper_web/live/event_live/show.html.heex:234 +#: lib/claper_web/live/event_live/show.html.heex:207 +#: lib/claper_web/live/event_live/show.html.heex:252 #, elixir-autogen, elixir-format, fuzzy msgid "Enter your name" msgstr "Benutze deinen Namen" @@ -951,12 +956,12 @@ msgstr "Benutze deinen Namen" msgid "Or go to %{url} and use the code:" msgstr "Oder gehen Sie zu %{url} und verwenden Sie den Code:" -#: lib/claper_web/live/event_live/show.html.heex:202 +#: lib/claper_web/live/event_live/show.html.heex:220 #, elixir-autogen, elixir-format msgid "Use your name" msgstr "Benutze deinen Namen" -#: lib/claper_web/live/event_live/show.html.heex:182 +#: lib/claper_web/live/event_live/show.html.heex:200 #, elixir-autogen, elixir-format msgid "disabled" msgstr "deaktiviert" @@ -966,6 +971,57 @@ msgstr "deaktiviert" msgid "Account creation is disabled" msgstr "Kontoerstellung ist deaktiviert" +#: lib/claper_web/live/event_live/manage.html.heex:244 +#, elixir-autogen, elixir-format +msgid "Add a Youtube video or any web content." +msgstr "Fügen Sie ein YouTube-Video oder einen beliebigen Webinhalt hinzu." + +#: lib/claper_web/live/embed_live/form_component.html.heex:23 +#, elixir-autogen, elixir-format +msgid "Content of your embed" +msgstr "Inhalt Ihrer Einbettung" + +#: lib/claper_web/live/event_live/embed_component.ex:59 +#, elixir-autogen, elixir-format, fuzzy +msgid "Current embed" +msgstr "Aktuelle Einbettung" + +#: lib/claper_web/live/event_live/manage.html.heex:329 +#, elixir-autogen, elixir-format +msgid "Edit Embed" +msgstr "Einbetten bearbeiten" + +#: lib/claper_web/live/event_live/manage.html.heex:593 +#: lib/claper_web/live/stat_live/index.html.heex:257 +#, elixir-autogen, elixir-format +msgid "Embed" +msgstr "Einbetten" + +#: lib/claper_web/live/event_live/manage.html.heex:242 +#, elixir-autogen, elixir-format +msgid "Embeded" +msgstr "Eingebettet" + +#: lib/claper_web/live/event_live/manage.html.heex:328 +#, elixir-autogen, elixir-format +msgid "New Embed" +msgstr "Neue Einbettung" + +#: lib/claper_web/live/event_live/embed_component.ex:36 +#, elixir-autogen, elixir-format, fuzzy +msgid "See current embed" +msgstr "Siehe aktuelle Einbettung" + +#: lib/claper_web/live/embed_live/form_component.html.heex:49 +#, elixir-autogen, elixir-format +msgid "This will delete the embed, are you sure?" +msgstr "Dadurch wird die Einbettung gelöscht. Sind Sie sicher?" + +#: lib/claper_web/live/embed_live/form_component.html.heex:14 +#, elixir-autogen, elixir-format, fuzzy +msgid "Title of your embed" +msgstr "Titel Ihrer Einbettung" + #: lib/claper_web/templates/user_reset_password/edit.html.heex:51 #, elixir-autogen, elixir-format msgid "Confirm new password" @@ -1005,4 +1061,4 @@ msgstr "Aktualisieren Sie Ihr Passwort" #: lib/claper_web/templates/user_reset_password/new.html.heex:41 #, elixir-autogen, elixir-format msgid "Send link to reset password" -msgstr "Link zum Zurücksetzen des Passworts senden" \ No newline at end of file +msgstr "Link zum Zurücksetzen des Passworts senden" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 4d9d5d71..adcd5aaa 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -17,7 +17,7 @@ msgstr "" msgid "Settings" msgstr "" -#: lib/claper_web/live/event_live/manage.ex:457 +#: lib/claper_web/live/event_live/manage.ex:529 #: lib/claper_web/live/form_live/form_component.html.heex:37 #: lib/claper_web/live/user_settings_live/show.html.heex:34 #: lib/claper_web/templates/user_registration/new.html.heex:34 @@ -80,22 +80,22 @@ msgstr "" msgid "Your personal informations only visible by you" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:387 +#: lib/claper_web/live/event_live/show.html.heex:405 #, elixir-autogen, elixir-format msgid "days" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:393 +#: lib/claper_web/live/event_live/show.html.heex:411 #, elixir-autogen, elixir-format msgid "hours" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:399 +#: lib/claper_web/live/event_live/show.html.heex:417 #, elixir-autogen, elixir-format msgid "minutes" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:118 +#: lib/claper_web/live/event_live/show.html.heex:136 #, elixir-autogen, elixir-format msgid "Be the first to react !" msgstr "" @@ -103,7 +103,7 @@ msgstr "" #: lib/claper_web/live/event_live/event_card_component.ex:98 #: lib/claper_web/live/event_live/join.ex:42 #: lib/claper_web/live/event_live/join.html.heex:106 -#: lib/claper_web/live/event_live/show.html.heex:239 +#: lib/claper_web/live/event_live/show.html.heex:257 #, elixir-autogen, elixir-format msgid "Join" msgstr "" @@ -121,7 +121,7 @@ msgstr "" msgid "Host" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:405 +#: lib/claper_web/live/event_live/show.html.heex:423 #, elixir-autogen, elixir-format msgid "seconds" msgstr "" @@ -173,7 +173,7 @@ msgid "Name of your presentation" msgstr "" #: lib/claper_web/live/event_live/presenter.html.heex:21 -#: lib/claper_web/live/event_live/show.html.heex:414 +#: lib/claper_web/live/event_live/show.html.heex:432 #, elixir-autogen, elixir-format msgid "Scan to interact in real-time" msgstr "" @@ -215,7 +215,7 @@ msgstr "" msgid "Created successfully" msgstr "" -#: lib/claper_web/live/event_live/manage.ex:23 +#: lib/claper_web/live/event_live/manage.ex:24 #: lib/claper_web/live/event_live/presenter.ex:21 #: lib/claper_web/live/event_live/show.ex:24 #, elixir-autogen, elixir-format @@ -230,6 +230,7 @@ msgstr "" msgid "Edit" msgstr "" +#: lib/claper_web/live/embed_live/form_component.html.heex:38 #: lib/claper_web/live/event_live/event_form_component.html.heex:18 #: lib/claper_web/live/event_live/event_form_component.html.heex:25 #: lib/claper_web/live/event_live/index.ex:71 @@ -240,10 +241,11 @@ msgstr "" msgid "Create" msgstr "" +#: lib/claper_web/live/embed_live/form_component.html.heex:43 #: lib/claper_web/live/event_live/event_card_component.ex:171 #: lib/claper_web/live/event_live/event_form_component.html.heex:30 -#: lib/claper_web/live/event_live/manage.html.heex:631 -#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:755 +#: lib/claper_web/live/event_live/manage.html.heex:855 #: lib/claper_web/live/event_live/post_component.ex:44 #: lib/claper_web/live/event_live/post_component.ex:116 #: lib/claper_web/live/form_live/form_component.html.heex:103 @@ -252,6 +254,7 @@ msgstr "" msgid "Delete" msgstr "" +#: lib/claper_web/live/embed_live/form_component.html.heex:39 #: lib/claper_web/live/event_live/event_form_component.html.heex:17 #: lib/claper_web/live/event_live/event_form_component.html.heex:24 #: lib/claper_web/live/form_live/form_component.html.heex:99 @@ -375,12 +378,12 @@ msgstr "" msgid "Presentation replaced" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:256 +#: lib/claper_web/live/event_live/manage.html.heex:287 #, elixir-autogen, elixir-format msgid "Edit poll" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:255 +#: lib/claper_web/live/event_live/manage.html.heex:286 #, elixir-autogen, elixir-format msgid "New poll" msgstr "" @@ -401,7 +404,7 @@ msgid "Add poll to know opinion of your public." msgstr "" #: lib/claper_web/live/event_live/manage.html.heex:174 -#: lib/claper_web/live/event_live/manage.html.heex:395 +#: lib/claper_web/live/event_live/manage.html.heex:447 #, elixir-autogen, elixir-format msgid "Poll" msgstr "" @@ -445,8 +448,9 @@ msgstr "" msgid "Present/Customize" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:408 -#: lib/claper_web/live/event_live/manage.html.heex:484 +#: lib/claper_web/live/event_live/manage.html.heex:460 +#: lib/claper_web/live/event_live/manage.html.heex:536 +#: lib/claper_web/live/event_live/manage.html.heex:606 #, elixir-autogen, elixir-format msgid "Active" msgstr "" @@ -456,12 +460,12 @@ msgstr "" msgid "Changing your file will remove all interaction elements like polls associated." msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:584 +#: lib/claper_web/live/event_live/manage.html.heex:708 #, elixir-autogen, elixir-format msgid "Messages from attendees will appear here." msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:770 +#: lib/claper_web/live/event_live/manage.html.heex:894 #, elixir-autogen, elixir-format msgid "On screen settings" msgstr "" @@ -486,19 +490,20 @@ msgstr "" msgid "Press F in the presentation window to enable fullscreen" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:298 +#: lib/claper_web/live/event_live/show.html.heex:316 #, elixir-autogen, elixir-format msgid "Ask, comment..." msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:556 +#: lib/claper_web/live/event_live/manage.html.heex:680 #: lib/claper_web/live/stat_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Messages" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:416 -#: lib/claper_web/live/event_live/manage.html.heex:492 +#: lib/claper_web/live/event_live/manage.html.heex:468 +#: lib/claper_web/live/event_live/manage.html.heex:544 +#: lib/claper_web/live/event_live/manage.html.heex:614 #, elixir-autogen, elixir-format msgid "Set active" msgstr "" @@ -534,26 +539,26 @@ msgstr "" msgid "You can change your email by visiting the URL below" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:525 +#: lib/claper_web/live/event_live/manage.html.heex:649 #, elixir-autogen, elixir-format msgid "Add interaction" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:607 -#: lib/claper_web/live/event_live/manage.html.heex:622 +#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:746 #, elixir-autogen, elixir-format msgid "Blocking this user will delete all his messages and he will not be able to join again, confirm ?" msgstr "" #: lib/claper_web/live/event_live/show.ex:50 -#: lib/claper_web/live/event_live/show.ex:197 -#: lib/claper_web/live/event_live/show.ex:212 +#: lib/claper_web/live/event_live/show.ex:198 +#: lib/claper_web/live/event_live/show.ex:213 #, elixir-autogen, elixir-format msgid "You have been banned from this event" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:601 -#: lib/claper_web/live/event_live/manage.html.heex:616 +#: lib/claper_web/live/event_live/manage.html.heex:725 +#: lib/claper_web/live/event_live/manage.html.heex:740 #, elixir-autogen, elixir-format msgid "Ban" msgstr "" @@ -647,7 +652,7 @@ msgstr "" msgid "Interactions history" msgstr "" -#: lib/claper_web/live/stat_live/index.html.heex:260 +#: lib/claper_web/live/stat_live/index.html.heex:271 #, elixir-autogen, elixir-format msgid "No messages has been sent" msgstr "" @@ -707,7 +712,7 @@ msgstr "" msgid "Connect to your account" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:423 +#: lib/claper_web/live/event_live/show.html.heex:441 #, elixir-autogen, elixir-format msgid "Or use the code:" msgstr "" @@ -778,34 +783,34 @@ msgstr "" msgid "Current form" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:277 +#: lib/claper_web/live/event_live/manage.html.heex:308 #, elixir-autogen, elixir-format msgid "Edit form" msgstr "" #: lib/claper_web/live/event_live/manage.html.heex:211 -#: lib/claper_web/live/event_live/manage.html.heex:471 +#: lib/claper_web/live/event_live/manage.html.heex:523 #: lib/claper_web/live/stat_live/index.html.heex:215 #, elixir-autogen, elixir-format msgid "Form" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:559 +#: lib/claper_web/live/event_live/manage.html.heex:683 #, elixir-autogen, elixir-format msgid "Form submissions" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:711 +#: lib/claper_web/live/event_live/manage.html.heex:835 #, elixir-autogen, elixir-format msgid "Form submissions from attendees will appear here." msgstr "" -#: lib/claper_web/live/event_live/manage.ex:456 +#: lib/claper_web/live/event_live/manage.ex:528 #, elixir-autogen, elixir-format msgid "Name" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:276 +#: lib/claper_web/live/event_live/manage.html.heex:307 #, elixir-autogen, elixir-format msgid "New form" msgstr "" @@ -830,7 +835,7 @@ msgstr "" msgid "Text" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:736 +#: lib/claper_web/live/event_live/manage.html.heex:860 #, elixir-autogen, elixir-format msgid "This cannot be undone, confirm ?" msgstr "" @@ -870,22 +875,22 @@ msgstr "" msgid "Multiple answers" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:244 +#: lib/claper_web/live/event_live/manage.html.heex:275 #, elixir-autogen, elixir-format msgid "Import all interactions from another presentation" msgstr "" -#: lib/claper_web/live/event_live/manage.ex:183 +#: lib/claper_web/live/event_live/manage.ex:202 #, elixir-autogen, elixir-format msgid "Interactions import failed" msgstr "" -#: lib/claper_web/live/event_live/manage.ex:176 +#: lib/claper_web/live/event_live/manage.ex:195 #, elixir-autogen, elixir-format msgid "Interactions imported successfully" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:295 +#: lib/claper_web/live/event_live/manage.html.heex:347 #, elixir-autogen, elixir-format msgid "Select presentation" msgstr "" @@ -895,55 +900,55 @@ msgstr "" msgid "PDF, PPT, PPTX up to %{size} MB" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:796 +#: lib/claper_web/live/event_live/manage.html.heex:920 #, elixir-autogen, elixir-format msgid "Attendees settings" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:800 +#: lib/claper_web/live/event_live/manage.html.heex:924 #, elixir-autogen, elixir-format msgid "Enable messages" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:777 +#: lib/claper_web/live/event_live/manage.html.heex:901 #, elixir-autogen, elixir-format msgid "Show instructions" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:782 +#: lib/claper_web/live/event_live/manage.html.heex:906 #, elixir-autogen, elixir-format msgid "Show messages" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:791 +#: lib/claper_web/live/event_live/manage.html.heex:915 #, elixir-autogen, elixir-format msgid "Show poll results" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:318 +#: lib/claper_web/live/event_live/show.html.heex:336 #, elixir-autogen, elixir-format msgid "Messages deactivated" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:161 -#: lib/claper_web/live/event_live/show.html.heex:182 -#: lib/claper_web/live/event_live/show.html.heex:282 +#: lib/claper_web/live/event_live/show.html.heex:179 +#: lib/claper_web/live/event_live/show.html.heex:200 +#: lib/claper_web/live/event_live/show.html.heex:300 #, elixir-autogen, elixir-format msgid "Anonymous" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:208 +#: lib/claper_web/live/event_live/show.html.heex:226 #, elixir-autogen, elixir-format msgid "Close" msgstr "" -#: lib/claper_web/live/event_live/manage.html.heex:808 +#: lib/claper_web/live/event_live/manage.html.heex:932 #, elixir-autogen, elixir-format msgid "Enable anonymous messages" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:189 -#: lib/claper_web/live/event_live/show.html.heex:234 +#: lib/claper_web/live/event_live/show.html.heex:207 +#: lib/claper_web/live/event_live/show.html.heex:252 #, elixir-autogen, elixir-format msgid "Enter your name" msgstr "" @@ -953,12 +958,12 @@ msgstr "" msgid "Or go to %{url} and use the code:" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:202 +#: lib/claper_web/live/event_live/show.html.heex:220 #, elixir-autogen, elixir-format msgid "Use your name" msgstr "" -#: lib/claper_web/live/event_live/show.html.heex:182 +#: lib/claper_web/live/event_live/show.html.heex:200 #, elixir-autogen, elixir-format msgid "disabled" msgstr "" @@ -968,6 +973,56 @@ msgstr "" msgid "Account creation is disabled" msgstr "" +#: lib/claper_web/live/event_live/manage.html.heex:244 +#, elixir-autogen, elixir-format +msgid "Add a Youtube video or any web content." +msgstr "" + +#: lib/claper_web/live/embed_live/form_component.html.heex:23 +#, elixir-autogen, elixir-format +msgid "Content of your embed" +msgstr "" + +#: lib/claper_web/live/event_live/embed_component.ex:59 +#, elixir-autogen, elixir-format +msgid "Current embed" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:329 +#, elixir-autogen, elixir-format +msgid "Edit Embed" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:593 +#: lib/claper_web/live/stat_live/index.html.heex:257 +#, elixir-autogen, elixir-format +msgid "Embed" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:242 +#, elixir-autogen, elixir-format +msgid "Embeded" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:328 +#, elixir-autogen, elixir-format +msgid "New Embed" +msgstr "" + +#: lib/claper_web/live/event_live/embed_component.ex:36 +#, elixir-autogen, elixir-format +msgid "See current embed" +msgstr "" + +#: lib/claper_web/live/embed_live/form_component.html.heex:49 +#, elixir-autogen, elixir-format +msgid "This will delete the embed, are you sure?" +msgstr "" + +#: lib/claper_web/live/embed_live/form_component.html.heex:14 +#, elixir-autogen, elixir-format +msgid "Title of your embed" + #: lib/claper_web/templates/user_reset_password/edit.html.heex:51 #, elixir-autogen, elixir-format msgid "Confirm new password" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 17c066ff..3659cb0c 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -15,7 +15,7 @@ msgstr "" msgid "Settings" msgstr "Settings" -#: lib/claper_web/live/event_live/manage.ex:457 +#: lib/claper_web/live/event_live/manage.ex:529 #: lib/claper_web/live/form_live/form_component.html.heex:37 #: lib/claper_web/live/user_settings_live/show.html.heex:34 #: lib/claper_web/templates/user_registration/new.html.heex:34 @@ -78,22 +78,22 @@ msgstr "We sent you an email at" msgid "Your personal informations only visible by you" msgstr "Your personal informations only visible by you" -#: lib/claper_web/live/event_live/show.html.heex:387 +#: lib/claper_web/live/event_live/show.html.heex:405 #, elixir-autogen, elixir-format msgid "days" msgstr "days" -#: lib/claper_web/live/event_live/show.html.heex:393 +#: lib/claper_web/live/event_live/show.html.heex:411 #, elixir-autogen, elixir-format msgid "hours" msgstr "hours" -#: lib/claper_web/live/event_live/show.html.heex:399 +#: lib/claper_web/live/event_live/show.html.heex:417 #, elixir-autogen, elixir-format msgid "minutes" msgstr "minutes" -#: lib/claper_web/live/event_live/show.html.heex:118 +#: lib/claper_web/live/event_live/show.html.heex:136 #, elixir-autogen, elixir-format msgid "Be the first to react !" msgstr "Be the first to react !" @@ -101,7 +101,7 @@ msgstr "Be the first to react !" #: lib/claper_web/live/event_live/event_card_component.ex:98 #: lib/claper_web/live/event_live/join.ex:42 #: lib/claper_web/live/event_live/join.html.heex:106 -#: lib/claper_web/live/event_live/show.html.heex:239 +#: lib/claper_web/live/event_live/show.html.heex:257 #, elixir-autogen, elixir-format msgid "Join" msgstr "Join" @@ -119,7 +119,7 @@ msgstr "Dashboard" msgid "Host" msgstr "Host" -#: lib/claper_web/live/event_live/show.html.heex:405 +#: lib/claper_web/live/event_live/show.html.heex:423 #, elixir-autogen, elixir-format msgid "seconds" msgstr "seconds" @@ -171,7 +171,7 @@ msgid "Name of your presentation" msgstr "Name of your presentation" #: lib/claper_web/live/event_live/presenter.html.heex:21 -#: lib/claper_web/live/event_live/show.html.heex:414 +#: lib/claper_web/live/event_live/show.html.heex:432 #, elixir-autogen, elixir-format msgid "Scan to interact in real-time" msgstr "Scan to interact in real-time" @@ -213,7 +213,7 @@ msgstr "Return to home" msgid "Created successfully" msgstr "Created successfully" -#: lib/claper_web/live/event_live/manage.ex:23 +#: lib/claper_web/live/event_live/manage.ex:24 #: lib/claper_web/live/event_live/presenter.ex:21 #: lib/claper_web/live/event_live/show.ex:24 #, elixir-autogen, elixir-format @@ -228,6 +228,7 @@ msgstr "Presentation doesn't exist" msgid "Edit" msgstr "Edit" +#: lib/claper_web/live/embed_live/form_component.html.heex:38 #: lib/claper_web/live/event_live/event_form_component.html.heex:18 #: lib/claper_web/live/event_live/event_form_component.html.heex:25 #: lib/claper_web/live/event_live/index.ex:71 @@ -238,10 +239,11 @@ msgstr "Edit" msgid "Create" msgstr "Create" +#: lib/claper_web/live/embed_live/form_component.html.heex:43 #: lib/claper_web/live/event_live/event_card_component.ex:171 #: lib/claper_web/live/event_live/event_form_component.html.heex:30 -#: lib/claper_web/live/event_live/manage.html.heex:631 -#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:755 +#: lib/claper_web/live/event_live/manage.html.heex:855 #: lib/claper_web/live/event_live/post_component.ex:44 #: lib/claper_web/live/event_live/post_component.ex:116 #: lib/claper_web/live/form_live/form_component.html.heex:103 @@ -250,6 +252,7 @@ msgstr "Create" msgid "Delete" msgstr "Delete" +#: lib/claper_web/live/embed_live/form_component.html.heex:39 #: lib/claper_web/live/event_live/event_form_component.html.heex:17 #: lib/claper_web/live/event_live/event_form_component.html.heex:24 #: lib/claper_web/live/form_live/form_component.html.heex:99 @@ -373,12 +376,12 @@ msgstr "Change file" msgid "Presentation replaced" msgstr "Presentation replaced" -#: lib/claper_web/live/event_live/manage.html.heex:256 +#: lib/claper_web/live/event_live/manage.html.heex:287 #, elixir-autogen, elixir-format msgid "Edit poll" msgstr "Edit poll" -#: lib/claper_web/live/event_live/manage.html.heex:255 +#: lib/claper_web/live/event_live/manage.html.heex:286 #, elixir-autogen, elixir-format msgid "New poll" msgstr "New poll" @@ -399,7 +402,7 @@ msgid "Add poll to know opinion of your public." msgstr "Add poll to know opinion of your public." #: lib/claper_web/live/event_live/manage.html.heex:174 -#: lib/claper_web/live/event_live/manage.html.heex:395 +#: lib/claper_web/live/event_live/manage.html.heex:447 #, elixir-autogen, elixir-format msgid "Poll" msgstr "Poll" @@ -443,8 +446,9 @@ msgstr "User email address" msgid "Present/Customize" msgstr "Present/Customize" -#: lib/claper_web/live/event_live/manage.html.heex:408 -#: lib/claper_web/live/event_live/manage.html.heex:484 +#: lib/claper_web/live/event_live/manage.html.heex:460 +#: lib/claper_web/live/event_live/manage.html.heex:536 +#: lib/claper_web/live/event_live/manage.html.heex:606 #, elixir-autogen, elixir-format msgid "Active" msgstr "Active" @@ -454,12 +458,12 @@ msgstr "Active" msgid "Changing your file will remove all interaction elements like polls associated." msgstr "Changing your file will remove all interaction elements like polls associated." -#: lib/claper_web/live/event_live/manage.html.heex:584 +#: lib/claper_web/live/event_live/manage.html.heex:708 #, elixir-autogen, elixir-format msgid "Messages from attendees will appear here." msgstr "Messages from attendees will appear here." -#: lib/claper_web/live/event_live/manage.html.heex:770 +#: lib/claper_web/live/event_live/manage.html.heex:894 #, elixir-autogen, elixir-format msgid "On screen settings" msgstr "On screen settings" @@ -484,19 +488,20 @@ msgstr "Start" msgid "Press F in the presentation window to enable fullscreen" msgstr "Press F in the presentation window to enable fullscreen" -#: lib/claper_web/live/event_live/show.html.heex:298 +#: lib/claper_web/live/event_live/show.html.heex:316 #, elixir-autogen, elixir-format msgid "Ask, comment..." msgstr "Ask, comment..." -#: lib/claper_web/live/event_live/manage.html.heex:556 +#: lib/claper_web/live/event_live/manage.html.heex:680 #: lib/claper_web/live/stat_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Messages" msgstr "Messages" -#: lib/claper_web/live/event_live/manage.html.heex:416 -#: lib/claper_web/live/event_live/manage.html.heex:492 +#: lib/claper_web/live/event_live/manage.html.heex:468 +#: lib/claper_web/live/event_live/manage.html.heex:544 +#: lib/claper_web/live/event_live/manage.html.heex:614 #, elixir-autogen, elixir-format msgid "Set active" msgstr "Set active" @@ -532,26 +537,26 @@ msgstr "If you’re having trouble with the button above, copy and paste the URL msgid "You can change your email by visiting the URL below" msgstr "You can change your email by visiting the URL below" -#: lib/claper_web/live/event_live/manage.html.heex:525 +#: lib/claper_web/live/event_live/manage.html.heex:649 #, elixir-autogen, elixir-format, fuzzy msgid "Add interaction" msgstr "Add interaction" -#: lib/claper_web/live/event_live/manage.html.heex:607 -#: lib/claper_web/live/event_live/manage.html.heex:622 +#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:746 #, elixir-autogen, elixir-format msgid "Blocking this user will delete all his messages and he will not be able to join again, confirm ?" msgstr "Blocking this user will delete all his messages and he will not be able to join again, confirm ?" #: lib/claper_web/live/event_live/show.ex:50 -#: lib/claper_web/live/event_live/show.ex:197 -#: lib/claper_web/live/event_live/show.ex:212 +#: lib/claper_web/live/event_live/show.ex:198 +#: lib/claper_web/live/event_live/show.ex:213 #, elixir-autogen, elixir-format msgid "You have been banned from this event" msgstr "You have been banned from this event" -#: lib/claper_web/live/event_live/manage.html.heex:601 -#: lib/claper_web/live/event_live/manage.html.heex:616 +#: lib/claper_web/live/event_live/manage.html.heex:725 +#: lib/claper_web/live/event_live/manage.html.heex:740 #, elixir-autogen, elixir-format msgid "Ban" msgstr "Ban" @@ -645,7 +650,7 @@ msgstr "Event" msgid "Interactions history" msgstr "Interactions history" -#: lib/claper_web/live/stat_live/index.html.heex:260 +#: lib/claper_web/live/stat_live/index.html.heex:271 #, elixir-autogen, elixir-format msgid "No messages has been sent" msgstr "No messages has been sent" @@ -705,7 +710,7 @@ msgstr "Login" msgid "Connect to your account" msgstr "Connect to your account" -#: lib/claper_web/live/event_live/show.html.heex:423 +#: lib/claper_web/live/event_live/show.html.heex:441 #, elixir-autogen, elixir-format msgid "Or use the code:" msgstr "Or use the code:" @@ -776,34 +781,34 @@ msgstr "Add form to collect data from your public." msgid "Current form" msgstr "Current form" -#: lib/claper_web/live/event_live/manage.html.heex:277 +#: lib/claper_web/live/event_live/manage.html.heex:308 #, elixir-autogen, elixir-format, fuzzy msgid "Edit form" msgstr "Edit form" #: lib/claper_web/live/event_live/manage.html.heex:211 -#: lib/claper_web/live/event_live/manage.html.heex:471 +#: lib/claper_web/live/event_live/manage.html.heex:523 #: lib/claper_web/live/stat_live/index.html.heex:215 #, elixir-autogen, elixir-format msgid "Form" msgstr "Form" -#: lib/claper_web/live/event_live/manage.html.heex:559 +#: lib/claper_web/live/event_live/manage.html.heex:683 #, elixir-autogen, elixir-format msgid "Form submissions" msgstr "Form submissions" -#: lib/claper_web/live/event_live/manage.html.heex:711 +#: lib/claper_web/live/event_live/manage.html.heex:835 #, elixir-autogen, elixir-format msgid "Form submissions from attendees will appear here." msgstr "Form submissions from attendees will appear here." -#: lib/claper_web/live/event_live/manage.ex:456 +#: lib/claper_web/live/event_live/manage.ex:528 #, elixir-autogen, elixir-format msgid "Name" msgstr "Name" -#: lib/claper_web/live/event_live/manage.html.heex:276 +#: lib/claper_web/live/event_live/manage.html.heex:307 #, elixir-autogen, elixir-format msgid "New form" msgstr "New form" @@ -828,7 +833,7 @@ msgstr "Submit" msgid "Text" msgstr "Text" -#: lib/claper_web/live/event_live/manage.html.heex:736 +#: lib/claper_web/live/event_live/manage.html.heex:860 #, elixir-autogen, elixir-format msgid "This cannot be undone, confirm ?" msgstr "This cannot be undone, confirm ?" @@ -868,22 +873,22 @@ msgstr "Select one or multiple options" msgid "Multiple answers" msgstr "Multiple answers" -#: lib/claper_web/live/event_live/manage.html.heex:244 +#: lib/claper_web/live/event_live/manage.html.heex:275 #, elixir-autogen, elixir-format msgid "Import all interactions from another presentation" msgstr "Import all interactions from another presentation" -#: lib/claper_web/live/event_live/manage.ex:183 +#: lib/claper_web/live/event_live/manage.ex:202 #, elixir-autogen, elixir-format msgid "Interactions import failed" msgstr "Interactions import failed" -#: lib/claper_web/live/event_live/manage.ex:176 +#: lib/claper_web/live/event_live/manage.ex:195 #, elixir-autogen, elixir-format msgid "Interactions imported successfully" msgstr "Interactions imported successfully" -#: lib/claper_web/live/event_live/manage.html.heex:295 +#: lib/claper_web/live/event_live/manage.html.heex:347 #, elixir-autogen, elixir-format msgid "Select presentation" msgstr "Select presentation" @@ -893,55 +898,55 @@ msgstr "Select presentation" msgid "PDF, PPT, PPTX up to %{size} MB" msgstr "PDF, PPT, PPTX up to %{size} MB" -#: lib/claper_web/live/event_live/manage.html.heex:796 +#: lib/claper_web/live/event_live/manage.html.heex:920 #, elixir-autogen, elixir-format msgid "Attendees settings" msgstr "Attendees settings" -#: lib/claper_web/live/event_live/manage.html.heex:800 +#: lib/claper_web/live/event_live/manage.html.heex:924 #, elixir-autogen, elixir-format msgid "Enable messages" msgstr "Enable messages" -#: lib/claper_web/live/event_live/manage.html.heex:777 +#: lib/claper_web/live/event_live/manage.html.heex:901 #, elixir-autogen, elixir-format msgid "Show instructions" msgstr "Show instructions" -#: lib/claper_web/live/event_live/manage.html.heex:782 +#: lib/claper_web/live/event_live/manage.html.heex:906 #, elixir-autogen, elixir-format msgid "Show messages" msgstr "Show messages" -#: lib/claper_web/live/event_live/manage.html.heex:791 +#: lib/claper_web/live/event_live/manage.html.heex:915 #, elixir-autogen, elixir-format msgid "Show poll results" msgstr "Show poll results" -#: lib/claper_web/live/event_live/show.html.heex:318 +#: lib/claper_web/live/event_live/show.html.heex:336 #, elixir-autogen, elixir-format msgid "Messages deactivated" msgstr "Messages deactivated" -#: lib/claper_web/live/event_live/show.html.heex:161 -#: lib/claper_web/live/event_live/show.html.heex:182 -#: lib/claper_web/live/event_live/show.html.heex:282 +#: lib/claper_web/live/event_live/show.html.heex:179 +#: lib/claper_web/live/event_live/show.html.heex:200 +#: lib/claper_web/live/event_live/show.html.heex:300 #, elixir-autogen, elixir-format msgid "Anonymous" msgstr "Anonymous" -#: lib/claper_web/live/event_live/show.html.heex:208 +#: lib/claper_web/live/event_live/show.html.heex:226 #, elixir-autogen, elixir-format msgid "Close" msgstr "Close" -#: lib/claper_web/live/event_live/manage.html.heex:808 +#: lib/claper_web/live/event_live/manage.html.heex:932 #, elixir-autogen, elixir-format, fuzzy msgid "Enable anonymous messages" msgstr "Enable anonymous messages" -#: lib/claper_web/live/event_live/show.html.heex:189 -#: lib/claper_web/live/event_live/show.html.heex:234 +#: lib/claper_web/live/event_live/show.html.heex:207 +#: lib/claper_web/live/event_live/show.html.heex:252 #, elixir-autogen, elixir-format msgid "Enter your name" msgstr "" @@ -951,12 +956,12 @@ msgstr "" msgid "Or go to %{url} and use the code:" msgstr "Or go to %{url} and use the code:" -#: lib/claper_web/live/event_live/show.html.heex:202 +#: lib/claper_web/live/event_live/show.html.heex:220 #, elixir-autogen, elixir-format msgid "Use your name" msgstr "Use your name" -#: lib/claper_web/live/event_live/show.html.heex:182 +#: lib/claper_web/live/event_live/show.html.heex:200 #, elixir-autogen, elixir-format msgid "disabled" msgstr "disabled" @@ -966,6 +971,57 @@ msgstr "disabled" msgid "Account creation is disabled" msgstr "" +#: lib/claper_web/live/event_live/manage.html.heex:244 +#, elixir-autogen, elixir-format +msgid "Add a Youtube video or any web content." +msgstr "" + +#: lib/claper_web/live/embed_live/form_component.html.heex:23 +#, elixir-autogen, elixir-format +msgid "Content of your embed" +msgstr "" + +#: lib/claper_web/live/event_live/embed_component.ex:59 +#, elixir-autogen, elixir-format, fuzzy +msgid "Current embed" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:329 +#, elixir-autogen, elixir-format +msgid "Edit Embed" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:593 +#: lib/claper_web/live/stat_live/index.html.heex:257 +#, elixir-autogen, elixir-format +msgid "Embed" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:242 +#, elixir-autogen, elixir-format +msgid "Embeded" +msgstr "" + +#: lib/claper_web/live/event_live/manage.html.heex:328 +#, elixir-autogen, elixir-format +msgid "New Embed" +msgstr "" + +#: lib/claper_web/live/event_live/embed_component.ex:36 +#, elixir-autogen, elixir-format, fuzzy +msgid "See current embed" +msgstr "" + +#: lib/claper_web/live/embed_live/form_component.html.heex:49 +#, elixir-autogen, elixir-format +msgid "This will delete the embed, are you sure?" +msgstr "" + +#: lib/claper_web/live/embed_live/form_component.html.heex:14 +#, elixir-autogen, elixir-format, fuzzy +msgid "Title of your embed" +msgstr "" + #: lib/claper_web/templates/user_reset_password/edit.html.heex:51 #, elixir-autogen, elixir-format msgid "Confirm new password" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 05c637af..fe056980 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -15,7 +15,7 @@ msgstr "" msgid "Settings" msgstr "Paramètres" -#: lib/claper_web/live/event_live/manage.ex:457 +#: lib/claper_web/live/event_live/manage.ex:529 #: lib/claper_web/live/form_live/form_component.html.heex:37 #: lib/claper_web/live/user_settings_live/show.html.heex:34 #: lib/claper_web/templates/user_registration/new.html.heex:34 @@ -78,22 +78,22 @@ msgstr "Nous vous avons envoyé un email à" msgid "Your personal informations only visible by you" msgstr "Vos informations personnelles ne sont visibles que par vous" -#: lib/claper_web/live/event_live/show.html.heex:387 +#: lib/claper_web/live/event_live/show.html.heex:405 #, elixir-autogen, elixir-format msgid "days" msgstr "jours" -#: lib/claper_web/live/event_live/show.html.heex:393 +#: lib/claper_web/live/event_live/show.html.heex:411 #, elixir-autogen, elixir-format msgid "hours" msgstr "heures" -#: lib/claper_web/live/event_live/show.html.heex:399 +#: lib/claper_web/live/event_live/show.html.heex:417 #, elixir-autogen, elixir-format msgid "minutes" msgstr "minutes" -#: lib/claper_web/live/event_live/show.html.heex:118 +#: lib/claper_web/live/event_live/show.html.heex:136 #, elixir-autogen, elixir-format msgid "Be the first to react !" msgstr "Soyez le premier à réagir !" @@ -101,7 +101,7 @@ msgstr "Soyez le premier à réagir !" #: lib/claper_web/live/event_live/event_card_component.ex:98 #: lib/claper_web/live/event_live/join.ex:42 #: lib/claper_web/live/event_live/join.html.heex:106 -#: lib/claper_web/live/event_live/show.html.heex:239 +#: lib/claper_web/live/event_live/show.html.heex:257 #, elixir-autogen, elixir-format msgid "Join" msgstr "Rejoindre" @@ -119,7 +119,7 @@ msgstr "Tableau de bord" msgid "Host" msgstr "Animateur" -#: lib/claper_web/live/event_live/show.html.heex:405 +#: lib/claper_web/live/event_live/show.html.heex:423 #, elixir-autogen, elixir-format msgid "seconds" msgstr "secondes" @@ -171,7 +171,7 @@ msgid "Name of your presentation" msgstr "Nom de votre présentation" #: lib/claper_web/live/event_live/presenter.html.heex:21 -#: lib/claper_web/live/event_live/show.html.heex:414 +#: lib/claper_web/live/event_live/show.html.heex:432 #, elixir-autogen, elixir-format msgid "Scan to interact in real-time" msgstr "Scannez pour interagir en temps réel" @@ -213,7 +213,7 @@ msgstr "Retourner à l'accueil" msgid "Created successfully" msgstr "Mis à jour avec succès" -#: lib/claper_web/live/event_live/manage.ex:23 +#: lib/claper_web/live/event_live/manage.ex:24 #: lib/claper_web/live/event_live/presenter.ex:21 #: lib/claper_web/live/event_live/show.ex:24 #, elixir-autogen, elixir-format @@ -228,6 +228,7 @@ msgstr "La présentation n'existe pas" msgid "Edit" msgstr "Modifier" +#: lib/claper_web/live/embed_live/form_component.html.heex:38 #: lib/claper_web/live/event_live/event_form_component.html.heex:18 #: lib/claper_web/live/event_live/event_form_component.html.heex:25 #: lib/claper_web/live/event_live/index.ex:71 @@ -238,10 +239,11 @@ msgstr "Modifier" msgid "Create" msgstr "Créer" +#: lib/claper_web/live/embed_live/form_component.html.heex:43 #: lib/claper_web/live/event_live/event_card_component.ex:171 #: lib/claper_web/live/event_live/event_form_component.html.heex:30 -#: lib/claper_web/live/event_live/manage.html.heex:631 -#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:755 +#: lib/claper_web/live/event_live/manage.html.heex:855 #: lib/claper_web/live/event_live/post_component.ex:44 #: lib/claper_web/live/event_live/post_component.ex:116 #: lib/claper_web/live/form_live/form_component.html.heex:103 @@ -250,6 +252,7 @@ msgstr "Créer" msgid "Delete" msgstr "Supprimer" +#: lib/claper_web/live/embed_live/form_component.html.heex:39 #: lib/claper_web/live/event_live/event_form_component.html.heex:17 #: lib/claper_web/live/event_live/event_form_component.html.heex:24 #: lib/claper_web/live/form_live/form_component.html.heex:99 @@ -373,12 +376,12 @@ msgstr "Changer le fichier" msgid "Presentation replaced" msgstr "Présentation remplacée" -#: lib/claper_web/live/event_live/manage.html.heex:256 +#: lib/claper_web/live/event_live/manage.html.heex:287 #, elixir-autogen, elixir-format msgid "Edit poll" msgstr "Modifier le sondage" -#: lib/claper_web/live/event_live/manage.html.heex:255 +#: lib/claper_web/live/event_live/manage.html.heex:286 #, elixir-autogen, elixir-format msgid "New poll" msgstr "Nouveau sondage" @@ -399,7 +402,7 @@ msgid "Add poll to know opinion of your public." msgstr "Ajoutez un sondage pour connaître l'opinion de votre public." #: lib/claper_web/live/event_live/manage.html.heex:174 -#: lib/claper_web/live/event_live/manage.html.heex:395 +#: lib/claper_web/live/event_live/manage.html.heex:447 #, elixir-autogen, elixir-format msgid "Poll" msgstr "Sondage" @@ -444,8 +447,9 @@ msgstr "Adresse email" msgid "Present/Customize" msgstr "Présenter/Personnaliser" -#: lib/claper_web/live/event_live/manage.html.heex:408 -#: lib/claper_web/live/event_live/manage.html.heex:484 +#: lib/claper_web/live/event_live/manage.html.heex:460 +#: lib/claper_web/live/event_live/manage.html.heex:536 +#: lib/claper_web/live/event_live/manage.html.heex:606 #, elixir-autogen, elixir-format msgid "Active" msgstr "Actif" @@ -455,12 +459,12 @@ msgstr "Actif" msgid "Changing your file will remove all interaction elements like polls associated." msgstr "La modification de votre fichier supprimera tous les éléments d'interaction comme les sondages associés." -#: lib/claper_web/live/event_live/manage.html.heex:584 +#: lib/claper_web/live/event_live/manage.html.heex:708 #, elixir-autogen, elixir-format msgid "Messages from attendees will appear here." msgstr "Les messages des participants apparaîtront ici." -#: lib/claper_web/live/event_live/manage.html.heex:770 +#: lib/claper_web/live/event_live/manage.html.heex:894 #, elixir-autogen, elixir-format msgid "On screen settings" msgstr "Paramètres écran" @@ -485,19 +489,20 @@ msgstr "Démarrer" msgid "Press F in the presentation window to enable fullscreen" msgstr "Appuyez sur F dans la fenêtre de présentation pour activer le plein écran" -#: lib/claper_web/live/event_live/show.html.heex:298 +#: lib/claper_web/live/event_live/show.html.heex:316 #, elixir-autogen, elixir-format msgid "Ask, comment..." msgstr "Questionnez, commentez..." -#: lib/claper_web/live/event_live/manage.html.heex:556 +#: lib/claper_web/live/event_live/manage.html.heex:680 #: lib/claper_web/live/stat_live/index.html.heex:71 #, elixir-autogen, elixir-format msgid "Messages" msgstr "Messages" -#: lib/claper_web/live/event_live/manage.html.heex:416 -#: lib/claper_web/live/event_live/manage.html.heex:492 +#: lib/claper_web/live/event_live/manage.html.heex:468 +#: lib/claper_web/live/event_live/manage.html.heex:544 +#: lib/claper_web/live/event_live/manage.html.heex:614 #, elixir-autogen, elixir-format msgid "Set active" msgstr "Activer" @@ -533,26 +538,26 @@ msgstr "Si vous rencontrez des difficultés avec le bouton ci-dessus, copiez et msgid "You can change your email by visiting the URL below" msgstr "Vous pouvez modifier votre email en visitant l'URL ci-dessous" -#: lib/claper_web/live/event_live/manage.html.heex:525 +#: lib/claper_web/live/event_live/manage.html.heex:649 #, elixir-autogen, elixir-format, fuzzy msgid "Add interaction" msgstr "Ajouter une interaction" -#: lib/claper_web/live/event_live/manage.html.heex:607 -#: lib/claper_web/live/event_live/manage.html.heex:622 +#: lib/claper_web/live/event_live/manage.html.heex:731 +#: lib/claper_web/live/event_live/manage.html.heex:746 #, elixir-autogen, elixir-format msgid "Blocking this user will delete all his messages and he will not be able to join again, confirm ?" msgstr "Bloquer cet utilisateur supprimera tous ses messages et il ne pourra pas rejoindre à nouveau, confirmer ?" #: lib/claper_web/live/event_live/show.ex:50 -#: lib/claper_web/live/event_live/show.ex:197 -#: lib/claper_web/live/event_live/show.ex:212 +#: lib/claper_web/live/event_live/show.ex:198 +#: lib/claper_web/live/event_live/show.ex:213 #, elixir-autogen, elixir-format msgid "You have been banned from this event" msgstr "Vous avez été banni de cet événement" -#: lib/claper_web/live/event_live/manage.html.heex:601 -#: lib/claper_web/live/event_live/manage.html.heex:616 +#: lib/claper_web/live/event_live/manage.html.heex:725 +#: lib/claper_web/live/event_live/manage.html.heex:740 #, elixir-autogen, elixir-format msgid "Ban" msgstr "Bannir" @@ -648,7 +653,7 @@ msgstr "Événement" msgid "Interactions history" msgstr "Historique des interactions" -#: lib/claper_web/live/stat_live/index.html.heex:260 +#: lib/claper_web/live/stat_live/index.html.heex:271 #, elixir-autogen, elixir-format msgid "No messages has been sent" msgstr "Aucun message n'a été envoyé" @@ -709,7 +714,7 @@ msgstr "Connexion" msgid "Connect to your account" msgstr "Connectez-vous à votre compte" -#: lib/claper_web/live/event_live/show.html.heex:423 +#: lib/claper_web/live/event_live/show.html.heex:441 #, elixir-autogen, elixir-format msgid "Or use the code:" msgstr "Ou utilisez le code:" @@ -781,34 +786,34 @@ msgstr "Ajoutez un formulaire pour recueillir les données de votre public." msgid "Current form" msgstr "Sondage actuel" -#: lib/claper_web/live/event_live/manage.html.heex:277 +#: lib/claper_web/live/event_live/manage.html.heex:308 #, elixir-autogen, elixir-format, fuzzy msgid "Edit form" msgstr "Modifier" #: lib/claper_web/live/event_live/manage.html.heex:211 -#: lib/claper_web/live/event_live/manage.html.heex:471 +#: lib/claper_web/live/event_live/manage.html.heex:523 #: lib/claper_web/live/stat_live/index.html.heex:215 #, elixir-autogen, elixir-format msgid "Form" msgstr "Formulaire" -#: lib/claper_web/live/event_live/manage.html.heex:559 +#: lib/claper_web/live/event_live/manage.html.heex:683 #, elixir-autogen, elixir-format msgid "Form submissions" msgstr "Soumissions de formulaire" -#: lib/claper_web/live/event_live/manage.html.heex:711 +#: lib/claper_web/live/event_live/manage.html.heex:835 #, elixir-autogen, elixir-format msgid "Form submissions from attendees will appear here." msgstr "Les formulaires soumis par les participants apparaîtront ici." -#: lib/claper_web/live/event_live/manage.ex:456 +#: lib/claper_web/live/event_live/manage.ex:528 #, elixir-autogen, elixir-format msgid "Name" msgstr "Nom" -#: lib/claper_web/live/event_live/manage.html.heex:276 +#: lib/claper_web/live/event_live/manage.html.heex:307 #, elixir-autogen, elixir-format msgid "New form" msgstr "Nouveau formulaire" @@ -833,7 +838,7 @@ msgstr "Soumettre" msgid "Text" msgstr "Texte" -#: lib/claper_web/live/event_live/manage.html.heex:736 +#: lib/claper_web/live/event_live/manage.html.heex:860 #, elixir-autogen, elixir-format msgid "This cannot be undone, confirm ?" msgstr "Cela ne peut pas être annulé, confirmez-vous ?" @@ -873,22 +878,22 @@ msgstr "Sélectionner une ou plusieurs options" msgid "Multiple answers" msgstr "Réponses multiples" -#: lib/claper_web/live/event_live/manage.html.heex:244 +#: lib/claper_web/live/event_live/manage.html.heex:275 #, elixir-autogen, elixir-format msgid "Import all interactions from another presentation" msgstr "Importer toutes les interactions d'une autre présentation" -#: lib/claper_web/live/event_live/manage.ex:183 +#: lib/claper_web/live/event_live/manage.ex:202 #, elixir-autogen, elixir-format msgid "Interactions import failed" msgstr "Échec de l'importation d'interactions" -#: lib/claper_web/live/event_live/manage.ex:176 +#: lib/claper_web/live/event_live/manage.ex:195 #, elixir-autogen, elixir-format msgid "Interactions imported successfully" msgstr "Interactions importées avec succès" -#: lib/claper_web/live/event_live/manage.html.heex:295 +#: lib/claper_web/live/event_live/manage.html.heex:347 #, elixir-autogen, elixir-format msgid "Select presentation" msgstr "Sélectionnez la présentation" @@ -898,55 +903,55 @@ msgstr "Sélectionnez la présentation" msgid "PDF, PPT, PPTX up to %{size} MB" msgstr "PDF, PPT, PPTX jusqu'à %{size} MB" -#: lib/claper_web/live/event_live/manage.html.heex:796 +#: lib/claper_web/live/event_live/manage.html.heex:920 #, elixir-autogen, elixir-format msgid "Attendees settings" msgstr "Paramètres participants" -#: lib/claper_web/live/event_live/manage.html.heex:800 +#: lib/claper_web/live/event_live/manage.html.heex:924 #, elixir-autogen, elixir-format msgid "Enable messages" msgstr "Activer messages" -#: lib/claper_web/live/event_live/manage.html.heex:777 +#: lib/claper_web/live/event_live/manage.html.heex:901 #, elixir-autogen, elixir-format msgid "Show instructions" msgstr "Afficher instructions" -#: lib/claper_web/live/event_live/manage.html.heex:782 +#: lib/claper_web/live/event_live/manage.html.heex:906 #, elixir-autogen, elixir-format msgid "Show messages" msgstr "Afficher messages" -#: lib/claper_web/live/event_live/manage.html.heex:791 +#: lib/claper_web/live/event_live/manage.html.heex:915 #, elixir-autogen, elixir-format msgid "Show poll results" msgstr "Afficher résultats sondage" -#: lib/claper_web/live/event_live/show.html.heex:318 +#: lib/claper_web/live/event_live/show.html.heex:336 #, elixir-autogen, elixir-format msgid "Messages deactivated" msgstr "Messages désactivés" -#: lib/claper_web/live/event_live/show.html.heex:161 -#: lib/claper_web/live/event_live/show.html.heex:182 -#: lib/claper_web/live/event_live/show.html.heex:282 +#: lib/claper_web/live/event_live/show.html.heex:179 +#: lib/claper_web/live/event_live/show.html.heex:200 +#: lib/claper_web/live/event_live/show.html.heex:300 #, elixir-autogen, elixir-format msgid "Anonymous" msgstr "Anonyme" -#: lib/claper_web/live/event_live/show.html.heex:208 +#: lib/claper_web/live/event_live/show.html.heex:226 #, elixir-autogen, elixir-format msgid "Close" msgstr "Fermer" -#: lib/claper_web/live/event_live/manage.html.heex:808 +#: lib/claper_web/live/event_live/manage.html.heex:932 #, elixir-autogen, elixir-format, fuzzy msgid "Enable anonymous messages" msgstr "Activer messages anonymes" -#: lib/claper_web/live/event_live/show.html.heex:189 -#: lib/claper_web/live/event_live/show.html.heex:234 +#: lib/claper_web/live/event_live/show.html.heex:207 +#: lib/claper_web/live/event_live/show.html.heex:252 #, elixir-autogen, elixir-format msgid "Enter your name" msgstr "Entrer votre nom" @@ -956,12 +961,12 @@ msgstr "Entrer votre nom" msgid "Or go to %{url} and use the code:" msgstr "Ou allez sur %{url} et utilisez le code:" -#: lib/claper_web/live/event_live/show.html.heex:202 +#: lib/claper_web/live/event_live/show.html.heex:220 #, elixir-autogen, elixir-format msgid "Use your name" msgstr "Utiliser votre nom" -#: lib/claper_web/live/event_live/show.html.heex:182 +#: lib/claper_web/live/event_live/show.html.heex:200 #, elixir-autogen, elixir-format msgid "disabled" msgstr "désactivé" @@ -971,6 +976,57 @@ msgstr "désactivé" msgid "Account creation is disabled" msgstr "La création de compte est désactivée" +#: lib/claper_web/live/event_live/manage.html.heex:244 +#, elixir-autogen, elixir-format +msgid "Add a Youtube video or any web content." +msgstr "Ajoutez une vidéo Youtube ou tout autre contenu web." + +#: lib/claper_web/live/embed_live/form_component.html.heex:23 +#, elixir-autogen, elixir-format +msgid "Content of your embed" +msgstr "Contenu de votre intégration" + +#: lib/claper_web/live/event_live/embed_component.ex:59 +#, elixir-autogen, elixir-format, fuzzy +msgid "Current embed" +msgstr "Intégration actuelle" + +#: lib/claper_web/live/event_live/manage.html.heex:329 +#, elixir-autogen, elixir-format +msgid "Edit Embed" +msgstr "Modifier Intégrer" + +#: lib/claper_web/live/event_live/manage.html.heex:593 +#: lib/claper_web/live/stat_live/index.html.heex:257 +#, elixir-autogen, elixir-format +msgid "Embed" +msgstr "Intégrer" + +#: lib/claper_web/live/event_live/manage.html.heex:242 +#, elixir-autogen, elixir-format +msgid "Embeded" +msgstr "Intégré" + +#: lib/claper_web/live/event_live/manage.html.heex:328 +#, elixir-autogen, elixir-format +msgid "New Embed" +msgstr "Nouvelle intégration" + +#: lib/claper_web/live/event_live/embed_component.ex:36 +#, elixir-autogen, elixir-format, fuzzy +msgid "See current embed" +msgstr "Voir l'intégration actuelle" + +#: lib/claper_web/live/embed_live/form_component.html.heex:49 +#, elixir-autogen, elixir-format +msgid "This will delete the embed, are you sure?" +msgstr "Cela supprimera l'intégration, êtes-vous sûr?" + +#: lib/claper_web/live/embed_live/form_component.html.heex:14 +#, elixir-autogen, elixir-format, fuzzy +msgid "Title of your embed" +msgstr "Titre de votre intégration" + #: lib/claper_web/templates/user_reset_password/edit.html.heex:51 #, elixir-autogen, elixir-format msgid "Confirm new password" diff --git a/priv/repo/migrations/20231028144823_create_embeds.exs b/priv/repo/migrations/20231028144823_create_embeds.exs new file mode 100644 index 00000000..198e1bbb --- /dev/null +++ b/priv/repo/migrations/20231028144823_create_embeds.exs @@ -0,0 +1,16 @@ +defmodule Claper.Repo.Migrations.CreateEmbeds do + use Ecto.Migration + + def change do + create table(:embeds) do + add :title, :string, null: false + add :content, :text, null: false + add :position, :integer, default: 0 + add :enabled, :boolean, default: true + add :attendee_visibility, :boolean, default: false + add :presentation_file_id, references(:presentation_files, on_delete: :nilify_all) + + timestamps() + end + end +end diff --git a/test/claper/embeds_test.exs b/test/claper/embeds_test.exs new file mode 100644 index 00000000..1db6c14c --- /dev/null +++ b/test/claper/embeds_test.exs @@ -0,0 +1,99 @@ +defmodule Claper.EmbedsTest do + use Claper.DataCase + + alias Claper.Embeds + + describe "embeds" do + alias Claper.Embeds.Embed + + import Claper.{EmbedsFixtures, PresentationsFixtures} + + @invalid_attrs %{title: nil, content: nil} + + test "list_embeds/1 returns all embeds from a presentation" do + presentation_file = presentation_file_fixture() + embed = embed_fixture(%{presentation_file_id: presentation_file.id}) + + assert Embeds.list_embeds(presentation_file.id) == [embed] + end + + test "list_embeds_at_position/2 returns all embeds from a presentation at a given position" do + presentation_file = presentation_file_fixture() + embed = embed_fixture(%{presentation_file_id: presentation_file.id, position: 5}) + + assert Embeds.list_embeds_at_position(presentation_file.id, 5) == [embed] + end + + test "get_embed!/1 returns the embed with given id" do + presentation_file = presentation_file_fixture() + + embed = embed_fixture(%{presentation_file_id: presentation_file.id}) + assert Embeds.get_embed!(embed.id) == embed + end + + test "create_embed/1 with valid data creates a embed" do + presentation_file = presentation_file_fixture() + + valid_attrs = %{ + title: "some title", + content: + "", + presentation_file_id: presentation_file.id, + position: 0 + } + + assert {:ok, %Embed{} = embed} = Embeds.create_embed(valid_attrs) + assert embed.title == "some title" + + assert embed.content == + "" + end + + test "create_embed/1 with invalid data returns error changeset" do + assert {:error, %Ecto.Changeset{}} = Embeds.create_embed(@invalid_attrs) + end + + test "update_embed/3 with valid data updates the embed" do + presentation_file = presentation_file_fixture() + embed = embed_fixture(%{presentation_file_id: presentation_file.id}) + + update_attrs = %{ + title: "some updated title", + content: + "" + } + + assert {:ok, %Embed{} = embed} = + Embeds.update_embed(presentation_file.event_id, embed, update_attrs) + + assert embed.title == "some updated title" + + assert embed.content == + "" + end + + test "update_embed/3 with invalid data returns error changeset" do + presentation_file = presentation_file_fixture() + embed = embed_fixture(%{presentation_file_id: presentation_file.id}) + + assert {:error, %Ecto.Changeset{}} = + Embeds.update_embed(presentation_file.event_id, embed, @invalid_attrs) + + assert embed == Embeds.get_embed!(embed.id) + end + + test "delete_embed/2 deletes the embed" do + presentation_file = presentation_file_fixture() + embed = embed_fixture(%{presentation_file_id: presentation_file.id}) + + assert {:ok, %Embed{}} = Embeds.delete_embed(presentation_file.event_id, embed) + assert_raise Ecto.NoResultsError, fn -> Embeds.get_embed!(embed.id) end + end + + test "change_embed/1 returns a embed changeset" do + presentation_file = presentation_file_fixture() + embed = embed_fixture(%{presentation_file_id: presentation_file.id}) + assert %Ecto.Changeset{} = Embeds.change_embed(embed) + end + end +end diff --git a/test/support/fixtures/embeds__fixtures.ex b/test/support/fixtures/embeds__fixtures.ex new file mode 100644 index 00000000..ca8e1d4e --- /dev/null +++ b/test/support/fixtures/embeds__fixtures.ex @@ -0,0 +1,27 @@ +defmodule Claper.EmbedsFixtures do + @moduledoc """ + This module defines test helpers for creating + entities via the `Claper.Embeds` context. + """ + + require Claper.UtilFixture + + @doc """ + Generate a embed. + """ + def embed_fixture(attrs \\ %{}, preload \\ []) do + {:ok, embed} = + attrs + |> Enum.into(%{ + title: "some title", + content: + "", + position: 0, + enabled: true, + attendee_visibility: true + }) + |> Claper.Embeds.create_embed() + + Claper.UtilFixture.merge_preload(embed, preload, %{}) + end +end