From 69efbb60dee8a7d22619748255a6d3dd40328766 Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Mon, 25 Jan 2021 19:57:00 +0100 Subject: [PATCH] version should not be shown if it is empty (#278) --- src/Page/Packages.elm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Page/Packages.elm b/src/Page/Packages.elm index 9e0c0df..0487b67 100644 --- a/src/Page/Packages.elm +++ b/src/Page/Packages.elm @@ -381,11 +381,18 @@ viewResultItem channel showNixOSDetails show item = |> List.intersperse (text ", ") |> (\x -> [ li [] (List.append [ text "Licenses: " ] x) ]) ) + |> List.append + (if item.source.pversion == "" then + [] + + else + [ text "Version: " + , li [] [ text item.source.pversion ] + ] + ) |> List.append [ text "Name: " , li [] [ text item.source.pname ] - , text "Version: " - , li [] [ text item.source.pversion ] ] )