Hide delete button when creating new folder

This commit is contained in:
Eike Kettner 2020-07-11 11:43:15 +02:00
parent 2ab0b5e222
commit 5bde78083a

View File

@ -342,7 +342,7 @@ view flags model =
viewButtons : Model -> List (Html Msg) viewButtons : Model -> List (Html Msg)
viewButtons _ = viewButtons model =
[ div [ class "ui divider" ] [] [ div [ class "ui divider" ] []
, button , button
[ class "ui button" [ class "ui button"
@ -351,7 +351,10 @@ viewButtons _ =
[ text "Back" [ text "Back"
] ]
, button , button
[ class "ui red button" [ classList
[ ( "ui red button", True )
, ( "invisible hidden", model.folder.id == "" )
]
, onClick RequestDelete , onClick RequestDelete
] ]
[ text "Delete" [ text "Delete"