Update Deepl translation

Now getting auth-key from db.
This commit is contained in:
Thelonius Kort
2023-01-09 21:29:19 +01:00
parent 3cd9d983fe
commit 71e6a8da60
4 changed files with 111 additions and 82 deletions

View File

@ -17,6 +17,7 @@ defmodule OutlookWeb.TranslationLive.NewEdit do
action={@live_action}
translation={@translation}
translation_content={@translation_content}
current_user={@current_user}
navigate={~p"/translations"}
/>
"""
@ -56,4 +57,9 @@ defmodule OutlookWeb.TranslationLive.NewEdit do
send_update(self(), FormComponent, progress: payload.progress, id: @form_cmpnt_id)
{:noreply, socket}
end
def handle_info({:translation, payload}, socket) do
send_update(self(), FormComponent, deepl_translation: payload, id: @form_cmpnt_id)
{:noreply, socket}
end
end