From 673d41099053fe294c96ce7c480c150a781b1e4e Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 17 Dec 2022 10:40:06 +0100 Subject: [PATCH 01/21] Add image os for docker image --- .github/workflows/docker-image.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 415218c9..dbde3f77 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest + env: + ImageOS: ubuntu20 + steps: - name: Docker meta id: meta From 3c167ba96b85f7f34fafe03e3ee37c686a04706d Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 17 Dec 2022 10:40:59 +0100 Subject: [PATCH 02/21] Add iamge os for doc job --- .github/workflows/doc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 4abeadb4..ebd3b1da 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -9,6 +9,8 @@ jobs: build-and-deploy: concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. runs-on: ubuntu-latest + env: + ImageOS: ubuntu20 steps: - uses: actions/checkout@v3 - name: Set up Elixir From fd93e2bfd8afd6f437aa3d71836ef1c5fe981b10 Mon Sep 17 00:00:00 2001 From: Ariel Weher Date: Fri, 3 Mar 2023 08:18:05 -0300 Subject: [PATCH 03/21] Fix missing volume in docker compose file (#27) --- docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4f14dfa4..36157234 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,4 +20,6 @@ services: MAIL_TRANSPORT: local ENDPOINT_PORT: 4000 depends_on: - - db \ No newline at end of file + - db +volumes: + uploads: \ No newline at end of file From 64cd3994956c6548f795aeda8eef50af67aeaa32 Mon Sep 17 00:00:00 2001 From: Alexandre Lion Date: Fri, 31 Mar 2023 19:45:30 +0200 Subject: [PATCH 04/21] Add funding --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..845edee7 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [ClaperCo] From bd17ffc4f36da5ab8a6ef9adf8115a5fc950ca55 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Apr 2023 13:52:43 +0200 Subject: [PATCH 05/21] Add stale plugin --- .github/stale.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..d9f65632 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false \ No newline at end of file From 652a599865cdeef9e41988f0711642fc39a021b5 Mon Sep 17 00:00:00 2001 From: Alexandre Lion Date: Fri, 21 Apr 2023 15:10:47 +0200 Subject: [PATCH 06/21] Add roadmap label --- .github/stale.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index d9f65632..39e6a24a 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -4,8 +4,7 @@ daysUntilStale: 60 daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - pinned - - security + - roadmap # Label to use when marking an issue as stale staleLabel: wontfix # Comment to post when marking an issue as stale. Set to `false` to disable @@ -14,4 +13,4 @@ markComment: > recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false \ No newline at end of file +closeComment: false From 897575eea8ec78990f07332002cc5eab77ef67a5 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 2 Jul 2023 14:21:15 +0200 Subject: [PATCH 07/21] Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f33ca99..4d3ce785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## v1.4.1 -- Add GS_JPG_RESOLUTION environement variable to configure the resolution of the JPG generated from PDF (#40 - thanks @mokaddem) +- Add GS_JPG_RESOLUTION environment variable to configure the resolution of the JPG generated from PDF (#40 - thanks @mokaddem) - Fix MAX_FILE_SIZE_MB not being updated ## v1.4.0 From 3d93a3b963e0208bf9f1b7069fd8dc4f003ce047 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 11 Aug 2023 12:21:17 +0200 Subject: [PATCH 08/21] Fix docs typo --- README.md | 2 +- guides/introduction/overview.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a76c9e1..5fdb051e 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Claper has a two-sided mission: - The first one is to help these people presenting an idea or a message by giving them the opportunity to make their presentation unique and to have real-time feedback from their audience. - The second one is to help each participant to take their place, to be an actor in the presentation, in the meeting and to feel important and useful. -Languages suppported: 🇬🇧 English, 🇫🇷 French, 🇩🇪 German. +Supported languages: 🇬🇧 English, 🇫🇷 French, 🇩🇪 German. ### Built With diff --git a/guides/introduction/overview.md b/guides/introduction/overview.md index 4c4d100d..866b76b0 100644 --- a/guides/introduction/overview.md +++ b/guides/introduction/overview.md @@ -14,7 +14,7 @@ Claper has a two-sided mission: - The first one is to help these people presenting an idea or a message by giving them the opportunity to make their presentation unique and to have real-time feedback from their audience. - The second one is to help each participant to take their place, to be an actor in the presentation, in the meeting and to feel important and useful. -Languages suppported: 🇬🇧 English, 🇫🇷 French, 🇩🇪 German. +Supported languages: 🇬🇧 English, 🇫🇷 French, 🇩🇪 German. ![](assets/preview.png) From 3d847e78701258da6aa0237ab41520df275e542f Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 11 Aug 2023 14:32:15 +0200 Subject: [PATCH 09/21] Fix dockerfile --- Dockerfile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index be4fab46..a3691a7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,9 +18,24 @@ ARG RUNNER_IMAGE="debian:bullseye-20210902-slim" FROM ${BUILDER_IMAGE} as builder # install build dependencies -RUN apt-get update -y && apt-get install -y build-essential git nodejs npm \ +RUN apt-get update -y && apt-get install -y curl build-essential git \ && apt-get clean && rm -f /var/lib/apt/lists/*_* +ENV NODE_VERSION 16.20.0 + +# Install nvm with node and npm +RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash \ + && . $HOME/.nvm/nvm.sh \ + && nvm install $NODE_VERSION \ + && nvm alias default $NODE_VERSION \ + && nvm use default + +ENV NODE_PATH $HOME/.nvm/versions/node/v$NODE_VERSION/lib/node_modules +ENV PATH $HOME/.nvm/versions/node/v$NODE_VERSION/bin:$PATH + +RUN ln -sf $HOME/.nvm/versions/node/v$NODE_VERSION/bin/npm /usr/bin/npm +RUN ln -sf $HOME/.nvm/versions/node/v$NODE_VERSION/bin/node /usr/bin/node + # prepare build dir WORKDIR /app From bdd5bd3a842673f18de5303de13591eec033eabc Mon Sep 17 00:00:00 2001 From: Dhanus Date: Tue, 31 Oct 2023 13:47:25 +0530 Subject: [PATCH 10/21] feat: Add Embed --- lib/claper/embeds.ex | 187 ++++++++++++++++++ lib/claper/embeds/embed.ex | 23 +++ lib/claper/events.ex | 20 +- lib/claper/presentations/presentation_file.ex | 1 + .../live/embed_live/form_component.ex | 92 +++++++++ .../live/embed_live/form_component.html.heex | 57 ++++++ .../live/event_live/embed_component.ex | 84 ++++++++ lib/claper_web/live/event_live/manage.ex | 118 ++++++++++- .../live/event_live/manage.html.heex | 124 ++++++++++++ lib/claper_web/live/event_live/presenter.ex | 36 +++- .../live/event_live/presenter.html.heex | 14 ++ lib/claper_web/live/event_live/show.ex | 35 +++- lib/claper_web/live/event_live/show.html.heex | 18 ++ lib/claper_web/live/stat_live/index.ex | 2 +- lib/claper_web/live/stat_live/index.html.heex | 11 ++ lib/claper_web/router.ex | 2 + .../views/components/input_component.ex | 33 ++++ .../20231028144823_create_embeds.exs | 15 ++ 18 files changed, 864 insertions(+), 8 deletions(-) create mode 100644 lib/claper/embeds.ex create mode 100644 lib/claper/embeds/embed.ex create mode 100644 lib/claper_web/live/embed_live/form_component.ex create mode 100644 lib/claper_web/live/embed_live/form_component.html.heex create mode 100644 lib/claper_web/live/event_live/embed_component.ex create mode 100644 priv/repo/migrations/20231028144823_create_embeds.exs diff --git a/lib/claper/embeds.ex b/lib/claper/embeds.ex new file mode 100644 index 00000000..1d244aa2 --- /dev/null +++ b/lib/claper/embeds.ex @@ -0,0 +1,187 @@ +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_default(id, presentation_file_id, position) 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]) + + 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: true]) + 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..70b26988 --- /dev/null +++ b/lib/claper/embeds/embed.ex @@ -0,0 +1,23 @@ +defmodule Claper.Embeds.Embed do + use Ecto.Schema + import Ecto.Changeset + + @derive {Jason.Encoder, only: [:title, :content, :position]} + schema "embeds" do + field :title, :string + field :content, :string + field :enabled, :boolean, default: true + field :position, :integer, default: 0 + + 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]) + |> validate_required([:title, :content, :presentation_file_id, :position]) + end +end diff --git a/lib/claper/events.ex b/lib/claper/events.ex index 0d98eb76..109a7768 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,21 @@ 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, + 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/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..5f41b991 --- /dev/null +++ b/lib/claper_web/live/embed_live/form_component.html.heex @@ -0,0 +1,57 @@ +
+ <.form + :let={f} + for={@changeset} + id="embed-form" + phx-target={@myself} + phx-change="validate" + phx-submit="save" + > +
+ + +
+ +
+ + <%= 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..148f231b 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 @@ -187,6 +206,7 @@ defmodule ClaperWeb.EventLive.Manage do def handle_event("poll-set-default", %{"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( id, @@ -208,14 +228,22 @@ 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 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( id, @@ -237,10 +265,54 @@ 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-default", %{"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_default( + id, + socket.assigns.event.presentation_file.id, + socket.assigns.state.position + ) + + 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(:forms, list_forms(socket, socket.assigns.event.presentation_file.id)) + |> assign(:embeds, list_embeds(socket, socket.assigns.event.presentation_file.id))} end @impl true @@ -459,6 +531,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 +552,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 +603,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 +651,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 a8ea5ea8..c832271b 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") %>

    @@ -518,6 +570,78 @@
    <% 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 %> + + + + + <%= gettext("Active") %> + + <% else %> + + <% end %> + + + + + + <% end %> +
    +
    +
    + <% end %> <%= if @state.position == index do %> diff --git a/lib/claper_web/live/event_live/presenter.ex b/lib/claper_web/live/event_live/presenter.ex index d60ce577..f4ec51ba 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 @@ -131,6 +133,20 @@ defmodule ClaperWeb.EventLive.Presenter do |> update(:current_form, fn _current_form -> nil end)} 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({: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 +194,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 +236,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..2c5f7ce7 100644 --- a/lib/claper_web/live/event_live/presenter.html.heex +++ b/lib/claper_web/live/event_live/presenter.html.heex @@ -68,6 +68,20 @@ <% end %> + + <%= if @current_embed do %> +
    +
    +

    <%= @current_embed.title %>

    +
    + <%= 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)} @@ -293,6 +302,20 @@ defmodule ClaperWeb.EventLive.Show do |> update(:current_form, fn _current_form -> nil end)} 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({: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 +670,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..b63c0fac 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 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 6e477b63..125a181b 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 1285b6aa..1ed91dd0 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/repo/migrations/20231028144823_create_embeds.exs b/priv/repo/migrations/20231028144823_create_embeds.exs new file mode 100644 index 00000000..f63ba910 --- /dev/null +++ b/priv/repo/migrations/20231028144823_create_embeds.exs @@ -0,0 +1,15 @@ +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 :presentation_file_id, references(:presentation_files, on_delete: :nilify_all) + + timestamps() + end + end +end From 265fab44302386242648c2d87331bb37a80ec4a0 Mon Sep 17 00:00:00 2001 From: Dhanus Date: Tue, 31 Oct 2023 13:47:42 +0530 Subject: [PATCH 11/21] feat: Add Embed tests --- test/claper/embeds_test.exs | 98 +++++++++++++++++++++++ test/support/fixtures/embeds__fixtures.ex | 26 ++++++ 2 files changed, 124 insertions(+) create mode 100644 test/claper/embeds_test.exs create mode 100644 test/support/fixtures/embeds__fixtures.ex diff --git a/test/claper/embeds_test.exs b/test/claper/embeds_test.exs new file mode 100644 index 00000000..665a8d11 --- /dev/null +++ b/test/claper/embeds_test.exs @@ -0,0 +1,98 @@ +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" and + 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..11f37a38 --- /dev/null +++ b/test/support/fixtures/embeds__fixtures.ex @@ -0,0 +1,26 @@ +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 + }) + |> Claper.Embeds.create_embed() + + Claper.UtilFixture.merge_preload(embed, preload, %{}) + end +end From 8018e498e3adbfa0f049486cada9f799fb06de88 Mon Sep 17 00:00:00 2001 From: Dhanus Date: Tue, 31 Oct 2023 14:13:12 +0530 Subject: [PATCH 12/21] feat: Add Embed i18n translations --- priv/gettext/de/LC_MESSAGES/default.po | 170 ++++++++++++++++--------- priv/gettext/default.pot | 170 ++++++++++++++++--------- priv/gettext/en/LC_MESSAGES/default.po | 170 ++++++++++++++++--------- priv/gettext/fr/LC_MESSAGES/default.po | 170 ++++++++++++++++--------- 4 files changed, 452 insertions(+), 228 deletions(-) diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index dfd77eb3..b5e0c5a4 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 @@ -75,22 +75,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!" @@ -98,7 +98,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" @@ -116,7 +116,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" @@ -168,7 +168,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" @@ -210,7 +210,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 @@ -225,6 +225,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 @@ -235,10 +236,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 @@ -247,6 +249,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 @@ -370,12 +373,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" @@ -396,7 +399,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" @@ -440,8 +443,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" @@ -451,12 +455,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" @@ -481,19 +485,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" @@ -529,26 +534,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" @@ -642,7 +647,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" @@ -702,7 +707,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:" @@ -772,34 +777,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" @@ -824,7 +829,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?" @@ -864,22 +869,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" @@ -889,55 +894,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 "" -#: 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, fuzzy msgid "Enable anonymous messages" msgstr "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" @@ -947,12 +952,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" @@ -961,3 +966,54 @@ msgstr "deaktiviert" #, elixir-autogen, elixir-format 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" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 5ea4f2ec..01ac9da8 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 @@ -77,22 +77,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 "" @@ -100,7 +100,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 "" @@ -118,7 +118,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 "" @@ -170,7 +170,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 "" @@ -212,7 +212,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 @@ -227,6 +227,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 @@ -237,10 +238,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 @@ -249,6 +251,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 @@ -372,12 +375,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 "" @@ -398,7 +401,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 "" @@ -442,8 +445,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 "" @@ -453,12 +457,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 "" @@ -483,19 +487,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 "" @@ -531,26 +536,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 "" @@ -644,7 +649,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 "" @@ -704,7 +709,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 "" @@ -774,34 +779,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 "" @@ -826,7 +831,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 "" @@ -866,22 +871,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 "" @@ -891,55 +896,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 "" @@ -949,12 +954,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 "" @@ -963,3 +968,54 @@ msgstr "" #, elixir-autogen, elixir-format 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" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 04edbfb5..caf71e9b 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 @@ -75,22 +75,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 !" @@ -98,7 +98,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" @@ -116,7 +116,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" @@ -168,7 +168,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" @@ -210,7 +210,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 @@ -225,6 +225,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 @@ -235,10 +236,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 @@ -247,6 +249,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 @@ -370,12 +373,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" @@ -396,7 +399,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" @@ -440,8 +443,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" @@ -451,12 +455,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" @@ -481,19 +485,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" @@ -529,26 +534,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" @@ -642,7 +647,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" @@ -702,7 +707,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:" @@ -772,34 +777,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" @@ -824,7 +829,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 ?" @@ -864,22 +869,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" @@ -889,55 +894,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 "" @@ -947,12 +952,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" @@ -961,3 +966,54 @@ msgstr "disabled" #, elixir-autogen, elixir-format 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 "Current form" + +#: 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 "See current form" + +#: 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 "Title of your form" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 13cab9fb..a92bd669 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 @@ -75,22 +75,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 !" @@ -98,7 +98,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" @@ -116,7 +116,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" @@ -168,7 +168,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" @@ -210,7 +210,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 @@ -225,6 +225,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 @@ -235,10 +236,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 @@ -247,6 +249,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 @@ -370,12 +373,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" @@ -396,7 +399,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" @@ -441,8 +444,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" @@ -452,12 +456,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" @@ -482,19 +486,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" @@ -530,26 +535,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" @@ -645,7 +650,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é" @@ -706,7 +711,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:" @@ -777,34 +782,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" @@ -829,7 +834,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 ?" @@ -869,22 +874,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" @@ -894,55 +899,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" @@ -952,12 +957,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é" @@ -966,3 +971,54 @@ msgstr "désactivé" #, elixir-autogen, elixir-format 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" From 6561972422716edf2d66467df4878526f5511e1a Mon Sep 17 00:00:00 2001 From: Dhanus Date: Tue, 31 Oct 2023 14:38:12 +0530 Subject: [PATCH 13/21] fix: Embed i18n translations and tests --- priv/gettext/en/LC_MESSAGES/default.po | 6 +++--- test/claper/embeds_test.exs | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index ebfdad16..3659cb0c 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -984,7 +984,7 @@ msgstr "" #: lib/claper_web/live/event_live/embed_component.ex:59 #, elixir-autogen, elixir-format, fuzzy msgid "Current embed" -msgstr "Current form" +msgstr "" #: lib/claper_web/live/event_live/manage.html.heex:329 #, elixir-autogen, elixir-format @@ -1010,7 +1010,7 @@ msgstr "" #: lib/claper_web/live/event_live/embed_component.ex:36 #, elixir-autogen, elixir-format, fuzzy msgid "See current embed" -msgstr "See current form" +msgstr "" #: lib/claper_web/live/embed_live/form_component.html.heex:49 #, elixir-autogen, elixir-format @@ -1020,7 +1020,7 @@ msgstr "" #: lib/claper_web/live/embed_live/form_component.html.heex:14 #, elixir-autogen, elixir-format, fuzzy msgid "Title of your embed" -msgstr "Title of your form" +msgstr "" #: lib/claper_web/templates/user_reset_password/edit.html.heex:51 #, elixir-autogen, elixir-format diff --git a/test/claper/embeds_test.exs b/test/claper/embeds_test.exs index 665a8d11..12cbaf4d 100644 --- a/test/claper/embeds_test.exs +++ b/test/claper/embeds_test.exs @@ -44,7 +44,6 @@ defmodule Claper.EmbedsTest do assert {:ok, %Embed{} = embed} = Embeds.create_embed(valid_attrs) assert embed.title == "some title" - assert embed.content == "" end @@ -66,9 +65,8 @@ defmodule Claper.EmbedsTest do assert {:ok, %Embed{} = embed} = Embeds.update_embed(presentation_file.event_id, embed, update_attrs) - assert embed.title == "some updated title" and - embed.content == - "" + assert embed.title == "some updated title" + assert embed.content == "" end test "update_embed/3 with invalid data returns error changeset" do From 1e15c2ed6fdf835b68b0d06436bf9138a59d08ca Mon Sep 17 00:00:00 2001 From: Dhanus Date: Tue, 31 Oct 2023 14:40:56 +0530 Subject: [PATCH 14/21] fix: embed tests formating --- test/claper/embeds_test.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/claper/embeds_test.exs b/test/claper/embeds_test.exs index 12cbaf4d..1db6c14c 100644 --- a/test/claper/embeds_test.exs +++ b/test/claper/embeds_test.exs @@ -44,6 +44,7 @@ defmodule Claper.EmbedsTest do assert {:ok, %Embed{} = embed} = Embeds.create_embed(valid_attrs) assert embed.title == "some title" + assert embed.content == "" end @@ -66,7 +67,9 @@ defmodule Claper.EmbedsTest do Embeds.update_embed(presentation_file.event_id, embed, update_attrs) assert embed.title == "some updated title" - assert embed.content == "" + + assert embed.content == + "" end test "update_embed/3 with invalid data returns error changeset" do From c11d29463ad963bb23015335d1f67c7854ee9943 Mon Sep 17 00:00:00 2001 From: Dhanus Date: Thu, 2 Nov 2023 19:51:42 +0530 Subject: [PATCH 15/21] feat: toggle active and inactive --- lib/claper/embeds.ex | 18 +++-- lib/claper/forms.ex | 18 +++-- lib/claper/polls.ex | 18 +++-- lib/claper_web/live/event_live/manage.ex | 78 ++++++++++++++++--- .../live/event_live/manage.html.heex | 30 ++++--- 5 files changed, 120 insertions(+), 42 deletions(-) diff --git a/lib/claper/embeds.ex b/lib/claper/embeds.ex index 1d244aa2..772b2156 100644 --- a/lib/claper/embeds.ex +++ b/lib/claper/embeds.ex @@ -157,20 +157,22 @@ defmodule Claper.Embeds do |> Repo.update_all(set: [enabled: false]) end - def set_default(id, presentation_file_id, position) 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]) + 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: true]) + |> Repo.update_all(set: [enabled: status]) end defp broadcast({:error, _reason} = error, _embed), do: error 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_web/live/event_live/manage.ex b/lib/claper_web/live/event_live/manage.ex index 148f231b..c441e0a8 100644 --- a/lib/claper_web/live/event_live/manage.ex +++ b/lib/claper_web/live/event_live/manage.ex @@ -204,14 +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) @@ -241,14 +242,15 @@ defmodule ClaperWeb.EventLive.Manage do |> 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) @@ -278,14 +280,15 @@ defmodule ClaperWeb.EventLive.Manage do |> assign(:embeds, list_embeds(socket, socket.assigns.event.presentation_file.id))} end - def handle_event("embed-set-default", %{"id" => id}, socket) do + 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_default( + Embeds.set_status( id, socket.assigns.event.presentation_file.id, - socket.assigns.state.position + socket.assigns.state.position, + true ) embed = Embeds.get_embed!(id) @@ -315,6 +318,63 @@ defmodule ClaperWeb.EventLive.Manage do |> 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", diff --git a/lib/claper_web/live/event_live/manage.html.heex b/lib/claper_web/live/event_live/manage.html.heex index c84bae63..2d310de8 100644 --- a/lib/claper_web/live/event_live/manage.html.heex +++ b/lib/claper_web/live/event_live/manage.html.heex @@ -448,7 +448,11 @@ <%= if @state.position == index do %> <%= if poll.enabled do %> - + <% else %> <% else %> <% else %>
    diff --git a/lib/claper_web/live/event_live/show.html.heex b/lib/claper_web/live/event_live/show.html.heex index b63c0fac..e7d4aa86 100644 --- a/lib/claper_web/live/event_live/show.html.heex +++ b/lib/claper_web/live/event_live/show.html.heex @@ -88,7 +88,7 @@
    <% end %> - <%= if @current_embed do %> + <%= if @current_embed != nil and @current_embed.attendee_visibility == true do %>
    ", position: 0, - enabled: true + enabled: true, + attendee_visibility: true }) |> Claper.Embeds.create_embed() From 4082d6a39acce798e0c3fca5d51339304dd9cb5b Mon Sep 17 00:00:00 2001 From: Dhanus Date: Fri, 10 Nov 2023 15:21:51 +0530 Subject: [PATCH 18/21] fix: shortcut toggle disabled in input fields --- lib/claper_web/views/components/input_component.ex | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/claper_web/views/components/input_component.ex b/lib/claper_web/views/components/input_component.ex index 864a5d14..844712c9 100644 --- a/lib/claper_web/views/components/input_component.ex +++ b/lib/claper_web/views/components/input_component.ex @@ -107,6 +107,18 @@ defmodule ClaperWeb.Component.Input do ~H""" + +
    @@ -918,7 +918,7 @@ <%= gettext("Show messages") %>(W) @@ -928,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) @@ -941,7 +941,7 @@ <%= gettext("Enable messages") %>(A) @@ -950,7 +950,7 @@ <%= gettext("Enable anonymous messages") %>(S) diff --git a/lib/claper_web/views/components/input_component.ex b/lib/claper_web/views/components/input_component.ex index 844712c9..864a5d14 100644 --- a/lib/claper_web/views/components/input_component.ex +++ b/lib/claper_web/views/components/input_component.ex @@ -107,18 +107,6 @@ defmodule ClaperWeb.Component.Input do ~H""" - -