version should not be shown if it is empty (#278)

This commit is contained in:
Rok Garbas 2021-01-25 19:57:00 +01:00 committed by GitHub
parent b208c24872
commit 69efbb60de
Failed to generate hash of commit

View file

@ -381,11 +381,18 @@ viewResultItem channel showNixOSDetails show item =
|> List.intersperse (text ", ") |> List.intersperse (text ", ")
|> (\x -> [ li [] (List.append [ text "Licenses: " ] x) ]) |> (\x -> [ li [] (List.append [ text "Licenses: " ] x) ])
) )
|> List.append
(if item.source.pversion == "" then
[]
else
[ text "Version: "
, li [] [ text item.source.pversion ]
]
)
|> List.append |> List.append
[ text "Name: " [ text "Name: "
, li [] [ text item.source.pname ] , li [] [ text item.source.pname ]
, text "Version: "
, li [] [ text item.source.pversion ]
] ]
) )