mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
17 lines
403 B
Elixir
17 lines
403 B
Elixir
defmodule PhilomenaWeb.Admin.FingerprintBanView do
|
|
use PhilomenaWeb, :view
|
|
|
|
alias PhilomenaWeb.ProfileView
|
|
|
|
defp user_abbrv(conn, user),
|
|
do: ProfileView.user_abbrv(conn, user)
|
|
|
|
defp ban_row_class(%{valid_until: until, enabled: enabled}) do
|
|
now = DateTime.utc_now()
|
|
|
|
case enabled and DateTime.diff(until, now) > 0 do
|
|
true -> "success"
|
|
_false -> "danger"
|
|
end
|
|
end
|
|
end
|