- <%= live_redirect("Back to Devices", to: Routes.device_index_path(@socket, :index), class: "button") %>
+ <%= link("Back to Devices", to: Routes.device_index_path(@socket, :index), class: "button") %>
diff --git a/apps/fz_http/lib/fz_http_web/live/device_live/show_live.ex b/apps/fz_http/lib/fz_http_web/live/device_live/show_live.ex
index ed495da16..cb1f49140 100644
--- a/apps/fz_http/lib/fz_http_web/live/device_live/show_live.ex
+++ b/apps/fz_http/lib/fz_http_web/live/device_live/show_live.ex
@@ -50,7 +50,7 @@ defmodule FzHttpWeb.DeviceLive.Show do
assign(
socket,
device: device,
- page_heading: device.name,
+ page_title: device.name,
wireguard_endpoint_ip: Application.fetch_env!(:fz_vpn, :wireguard_endpoint_ip),
wireguard_port: Application.fetch_env!(:fz_vpn, :wireguard_port)
)
diff --git a/apps/fz_http/lib/fz_http_web/live/rule_live/index.html.leex b/apps/fz_http/lib/fz_http_web/live/rule_live/index.html.heex
similarity index 100%
rename from apps/fz_http/lib/fz_http_web/live/rule_live/index.html.leex
rename to apps/fz_http/lib/fz_http_web/live/rule_live/index.html.heex
diff --git a/apps/fz_http/lib/fz_http_web/live/rule_live/index_live.ex b/apps/fz_http/lib/fz_http_web/live/rule_live/index_live.ex
index 1c4d6ac09..7b7883784 100644
--- a/apps/fz_http/lib/fz_http_web/live/rule_live/index_live.ex
+++ b/apps/fz_http/lib/fz_http_web/live/rule_live/index_live.ex
@@ -8,6 +8,6 @@ defmodule FzHttpWeb.RuleLive.Index do
{:ok,
socket
|> assign_defaults(params, session)
- |> assign(:page_heading, "Rules")}
+ |> assign(:page_title, "Rules")}
end
end
diff --git a/apps/fz_http/lib/fz_http_web/live/rule_live/rule_list_component.html.heex b/apps/fz_http/lib/fz_http_web/live/rule_live/rule_list_component.html.heex
new file mode 100644
index 000000000..bd00032cf
--- /dev/null
+++ b/apps/fz_http/lib/fz_http_web/live/rule_live/rule_list_component.html.heex
@@ -0,0 +1,51 @@
+
+
<%= @title %>
+
+ <.form let={f} for={@changeset} id={"#{@action}-form"} phx-target={@myself} phx-submit="add_rule">
+ <%= hidden_input f, :action, value: @action %>
+
+
+ <%= text_input f,
+ :destination,
+ class: "input",
+ placeholder: "IPv4/6 CIDR range or address" %>
+
+
+ <%= submit "Add", class: "button is-primary" %>
+
+
+
+ <%= error_tag f, :destination %>
+
+
+
+ <%= if length(@rule_list) > 0 do %>
+
+
+
+ | Destination |
+ |
+
+
+
+ <%= for rule <- @rule_list do %>
+
+ |
+
+ <%= rule.destination %>
+
+ |
+
+
+ Delete
+
+ |
+
+ <% end %>
+
+
+ <% end %>
+
diff --git a/apps/fz_http/lib/fz_http_web/live/rule_live/rule_list_component.html.leex b/apps/fz_http/lib/fz_http_web/live/rule_live/rule_list_component.html.leex
deleted file mode 100644
index 6b271cec4..000000000
--- a/apps/fz_http/lib/fz_http_web/live/rule_live/rule_list_component.html.leex
+++ /dev/null
@@ -1,57 +0,0 @@
-
<%= @title %>
-
-<%= f = form_for @changeset, "#", [id: "#{@action}-form", phx_target: @myself, phx_submit: :add_rule] %>
- <%= hidden_input f, :action, value: @action %>
-
-
- <%= text_input f,
- :destination,
- class: "input",
- placeholder: "IPv4/6 CIDR range or address" %>
-
-
- <%= submit "Add", class: "button is-primary" %>
-
-
-
- <%= error_tag f, :destination %>
-
-
- <%= if @changeset.action do %>
-
-
- <%= aggregated_errors(@changeset) %>
-
-
- <% end %>
-
-
-<%= if length(@rule_list) > 0 do %>
-
-
-
- | Destination |
- |
-
-
-
- <%= for rule <- @rule_list do %>
-
- |
-
- <%= rule.destination %>
-
- |
-
-
- Delete
-
- |
-
- <% end %>
-
-
-<% end %>
diff --git a/apps/fz_http/lib/fz_http_web/live/user_live/new.html.leex b/apps/fz_http/lib/fz_http_web/live/user_live/new.html.leex
deleted file mode 100644
index e4db6901e..000000000
--- a/apps/fz_http/lib/fz_http_web/live/user_live/new.html.leex
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
Sign Up
-
-
- <%= f = form_for @changeset, "#", [id: "create-user", phx_submit: :create_user] %>
- <%= if @changeset.action do %>
-
-
- <%= aggregated_errors(@changeset) %>
-
-
- <% end %>
-
-
- <%= label(f, :email, class: "label") %>
-
- <%= text_input(f, :email, class: "input") %>
-
-
- <%= error_tag f, :email %>
-
-
-
-
- <%= label(f, :password, class: "label") %>
-
- <%= password_input(f, :password, class: "input") %>
-
-
- <%= error_tag f, :password %>
-
-
-
-
- <%= label(f, :password_confirmation, class: "label") %>
-
- <%= password_input(f, :password_confirmation, class: "input") %>
-
-
- <%= error_tag f, :password_confirmation %>
-
-
-
-
-
- <%= submit "Sign Up", class: "button is-primary" %>
-
-
-
-
-
-
diff --git a/apps/fz_http/lib/fz_http_web/live/user_live/new_live.ex b/apps/fz_http/lib/fz_http_web/live/user_live/new_live.ex
deleted file mode 100644
index 80c0f1970..000000000
--- a/apps/fz_http/lib/fz_http_web/live/user_live/new_live.ex
+++ /dev/null
@@ -1,28 +0,0 @@
-defmodule FzHttpWeb.UserLive.New do
- @moduledoc """
- LiveView for user sign up.
- """
- use FzHttpWeb, :live_view
-
- alias FzHttp.Users
-
- def mount(_params, _session, socket) do
- changeset = Users.new_user()
- {:ok, assign(socket, :changeset, changeset)}
- end
-
- def handle_event("create_user", %{"user" => user_params}, socket) do
- case Users.create_user(user_params) do
- {:ok, user} ->
- {:noreply,
- socket
- |> redirect(to: Routes.session_path(socket, :create, user.sign_in_token))}
-
- {:error, changeset} ->
- {:noreply,
- socket
- |> put_flash(:error, "Error creating user.")
- |> assign(:changeset, changeset)}
- end
- end
-end
diff --git a/apps/fz_http/lib/fz_http_web/templates/layout/app.html.eex b/apps/fz_http/lib/fz_http_web/templates/layout/app.html.eex
index 4ceea4176..f3e9b5f90 100644
--- a/apps/fz_http/lib/fz_http_web/templates/layout/app.html.eex
+++ b/apps/fz_http/lib/fz_http_web/templates/layout/app.html.eex
@@ -18,7 +18,6 @@
<% end %>
<% end %>
-