From f8e8b6e2dd3815626f4fc9c8d211230c93cdf686 Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Fri, 3 May 2019 14:28:31 +0200 Subject: [PATCH] Added deep-links tab --- .gitignore | 3 +++ src/cljs/status_dapp/components.cljs | 1 + src/cljs/status_dapp/react_native_web.cljs | 9 ++++++++- src/cljs/status_dapp/views.cljs | 6 ++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bfa6a22..90b4ce1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ # Created by .ignore support plugin (hsz.mobi) +node_modules/ +target/ +resources/public/js/compiled diff --git a/src/cljs/status_dapp/components.cljs b/src/cljs/status_dapp/components.cljs index ed79316..180fb7e 100644 --- a/src/cljs/status_dapp/components.cljs +++ b/src/cljs/status_dapp/components.cljs @@ -30,6 +30,7 @@ [tab-button "Stickers" :stickers tab-view] (when (exists? js/ethereumBeta) [tab-button "Beta Provider" :beta tab-view]) + [tab-button "Deep links" :deep-links tab-view] [tab-button "About" :about tab-view]] [react/view {:style {:height 1 :margin-top 10 :background-color "#4360df33"}}]]) diff --git a/src/cljs/status_dapp/react_native_web.cljs b/src/cljs/status_dapp/react_native_web.cljs index 6f8aa78..5537dcc 100644 --- a/src/cljs/status_dapp/react_native_web.cljs +++ b/src/cljs/status_dapp/react_native_web.cljs @@ -30,4 +30,11 @@ uppercase? (map #(when % (string/upper-case %))))] (vec (concat [text-class opts] - ts)))))) \ No newline at end of file + ts)))))) + +(def linking (.-Linking js/ReactNativeWeb)) + +(defn link + [{:keys [href]} s] + [text {:accessibilityRole "link" :href href :style {:color "blue" :text-decoration-line "underline"}} + s]) \ No newline at end of file diff --git a/src/cljs/status_dapp/views.cljs b/src/cljs/status_dapp/views.cljs index 588f504..dca713e 100644 --- a/src/cljs/status_dapp/views.cljs +++ b/src/cljs/status_dapp/views.cljs @@ -197,6 +197,12 @@ [ui/label "Scan QR result: " ""] [react/text @qr-result]]]) + (when (= :deep-links tab-view) + [react/view + [react/view {:style {:flex-direction :row :padding-vertical 10}} + [react/link {:href "ethereum:0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"} + "EIP681 deep-link"]]]) + (when (= :about tab-view) [react/view [react/view {:style {:flex-direction :row :padding-vertical 10}}