mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
icons on ip/fp info
This commit is contained in:
parent
37e620aee9
commit
64d789c357
1 changed files with 15 additions and 3 deletions
|
@ -127,14 +127,26 @@ defmodule PhilomenaWeb.AppView do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp text_or_na(nil), do: "N/A"
|
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
|
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
|
end
|
||||||
|
|
||||||
def link_to_fingerprint(conn, fp) do
|
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
|
end
|
||||||
|
|
||||||
def blank?(nil), do: true
|
def blank?(nil), do: true
|
||||||
|
|
Loading…
Reference in a new issue