Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/mindwendel_web/live/idea_live/form_component.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
</div>
<% end %>
<%= for entry <- @uploads.attachment.entries do %>
<div class="d-flex align-items-center gap-2 mb-2">
<%= if Attachments.simplified_attached_file_type(entry.client_type) == "image" do %>
<.live_img_preview entry={entry} width="60" height="60" />
<% end %>
<span class="text-muted">{entry.client_name}</span>
</div>
<div :for={err <- upload_errors(@uploads.attachment, entry)} class="alert alert-danger">
{error_to_string(err)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ defmodule Mindwendel.Plugs.SetResponseHeaderContentSecurityPolicy do
"frame-src 'self' ;",

# We add csp sources https: to allow the browser to load the link preview image extracted from the idea body
"img-src 'self' data: https: ;",
# We add blob: to allow live_img_preview to display client-side upload previews
"img-src 'self' data: https: blob: ;",
"manifest-src 'self' ;",

# We need to add csp 'unsafe-eval', otherwise we get an error in development
Expand Down
10 changes: 5 additions & 5 deletions priv/gettext/de/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ msgstr "Achtung: Hiermit löschst du das Brainstorming und alle dazugehörigen I

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:34
#: lib/mindwendel_web/live/comment_live/form_component.html.heex:36
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:55
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:57
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:61
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:63
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:16
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:18
#, elixir-autogen, elixir-format
Expand Down Expand Up @@ -120,14 +120,14 @@ msgid "Proceed to your brainstorming"
msgstr "Weiter zu deinem Brainstorming"

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:39
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:60
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:66
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Save"
msgstr "Speichern"

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:38
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:59
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:65
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:20
#, elixir-autogen, elixir-format
msgid "Saving..."
Expand Down Expand Up @@ -472,7 +472,7 @@ msgid "Additional Attachment"
msgstr "Zusätzlicher Anhang"

#: lib/mindwendel_web/live/idea_live/card_component.html.heex:83
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:43
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:49
#: lib/mindwendel_web/live/idea_live/show_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "No filename"
Expand Down
10 changes: 5 additions & 5 deletions priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ msgstr ""

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:34
#: lib/mindwendel_web/live/comment_live/form_component.html.heex:36
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:55
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:57
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:61
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:63
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:16
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:18
#, elixir-autogen, elixir-format
Expand Down Expand Up @@ -119,14 +119,14 @@ msgid "Proceed to your brainstorming"
msgstr ""

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:39
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:60
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:66
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Save"
msgstr ""

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:38
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:59
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:65
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:20
#, elixir-autogen, elixir-format
msgid "Saving..."
Expand Down Expand Up @@ -471,7 +471,7 @@ msgid "Additional Attachment"
msgstr ""

#: lib/mindwendel_web/live/idea_live/card_component.html.heex:83
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:43
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:49
#: lib/mindwendel_web/live/idea_live/show_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "No filename"
Expand Down
10 changes: 5 additions & 5 deletions priv/gettext/en/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ msgstr ""

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:34
#: lib/mindwendel_web/live/comment_live/form_component.html.heex:36
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:55
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:57
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:61
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:63
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:16
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:18
#, elixir-autogen, elixir-format
Expand Down Expand Up @@ -120,14 +120,14 @@ msgid "Proceed to your brainstorming"
msgstr ""

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:39
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:60
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:66
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Save"
msgstr ""

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:38
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:59
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:65
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:20
#, elixir-autogen, elixir-format
msgid "Saving..."
Expand Down Expand Up @@ -472,7 +472,7 @@ msgid "Additional Attachment"
msgstr ""

#: lib/mindwendel_web/live/idea_live/card_component.html.heex:83
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:43
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:49
#: lib/mindwendel_web/live/idea_live/show_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "No filename"
Expand Down
10 changes: 5 additions & 5 deletions priv/gettext/it/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ msgstr "Attenzione: Questo cancellerà il brainstorming con tutte le idee associ

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:34
#: lib/mindwendel_web/live/comment_live/form_component.html.heex:36
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:55
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:57
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:61
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:63
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:16
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:18
#, elixir-autogen, elixir-format
Expand Down Expand Up @@ -118,14 +118,14 @@ msgid "Proceed to your brainstorming"
msgstr "Procedi al tuo brainstorming"

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:39
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:60
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:66
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:21
#, elixir-autogen, elixir-format
msgid "Save"
msgstr "Salva"

#: lib/mindwendel_web/live/comment_live/form_component.html.heex:38
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:59
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:65
#: lib/mindwendel_web/live/lane_live/form_component.html.heex:20
#, elixir-autogen, elixir-format
msgid "Saving..."
Expand Down Expand Up @@ -469,7 +469,7 @@ msgid "Additional Attachment"
msgstr "Allegato aggiuntivo"

#: lib/mindwendel_web/live/idea_live/card_component.html.heex:83
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:43
#: lib/mindwendel_web/live/idea_live/form_component.html.heex:49
#: lib/mindwendel_web/live/idea_live/show_component.html.heex:27
#, elixir-autogen, elixir-format
msgid "No filename"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ defmodule MindwendelWeb.ResponseHeaderContentSecurityPolicyTest do

assert conn_response
|> get_resp_header("content-security-policy")
|> List.first() =~ ~r/(img-src)\s+('self' data: https:) ;/
|> List.first() =~ ~r/(img-src)\s+('self' data: https: blob:) ;/
end
end

Expand Down