Skip to content

Commit

Permalink
Remove unused ui code
Browse files Browse the repository at this point in the history
  • Loading branch information
eikek committed May 16, 2021
1 parent 439ffa3 commit da039fd
Showing 1 changed file with 1 addition and 57 deletions.
58 changes: 1 addition & 57 deletions modules/webapp/src/main/elm/Comp/Progress.elm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ progress2 : Int -> Html msg
progress2 percent =
div [ class "shadow w-full h-full bg-gray-200 dark:bg-bluegray-600 rounded relative" ]
[ div
[ class "transition-duration-300 h-full bg-blue-500 dark:bg-light-blue-500 block text-xs text-center"
[ class "transition-duration-300 h-full bg-blue-500 dark:bg-lightblue-500 block text-xs text-center"
, style "width" (String.fromInt percent ++ "%")
]
[]
Expand All @@ -21,59 +21,3 @@ progress2 percent =
, text "%"
]
]


smallIndicating : Int -> Html msg
smallIndicating percent =
progress "small indicating active" percent Nothing Nothing


topAttachedIndicating : Int -> Html msg
topAttachedIndicating percent =
progress "top attached indicating active" percent Nothing Nothing


progress : String -> Int -> Maybe String -> Maybe String -> Html msg
progress classes percent label barText =
if percent <= 0 then
div
[ class ("ui progress " ++ classes)
]
(div [ class "bar" ] (barDiv barText) :: labelDiv label)

else
div
[ class ("ui progress " ++ classes)
, attribute "data-percent" (String.fromInt percent)
]
(div
[ class "bar"
, style "transition-duration" "300ms"
, style "display" "block"
, style "width" (String.fromInt percent ++ "%")
]
(barDiv barText)
:: labelDiv label
)


labelDiv : Maybe String -> List (Html msg)
labelDiv label =
case label of
Just l ->
[ div [ class "label" ] [ text l ]
]

Nothing ->
[]


barDiv : Maybe String -> List (Html msg)
barDiv barText =
case barText of
Just t ->
[ div [ class "progress" ] [ text t ]
]

Nothing ->
[]

0 comments on commit da039fd

Please sign in to comment.