From 1e12a585b1408ea948612eeec1d62fafbdda28fa Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Thu, 25 Mar 2021 18:17:33 -0700 Subject: [PATCH] text-centered --- .../live/device_live/rule_list_component.ex | 2 +- .../device_live/rule_list_component.html.leex | 2 +- .../live/device_live/show.html.leex | 26 +++++++++++-------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.ex b/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.ex index 19d9a813a..f0471bb4f 100644 --- a/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.ex +++ b/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.ex @@ -20,7 +20,7 @@ defmodule FgHttpWeb.DeviceLive.RuleListComponent do @impl true def handle_event("add_rule", %{"rule" => rule_params}, socket) do - if rule_params["device_id"] == socket.assigns.device_id do + if rule_params["device_id"] == "#{socket.assigns.device_id}" do case Rules.create_rule(rule_params) do {:ok, _rule} -> {:noreply, assign(socket, rule_list: rule_list(socket.assigns))} diff --git a/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.html.leex b/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.html.leex index b4835a870..ba93ffb84 100644 --- a/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.html.leex +++ b/apps/fg_http/lib/fg_http_web/live/device_live/rule_list_component.html.leex @@ -1,4 +1,4 @@ -
+

<%= @title %>

<%= f = form_for @changeset, "#", [phx_target: @myself, phx_submit: :add_rule] %> <%= hidden_input f, :action, value: @action %> diff --git a/apps/fg_http/lib/fg_http_web/live/device_live/show.html.leex b/apps/fg_http/lib/fg_http_web/live/device_live/show.html.leex index 6d519bba1..5341a73d6 100644 --- a/apps/fg_http/lib/fg_http_web/live/device_live/show.html.leex +++ b/apps/fg_http/lib/fg_http_web/live/device_live/show.html.leex @@ -10,8 +10,8 @@ <% end %>

<%= @device.name %>

-
-
+
+

Details

@@ -70,12 +70,13 @@
-
+

Config

-
- Add the following to your WireGuard™ configuration file: -
-

+    
+
+ Add the following to your WireGuard™ configuration file: +
+

 [Interface]
 PrivateKey = <%= @device.private_key %>
 Address = 172.16.99.1/24
@@ -86,10 +87,13 @@ PublicKey = <%= @device.server_public_key %>
 PresharedKey = <%= @device.preshared_key %>
 AllowedIPs = 0.0.0.0/0, ::/0
 Endpoint = <%= Application.fetch_env!(:fg_http, :vpn_endpoint) %>
-
- Or scan the QR code with your mobile phone: -
- +
+ Or scan the QR code with your mobile phone: +
+
+ +
+