diff --git a/lib/pinchflat/startup_tasks.ex b/lib/pinchflat/startup_tasks.ex index 41d0597..e4b1aec 100644 --- a/lib/pinchflat/startup_tasks.ex +++ b/lib/pinchflat/startup_tasks.ex @@ -32,5 +32,6 @@ defmodule Pinchflat.StartupTasks do defp apply_default_settings do Settings.fetch!(:onboarding, true) + Settings.fetch!(:pro_enabled, false) end end diff --git a/lib/pinchflat_web.ex b/lib/pinchflat_web.ex index b9b303a..e7fbc32 100644 --- a/lib/pinchflat_web.ex +++ b/lib/pinchflat_web.ex @@ -54,8 +54,9 @@ defmodule PinchflatWeb do def live_view do quote do - use Phoenix.LiveView, - layout: {PinchflatWeb.Layouts, :app} + use Phoenix.Component, global_prefixes: ~w(x-) + + use Phoenix.LiveView alias Pinchflat.Settings @@ -75,7 +76,7 @@ defmodule PinchflatWeb do def html do quote do - use Phoenix.Component + use Phoenix.Component, global_prefixes: ~w(x-) # Import convenience functions from controllers import Phoenix.Controller, diff --git a/lib/pinchflat_web/components/core_components.ex b/lib/pinchflat_web/components/core_components.ex index 3bd8486..67693c6 100644 --- a/lib/pinchflat_web/components/core_components.ex +++ b/lib/pinchflat_web/components/core_components.ex @@ -40,6 +40,7 @@ defmodule PinchflatWeb.CoreComponents do """ attr :id, :string, required: true attr :show, :boolean, default: false + attr :allow_close, :boolean, default: true attr :on_cancel, JS, default: %JS{} slot :inner_block, required: true @@ -50,9 +51,9 @@ defmodule PinchflatWeb.CoreComponents do phx-mounted={@show && show_modal(@id)} phx-remove={hide_modal(@id)} data-cancel={JS.exec(@on_cancel, "phx-remove")} - class="relative z-50 hidden" + class="relative z-99999 hidden" > -