File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
lib/nerves_hub_web/components/device_page Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -199,12 +199,11 @@ defmodule NervesHubWeb.Components.DevicePage.DetailsTab do
199199 < div class = "text-neutral-50 font-medium leading-6 " > Alarms</ div >
200200 </ div >
201201
202- < div class = "flex pt-2 px-4 pb-4 gap-2 items-center " >
203- < div :for = { { alarm , description } <- @ alarms } >
204- < div class = "flex gap-3 items-center " >
205- < code class = "text-sm text-red-500 px-2 py-1 border border-red-500 bg-zinc-800 rounded " > { alarm } </ code >
206- < code :if = { has_description? ( description ) } > { description } </ code >
207- </ div >
202+ < div class = "flex flex-col pt-2 px-4 pb-4 gap-2 " >
203+ < div :for = { { alarm , description } <- @ alarms } class = "flex gap-3 items-center " >
204+ < code class = "text-sm text-red-500 px-2 py-1 border border-red-500 bg-zinc-800 rounded " > { alarm } </ code >
205+ < code :if = { has_description? ( description ) } > { description } </ code >
206+ < span :if = { ! has_description? ( description ) } class = "text-nerves-gray-500 " > No description</ span >
208207 </ div >
209208 </ div >
210209
@@ -877,6 +876,6 @@ defmodule NervesHubWeb.Components.DevicePage.DetailsTab do
877876 |> Enum . map ( & to_string / 1 )
878877
879878 defp has_description? ( description ) do
880- is_binary ( description ) and byte_size ( description ) > 0
879+ is_binary ( description ) and byte_size ( description ) > 0 and description != "[]"
881880 end
882881end
You can’t perform that action at this time.
0 commit comments