diff --git a/.formatter.exs b/.formatter.exs index 27607cac3e..f5dc212279 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -9,6 +9,6 @@ "mix.exs", ".formatter.exs" ], - # plugins: [Phoenix.LiveView.HTMLFormatter], + plugins: [Phoenix.LiveView.HTMLFormatter], inputs: ["*.{heex,ex,exs}", "{config,lib,test}/**/*.{heex,ex,exs}", "priv/*/seeds.exs"] ] diff --git a/lib/sanbase_web/components/layouts/app.html.heex b/lib/sanbase_web/components/layouts/app.html.heex index 0afbd61bd6..82d5a624c8 100644 --- a/lib/sanbase_web/components/layouts/app.html.heex +++ b/lib/sanbase_web/components/layouts/app.html.heex @@ -1,7 +1,7 @@
-
+
<.flash_group flash={@flash} /> <%= @inner_content %>
diff --git a/lib/sanbase_web/live/monitored_twitter_handle/monitored_twitter_handle_live.ex b/lib/sanbase_web/live/monitored_twitter_handle/monitored_twitter_handle_live.ex index ca8a9f0454..a03e97ef4f 100644 --- a/lib/sanbase_web/live/monitored_twitter_handle/monitored_twitter_handle_live.ex +++ b/lib/sanbase_web/live/monitored_twitter_handle/monitored_twitter_handle_live.ex @@ -7,10 +7,18 @@ defmodule SanbaseWeb.MonitoredTwitterHandleLive do def render(assigns) do ~H"""
-
+
<.table id="monitored_twitter_handles" rows={@handles}> - <:col :let={row} label="Status">

<%= row.status |> String.replace("_", " ") |> String.upcase() %>

- <:col :let={row} label="Twitter Handle (Clickable link)"><.link class="underline text-blue-600" href={"https://x.com/#{row.handle}"}><%= row.handle %> + <:col :let={row} label="Status"> +

+ <%= row.status |> String.replace("_", " ") |> String.upcase() %> +

+ + <:col :let={row} label="Twitter Handle (Clickable link)"> + <.link class="underline text-blue-600" href={"https://x.com/#{row.handle}"}> + <%= row.handle %> + + <:col :let={row} label="Notes"><%= row.notes %> <:col :let={row} label="User ID"><%= row.user_id %> <:col :let={row} label="Username"><%= row.user_username %> @@ -18,10 +26,22 @@ defmodule SanbaseWeb.MonitoredTwitterHandleLive do <:col :let={row} label="Moderator comment"><%= row.comment %> <:action :let={row}> <.form for={@form} phx-submit="update_status"> - <.input type="text" field={@form[:comment]} placeholder="Comment..." /> + <.input type="text" class="" field={@form[:comment]} placeholder="Comment..." /> - <.button name="status" value="approved">Approve - <.button name="status" value="declined">Decline + <.button + name="status" + value="approved" + class="my-1 focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800" + > + Approve + + <.button + name="status" + value="declined" + class="my-1 focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900" + > + Decline +