From 5bde78083a3ef25f87218a4890c0d076eae5af73 Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sat, 11 Jul 2020 11:43:15 +0200 Subject: [PATCH] Hide delete button when creating new folder --- modules/webapp/src/main/elm/Comp/FolderDetail.elm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/webapp/src/main/elm/Comp/FolderDetail.elm b/modules/webapp/src/main/elm/Comp/FolderDetail.elm index f3e44abc..6bf3aac7 100644 --- a/modules/webapp/src/main/elm/Comp/FolderDetail.elm +++ b/modules/webapp/src/main/elm/Comp/FolderDetail.elm @@ -342,7 +342,7 @@ view flags model = viewButtons : Model -> List (Html Msg) -viewButtons _ = +viewButtons model = [ div [ class "ui divider" ] [] , button [ class "ui button" @@ -351,7 +351,10 @@ viewButtons _ = [ text "Back" ] , button - [ class "ui red button" + [ classList + [ ( "ui red button", True ) + , ( "invisible hidden", model.folder.id == "" ) + ] , onClick RequestDelete ] [ text "Delete"