fix: quick action translate and validate apply now use tasks
This commit is contained in:
@@ -5,7 +5,7 @@ defmodule BDS.Desktop.ShellLive.Bridges do
|
||||
import Phoenix.LiveView, only: [connected?: 1, send_update: 2]
|
||||
|
||||
alias BDS.Desktop.ShellData
|
||||
alias BDS.Desktop.ShellLive.{ChatEditor, PostEditor}
|
||||
alias BDS.Desktop.ShellLive.{ChatEditor, MediaEditor, PostEditor}
|
||||
alias BDS.Desktop.ShellLive.{CliSync, SessionUtil}
|
||||
alias BDS.UI.Workbench
|
||||
|
||||
@@ -216,6 +216,26 @@ defmodule BDS.Desktop.ShellLive.Bridges do
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_info({:editor_translation_completed, :post, post_id, language}, socket, _callbacks) do
|
||||
send_update(PostEditor,
|
||||
id: "post-editor-#{post_id}",
|
||||
action: :translation_completed,
|
||||
language: language
|
||||
)
|
||||
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_info({:editor_translation_completed, :media, media_id, language}, socket, _callbacks) do
|
||||
send_update(MediaEditor,
|
||||
id: "media-editor-#{media_id}",
|
||||
action: :translation_completed,
|
||||
language: language
|
||||
)
|
||||
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
def handle_info({:post_editor_apply_ai_suggestions, post_id, fields}, socket, _callbacks) do
|
||||
send_update(PostEditor,
|
||||
id: "post-editor-#{post_id}",
|
||||
|
||||
Reference in New Issue
Block a user