Skip to content

Commit

Permalink
fix teaser feature flag in brainstorming show (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Jan 8, 2025
1 parent 1030a70 commit e24e188
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
9 changes: 8 additions & 1 deletion lib/mindwendel_web/live/brainstorming_live/show.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ defmodule MindwendelWeb.BrainstormingLive.Show do
alias Mindwendel.Ideas
alias Mindwendel.Brainstormings.Idea
alias Mindwendel.Brainstormings.Lane
alias Mindwendel.FeatureFlag
alias Mindwendel.LocalStorage

@impl true
Expand Down Expand Up @@ -41,7 +42,7 @@ defmodule MindwendelWeb.BrainstormingLive.Show do
|> assign(:lanes, lanes)
|> assign(:filtered_labels, brainstorming.filter_labels_ids)
|> assign(:current_user, current_user)
|> assign(:inspiration, Mindwendel.Help.random_inspiration())
|> assign(:inspiration, inspiration())
}

{:error, _} ->
Expand Down Expand Up @@ -201,4 +202,10 @@ defmodule MindwendelWeb.BrainstormingLive.Show do
socket
|> assign(:page_title, socket.assigns.brainstorming.name)
end

defp inspiration do
if FeatureFlag.enabled?(:feature_brainstorming_teasers) do
Mindwendel.Help.random_inspiration()
end
end
end
8 changes: 4 additions & 4 deletions priv/gettext/de/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ msgstr "Wie können wir ..."
msgid "Ready?"
msgstr "Fertig?"

#: lib/mindwendel_web/live/brainstorming_live/show.ex:197
#: lib/mindwendel_web/live/brainstorming_live/show.ex:198
#, elixir-autogen, elixir-format
msgid "%{name} - Edit"
msgstr "%{name} - Editieren"

#: lib/mindwendel_web/live/brainstorming_live/show.ex:174
#: lib/mindwendel_web/live/brainstorming_live/show.ex:175
#, elixir-autogen, elixir-format
msgid "%{name} - New Idea"
msgstr "%{name} - Neue Idee"
Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr "Löschen"
msgid "Type the label name"
msgstr "Gebe dem Label einen Namen"

#: lib/mindwendel_web/live/brainstorming_live/show.ex:184
#: lib/mindwendel_web/live/brainstorming_live/show.ex:185
#, elixir-autogen, elixir-format, fuzzy
msgid "%{name} - New Lane"
msgstr "%{name} - Neue Idee"
Expand Down Expand Up @@ -563,7 +563,7 @@ msgstr "Detailansicht"
msgid "Give moderating permissions"
msgstr "Änderungen erlauben"

#: lib/mindwendel_web/live/brainstorming_live/show.ex:51
#: lib/mindwendel_web/live/brainstorming_live/show.ex:52
#, elixir-autogen, elixir-format, fuzzy
msgid "Brainstorming not found"
msgstr "Brainstorming konnte nicht gefunden werden"
8 changes: 4 additions & 4 deletions priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ msgstr ""
msgid "Ready?"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:197
#: lib/mindwendel_web/live/brainstorming_live/show.ex:198
#, elixir-autogen, elixir-format
msgid "%{name} - Edit"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:174
#: lib/mindwendel_web/live/brainstorming_live/show.ex:175
#, elixir-autogen, elixir-format
msgid "%{name} - New Idea"
msgstr ""
Expand Down Expand Up @@ -384,7 +384,7 @@ msgstr ""
msgid "Type the label name"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:184
#: lib/mindwendel_web/live/brainstorming_live/show.ex:185
#, elixir-autogen, elixir-format
msgid "%{name} - New Lane"
msgstr ""
Expand Down Expand Up @@ -562,7 +562,7 @@ msgstr ""
msgid "Give moderating permissions"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:51
#: lib/mindwendel_web/live/brainstorming_live/show.ex:52
#, elixir-autogen, elixir-format
msgid "Brainstorming not found"
msgstr ""
8 changes: 4 additions & 4 deletions priv/gettext/en/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ msgstr ""
msgid "Ready?"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:197
#: lib/mindwendel_web/live/brainstorming_live/show.ex:198
#, elixir-autogen, elixir-format
msgid "%{name} - Edit"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:174
#: lib/mindwendel_web/live/brainstorming_live/show.ex:175
#, elixir-autogen, elixir-format
msgid "%{name} - New Idea"
msgstr ""
Expand Down Expand Up @@ -385,7 +385,7 @@ msgstr ""
msgid "Type the label name"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:184
#: lib/mindwendel_web/live/brainstorming_live/show.ex:185
#, elixir-autogen, elixir-format, fuzzy
msgid "%{name} - New Lane"
msgstr ""
Expand Down Expand Up @@ -563,7 +563,7 @@ msgstr ""
msgid "Give moderating permissions"
msgstr ""

#: lib/mindwendel_web/live/brainstorming_live/show.ex:51
#: lib/mindwendel_web/live/brainstorming_live/show.ex:52
#, elixir-autogen, elixir-format, fuzzy
msgid "Brainstorming not found"
msgstr ""

0 comments on commit e24e188

Please sign in to comment.