From 2c3f47d3cbbe88b6e40838bafb18192a4b8efe57 Mon Sep 17 00:00:00 2001 From: orangemug Date: Tue, 10 Oct 2017 16:27:16 +0100 Subject: [PATCH] Added 'Load from URL' option in open modal. Fixes #120 --- src/components/modals/OpenModal.jsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/modals/OpenModal.jsx b/src/components/modals/OpenModal.jsx index ef0556c..08d7e9d 100644 --- a/src/components/modals/OpenModal.jsx +++ b/src/components/modals/OpenModal.jsx @@ -75,6 +75,11 @@ class OpenModal extends React.Component { }) } + onOpenUrl() { + const url = this.refs.styleUrl.value; + this.onStyleSelect(url); + } + onUpload(_, files) { const [e, file] = files[0]; const reader = new FileReader(); @@ -139,6 +144,18 @@ class OpenModal extends React.Component { + +
+

Load from URL

+

+ Load from a URL. Note that the URL must have CORS enabled. +

+ +
+ +
+
+

Gallery Styles