From 543ccb69e886e0adb58c2af0bda49661fa4dad54 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 6 May 2019 12:30:45 +0300 Subject: [PATCH] Add send logs button to exception dialog --- src/status_im/utils/error_handler.cljs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/status_im/utils/error_handler.cljs b/src/status_im/utils/error_handler.cljs index bcdabe1917..06dbc8576a 100644 --- a/src/status_im/utils/error_handler.cljs +++ b/src/status_im/utils/error_handler.cljs @@ -1,6 +1,8 @@ (ns status-im.utils.error-handler (:require [clojure.string :as string] - [status-im.utils.utils :as utils])) + [status-im.utils.utils :as utils] + [status-im.i18n :as i18n] + [re-frame.core :as re-frame])) ;; Error handling code based on https://gist.github.com/pesterhazy/e6846be1b6712a9038537022d131ce46 @@ -54,4 +56,8 @@ (handle-error e isFatal) (if js/goog.DEBUG (some-> orig-handler (.call nil e isFatal)) - (utils/show-popup "Error" (.-message e)))))))) \ No newline at end of file + (utils/show-confirmation + {:title "Error" + :content (.-message e) + :confirm-button-text (i18n/label :t/send-logs) + :on-accept #(re-frame/dispatch [:logging.ui/send-logs-pressed])})))))))