Files
tribes-plugin-aether/lib/my_plugin_web/live/home_live.ex
2026-03-25 12:42:19 +01:00

31 lines
802 B
Elixir

defmodule MyPluginWeb.HomeLive do
@moduledoc """
Example LiveView page for the plugin.
This page is registered in the plugin spec and mounted by the host
at /plugins/my_plugin.
"""
# In dev mode (plugin loaded as path dep), you can use host macros:
# use TribesWeb, :live_view
#
# For release builds (standalone OTP app), use Phoenix.LiveView directly:
use Phoenix.LiveView
def mount(_params, _session, socket) do
{:ok, assign(socket, :page_title, "My Plugin")}
end
def render(assigns) do
~H"""
<div class="p-6">
<h1 class="text-2xl font-bold">My Plugin</h1>
<p class="mt-2 text-base-content/70">
This is a Tribes plugin. Edit this page in
<code>lib/my_plugin_web/live/home_live.ex</code>.
</p>
</div>
"""
end
end