summaryrefslogtreecommitdiff
path: root/elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-03-03 09:25:05 +0100
committerYorhel <git@yorhel.nl>2020-03-03 09:25:05 +0100
commit16ad7062563fc6d41dedb17857554c4b61617786 (patch)
treeb6a8ef64706442a63eeaf03eda05f0327d1f674d /elm
parent0c9494d2b7abc284f40e696704e6336a7e4a32eb (diff)
Lib.ExtLinks: Fix "edit" button to show "add" when adding a new link
Diffstat (limited to 'elm')
-rw-r--r--elm/Lib/ExtLinks.elm2
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
]
]