You've already forked tribes-plugin-aether
forked from tribes/tribes-plugin-template
31 lines
794 B
Elixir
31 lines
794 B
Elixir
defmodule AetherWeb.HomeLive do
|
|
@moduledoc """
|
|
Example LiveView page for the plugin.
|
|
|
|
This page is registered in the plugin spec and mounted by the host
|
|
at /plugins/aether.
|
|
"""
|
|
|
|
# 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/aether_web/live/home_live.ex</code>.
|
|
</p>
|
|
</div>
|
|
"""
|
|
end
|
|
end
|