From b7e414a04250574cefc44e83d66bd135cc2ce4b4 Mon Sep 17 00:00:00 2001 From: orangemug Date: Thu, 14 May 2020 12:13:47 +0100 Subject: [PATCH 1/3] Fix URL entry to use form submission and improved errors if protocol isn't present. --- src/components/Button.jsx | 1 + src/components/inputs/UrlInput.jsx | 29 ++++++++++++++++++++-- src/components/modals/OpenModal.jsx | 38 ++++++++++++++++------------- 3 files changed, 49 insertions(+), 19 deletions(-) diff --git a/src/components/Button.jsx b/src/components/Button.jsx index 4c2105f3..e7289c71 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -15,6 +15,7 @@ class Button extends React.Component { render() { return - +
+ +
+ +
+
From c5c1dd12b91f0345d1e7a9d0a67e5e4fcd1b0fd7 Mon Sep 17 00:00:00 2001 From: orangemug Date: Thu, 14 May 2020 13:27:43 +0100 Subject: [PATCH 2/3] Added missing prop validation --- src/components/Button.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Button.jsx b/src/components/Button.jsx index e7289c71..277e3759 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -11,6 +11,7 @@ class Button extends React.Component { className: PropTypes.string, children: PropTypes.node, disabled: PropTypes.bool, + type: PropTypes.string, } render() { From eb0f833d49785ccacb942fb316340591f1ada694 Mon Sep 17 00:00:00 2001 From: orangemug Date: Thu, 14 May 2020 13:33:57 +0100 Subject: [PATCH 3/3] Fixed typo. --- src/components/inputs/UrlInput.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/inputs/UrlInput.jsx b/src/components/inputs/UrlInput.jsx index 29f54682..42660c08 100644 --- a/src/components/inputs/UrlInput.jsx +++ b/src/components/inputs/UrlInput.jsx @@ -27,7 +27,7 @@ function validate (url) { Must provide protocol { isSsl - ? http:// + ? https:// : <>http:// or https:// }