prop/vendor/oban_web/lib/oban/web.ex
Graham McIntire caad7d90a7 Mount Oban Web dashboard at /admin/oban
Vendor oban_web 2.12.1 and oban_met 1.1.0 (taken from the
towerops-web2 vendor tree), bump oban to ~> 2.21, and mount the Oban
dashboard at /admin/oban behind the existing require_admin on_mount
hook. Adds an admin-only "Oban" nav link and extends the Dockerfile
to copy vendor/ before deps.get so production builds pick up the
path dependencies.
2026-04-09 14:07:33 -05:00

53 lines
912 B
Elixir

defmodule Oban.Web do
@moduledoc false
alias Oban.Web.Layouts
def html do
quote do
@moduledoc false
import Phoenix.Controller, only: [get_csrf_token: 0, view_module: 1, view_template: 1]
unquote(html_helpers())
end
end
def live_view do
quote do
@moduledoc false
use Phoenix.LiveView, layout: {Layouts, :live}
unquote(html_helpers())
end
end
def live_component do
quote do
@moduledoc false
use Phoenix.LiveComponent
unquote(html_helpers())
end
end
defp html_helpers do
quote do
use Phoenix.Component
import Oban.Web.Helpers
import Phoenix.HTML
import Phoenix.LiveView.Helpers
alias Oban.Web.Components.{Core, Icons}
alias Phoenix.LiveView.JS
end
end
@doc false
defmacro __using__(which) when is_atom(which) do
apply(__MODULE__, which, [])
end
end