Add Help Center

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Dmitry Novotochinov 2018-06-19 14:56:40 +03:00 committed by Igor Mandrigin
parent 35367b79c2
commit 810ca1f93a
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
6 changed files with 55 additions and 0 deletions

View File

@ -136,6 +136,11 @@
:main-currency "Main currency"
:message "Message"
:notifications "Notifications"
:need-help "Need help?"
:help-center "Help Center"
:faq "Frequently asked questions"
:submit-bug "Submit a bug"
:request-feature "Request a feature"
:not-specified "Not specified"
:public-key "Public key"
:phone-number "Phone number"

View File

@ -0,0 +1,4 @@
(ns status-im.ui.screens.help-center.styles)
(def wrapper
{:flex 1})

View File

@ -0,0 +1,29 @@
(ns status-im.ui.screens.help-center.views
(:require-macros [status-im.utils.views :as views])
(:require [status-im.i18n :as i18n]
[status-im.ui.components.react :as react]
[status-im.ui.components.status-bar.view :as status-bar]
[status-im.ui.components.toolbar.view :as toolbar]
[status-im.ui.screens.help-center.styles :as styles]
[status-im.ui.screens.profile.components.views :as profile.components]
[status-im.utils.instabug :as instabug]))
(views/defview help-center []
[react/view styles/wrapper
[status-bar/status-bar]
[toolbar/simple-toolbar
(i18n/label :t/help-center)]
[react/scroll-view
[react/view
[profile.components/settings-item-separator]
[profile.components/settings-item {:label-kw :t/faq
:accessibility-label :faq-button
:action-fn #(.openURL react/linking "https://wiki.status.im/Questions_around_beta#firstHeading")}]
[profile.components/settings-item-separator]
[profile.components/settings-item {:label-kw :t/submit-bug
:accessibility-label :submit-bug-button
:action-fn #(instabug/submit-bug)}]
[profile.components/settings-item-separator]
[profile.components/settings-item {:label-kw :t/request-feature
:accessibility-label :request-feature-button
:action-fn #(instabug/request-feature)}]]]])

View File

@ -115,6 +115,10 @@
:action-fn #(re-frame/dispatch [:navigate-to :backup-seed])
:icon-content [components.common/counter {:size 22} 1]}])
[profile.components/settings-item-separator]
[profile.components/settings-item {:label-kw :t/need-help
:accessibility-label :help-button
:action-fn #(re-frame/dispatch [:navigate-to :help-center])}]
[profile.components/settings-item-separator]
[react/view styles/my-profile-settings-logout-wrapper
[react/view styles/my-profile-settings-logout
[profile.components/settings-item {:label-kw :t/logout

View File

@ -43,6 +43,7 @@
[status-im.ui.screens.bootnodes-settings.views :refer [bootnodes-settings]]
[status-im.ui.screens.bootnodes-settings.edit-bootnode.views :refer [edit-bootnode]]
[status-im.ui.screens.currency-settings.views :refer [currency-settings]]
[status-im.ui.screens.help-center.views :refer [help-center]]
[status-im.ui.screens.browser.views :refer [browser]]
[status-im.ui.screens.add-new.open-dapp.views :refer [open-dapp dapp-description]]
[status-im.ui.screens.intro.views :refer [intro]]
@ -92,6 +93,7 @@
:bootnodes-settings bootnodes-settings
:edit-bootnode edit-bootnode
:currency-settings currency-settings
:help-center help-center
:recent-recipients recent-recipients
:recipient-qr-code recipient-qr-code
:contact-code contact-code

View File

@ -5,6 +5,17 @@
(def instabug rn-dependencies/instabug)
(defn submit-bug []
(.invokeWithInvocationMode
instabug
(.. instabug
-invocationMode
-newBug)))
(defn request-feature []
(.showFeatureRequests
instabug))
(defn- prepare-event-name [event {:keys [target]}]
(str event " " target))