Skip to content

Commit

Permalink
Update lib/beacon/live_admin/live/page_editor_live/form_component.ex
Browse files Browse the repository at this point in the history
Allow switching back to code editor

Co-authored-by: Leandro Pereira <leandro@leandro.io>
  • Loading branch information
ChristianTovar and leandrocp committed Jul 12, 2024
1 parent 8aeb0f7 commit c27e7a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ defmodule Beacon.LiveAdmin.PageEditorLive.FormComponent do
<.button :if={@live_action in [:new, :edit] && @editor == "code" && @page.format == :heex} type="button" phx-click="enable_editor" phx-value-editor="visual" class="uppercase">
Visual Editor
</.button>
<.button :if={@live_action == :edit && @editor == "visual"} type="button" phx-click="enable_editor" phx-value-editor="code" class="uppercase">Code Editor</.button>
<.button :if={@live_action in [:new, :edit] && @editor == "visual"} type="button" phx-click="enable_editor" phx-value-editor="code" class="uppercase">Code Editor</.button>
<.button :if={@live_action == :new} phx-disable-with="Saving..." form="page-form" class="uppercase">Create Draft Page</.button>
<.button :if={@live_action == :edit} phx-disable-with="Saving..." form="page-form" class="uppercase">Save Changes</.button>
<.button :if={@live_action == :edit} phx-click={show_modal("publish-confirm-modal")} phx-target={@myself} class="uppercase">Publish</.button>
Expand Down

0 comments on commit c27e7a4

Please sign in to comment.