From 64d789c357ddc06b07bcd82729383136f1864ea1 Mon Sep 17 00:00:00 2001 From: Luna D Date: Tue, 10 Dec 2019 11:29:54 -0500 Subject: [PATCH] icons on ip/fp info --- lib/philomena_web/views/app_view.ex | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/philomena_web/views/app_view.ex b/lib/philomena_web/views/app_view.ex index b3b5ff3c..86fb5a80 100644 --- a/lib/philomena_web/views/app_view.ex +++ b/lib/philomena_web/views/app_view.ex @@ -127,14 +127,26 @@ defmodule PhilomenaWeb.AppView do end defp text_or_na(nil), do: "N/A" - defp text_or_na(text), do: text + defp text_or_na(text), do: to_string(text) def link_to_ip(conn, ip) do - link(text_or_na(ip), to: Routes.ip_profile_path(conn, :show, to_string(ip))) + link(to: Routes.ip_profile_path(conn, :show, to_string(ip))) do + [ + content_tag(:i, "", class: "fas fa-network-wired"), + " ", + text_or_na(ip) + ] + end end def link_to_fingerprint(conn, fp) do - link(String.slice(text_or_na(fp), 0..6), to: Routes.fingerprint_profile_path(conn, :show, fp)) + link(to: Routes.fingerprint_profile_path(conn, :show, fp)) do + [ + content_tag(:i, "", class: "fas fa-desktop"), + " ", + String.slice(text_or_na(fp), 0..6) + ] + end end def blank?(nil), do: true