diff options
author | Yorhel <git@yorhel.nl> | 2020-03-03 09:25:05 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-03-03 09:25:05 +0100 |
commit | 16ad7062563fc6d41dedb17857554c4b61617786 (patch) | |
tree | b6a8ef64706442a63eeaf03eda05f0327d1f674d /elm/Lib/ExtLinks.elm | |
parent | 0c9494d2b7abc284f40e696704e6336a7e4a32eb (diff) |
Lib.ExtLinks: Fix "edit" button to show "add" when adding a new link
Diffstat (limited to 'elm/Lib/ExtLinks.elm')
-rw-r--r-- | elm/Lib/ExtLinks.elm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elm/Lib/ExtLinks.elm b/elm/Lib/ExtLinks.elm index a86c3634..c2a48598 100644 --- a/elm/Lib/ExtLinks.elm +++ b/elm/Lib/ExtLinks.elm @@ -102,7 +102,7 @@ view model = Html.form [ onSubmit Enter ] (_, Unrecognized) -> b [ class "standout" ] [ br [] [], text "Invalid or unrecognized URL." ] (_, Duplicate) -> b [ class "standout" ] [ br [] [], text "URL is already listed." ] (_, Add (s, _)) -> span [] - [ inputButton (if s.multi then "Add" else "Edit") Enter [] + [ inputButton (if s.multi || List.isEmpty (s.links model.links) then "Add" else "Edit") Enter [] , br [] [], text <| "URL recognized as: " ++ s.name ] ] |