[#4932] add privacy policy to signup, recover and profile
Signed-off-by: Goran Jovic <goranjovic@gmail.com>
This commit is contained in:
parent
3e7c059b59
commit
1b9c8d3d6f
|
@ -53,6 +53,10 @@
|
|||
:other-accounts "Other accounts"
|
||||
:sign-you-in "Signing you in…"
|
||||
|
||||
;; privacy policy
|
||||
:privacy-policy "Privacy Policy"
|
||||
:agree-by-continuing "By continuing you agree\n to our "
|
||||
|
||||
;;drawer
|
||||
:switch-users "Switch users"
|
||||
:logout-title "Log out?"
|
||||
|
@ -134,6 +138,7 @@
|
|||
:message "Message"
|
||||
:notifications "Notifications"
|
||||
:need-help "Need help?"
|
||||
:about-app "About"
|
||||
:help-center "Help Center"
|
||||
:faq "Frequently asked questions"
|
||||
:submit-bug "Submit a bug"
|
||||
|
@ -155,6 +160,7 @@
|
|||
:mainnet-text "You’re on the Mainnet. Real ETH will be sent"
|
||||
:dev-mode "Development mode"
|
||||
:backup-your-recovery-phrase "Backup your recovery phrase"
|
||||
:version "Version {{version}}"
|
||||
|
||||
;;recovery phrase
|
||||
:your-data-belongs-to-you "If you lose your recovery phrase you lose your data and funds"
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
(ns status-im.ui.screens.about-app.views
|
||||
(:require-macros [status-im.utils.views :as views])
|
||||
(:require [status-im.ui.components.toolbar.view :as toolbar]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.ui.components.status-bar.view :as status-bar]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.ui.screens.profile.components.views :as profile.components]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(views/defview about-app []
|
||||
(views/letsubs [version [:get-app-version]]
|
||||
[react/view {:flex 1}
|
||||
[status-bar/status-bar]
|
||||
[toolbar/simple-toolbar (i18n/label :t/about-app)]
|
||||
[react/scroll-view
|
||||
[react/view
|
||||
[profile.components/settings-item-separator]
|
||||
[profile.components/settings-item
|
||||
{:label-kw :t/privacy-policy
|
||||
:accessibility-label :privacy-policy
|
||||
:action-fn #(re-frame/dispatch [:open-privacy-policy-link])}]
|
||||
(when status-im.utils.platform/ios?
|
||||
[profile.components/settings-item-separator])
|
||||
[profile.components/settings-item
|
||||
{:item-text (i18n/label :t/version {:version version})
|
||||
:accessibility-label :version
|
||||
:hide-arrow? true}]]]]))
|
|
@ -11,7 +11,8 @@
|
|||
[status-im.ui.components.icons.vector-icons :as icons]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
[status-im.ui.components.common.common :as components.common]
|
||||
[status-im.ui.components.toolbar.view :as toolbar]))
|
||||
[status-im.ui.components.toolbar.view :as toolbar]
|
||||
[status-im.ui.screens.privacy-policy.views :as privacy-policy]))
|
||||
|
||||
(defn account-view [{:keys [address photo-path name public-key]}]
|
||||
[react/touchable-highlight {:on-press #(re-frame/dispatch [:open-login address photo-path name])}
|
||||
|
@ -46,4 +47,5 @@
|
|||
[react/view styles/bottom-button-container
|
||||
[components.common/button {:on-press #(re-frame/dispatch [:navigate-to :recover])
|
||||
:label (i18n/label :t/add-existing-account)
|
||||
:background? false}]]]]]))
|
||||
:background? false}]]
|
||||
[privacy-policy/privacy-policy-button]]]]))
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
status-im.ui.screens.wallet.collectibles.etheremon.events
|
||||
status-im.ui.screens.browser.events
|
||||
status-im.ui.screens.offline-messaging-settings.events
|
||||
status-im.ui.screens.privacy-policy.events
|
||||
status-im.ui.screens.bootnodes-settings.events
|
||||
status-im.ui.screens.currency-settings.events
|
||||
status-im.utils.keychain.events
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
[status-im.ui.components.common.common :as components.common]
|
||||
[status-im.ui.screens.intro.styles :as styles]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.ui.components.status-bar.view :as status-bar]))
|
||||
[status-im.ui.components.status-bar.view :as status-bar]
|
||||
[status-im.ui.screens.privacy-policy.views :as privacy-policy]))
|
||||
|
||||
(defview intro []
|
||||
[react/view {:style styles/intro-view}
|
||||
|
@ -24,4 +25,5 @@
|
|||
[react/view styles/bottom-button-container
|
||||
[components.common/button {:on-press #(re-frame/dispatch [:navigate-to :recover])
|
||||
:label (i18n/label :t/already-have-account)
|
||||
:background? false}]]]])
|
||||
:background? false}]]
|
||||
[privacy-policy/privacy-policy-button]]])
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
(ns status-im.ui.screens.privacy-policy.events
|
||||
(:require [status-im.utils.handlers :as handlers]
|
||||
[status-im.ui.components.react :as react]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(def ^:const privacy-policy-link "https://www.iubenda.com/privacy-policy/45710059")
|
||||
|
||||
(re-frame/reg-fx
|
||||
::open-privacy-policy
|
||||
(fn [] (.openURL react/linking privacy-policy-link)))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:open-privacy-policy-link
|
||||
(fn [] {::open-privacy-policy nil}))
|
|
@ -0,0 +1,14 @@
|
|||
(ns status-im.ui.screens.privacy-policy.styles
|
||||
(:require [status-im.ui.components.common.styles :as common-styles]
|
||||
[status-im.ui.components.colors :as colors]))
|
||||
|
||||
(def privacy-policy-button-container
|
||||
{:margin-bottom 16
|
||||
:margin-top 42})
|
||||
|
||||
(def privacy-policy-button-text
|
||||
(merge common-styles/button-label
|
||||
{:font-size 14}))
|
||||
|
||||
(def privacy-policy-button-text-gray
|
||||
(merge privacy-policy-button-text {:color colors/gray}))
|
|
@ -0,0 +1,15 @@
|
|||
(ns status-im.ui.screens.privacy-policy.views
|
||||
(:require [status-im.ui.components.react :as react]
|
||||
[status-im.ui.screens.privacy-policy.styles :as styles]
|
||||
[status-im.i18n :as i18n]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(defn privacy-policy-button []
|
||||
[react/touchable-highlight
|
||||
{:on-press #(re-frame/dispatch [:open-privacy-policy-link])}
|
||||
[react/view styles/privacy-policy-button-container
|
||||
[react/text {:style styles/privacy-policy-button-text-gray}
|
||||
(i18n/label :t/agree-by-continuing)
|
||||
[react/text
|
||||
{:style styles/privacy-policy-button-text}
|
||||
(i18n/label :t/privacy-policy)]]]])
|
|
@ -65,8 +65,10 @@
|
|||
[react/text {:style styles/settings-title}
|
||||
title])
|
||||
|
||||
(defn settings-item [{:keys [label-kw value action-fn active? destructive? hide-arrow? accessibility-label icon-content]
|
||||
:or {value "" active? true}}]
|
||||
(defn settings-item
|
||||
[{:keys [item-text label-kw value action-fn active? destructive? hide-arrow?
|
||||
accessibility-label icon-content]
|
||||
:or {value "" active? true}}]
|
||||
[react/touchable-highlight
|
||||
(cond-> {:on-press action-fn
|
||||
:disabled (not active?)}
|
||||
|
@ -77,7 +79,7 @@
|
|||
[react/text {:style (merge styles/settings-item-text
|
||||
(when destructive? styles/settings-item-destructive))
|
||||
:number-of-lines 1}
|
||||
(i18n/label label-kw)]
|
||||
(or item-text (i18n/label label-kw))]
|
||||
(when-not (string/blank? value)
|
||||
[react/text {:style styles/settings-item-value
|
||||
:number-of-lines 1
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:get-app-version
|
||||
(fn [{:keys [web3-node-version]}]
|
||||
(let [version (if platform/desktop? build/version build/build-no)]
|
||||
(str build/version " (" version ")\nnode " (or web3-node-version "N/A") ""))))
|
||||
(str build/version " (" version "); node " (or web3-node-version "N/A") ""))))
|
||||
|
||||
(reg-sub :get-device-UUID
|
||||
(fn [db]
|
||||
|
|
|
@ -118,9 +118,15 @@
|
|||
: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
|
||||
{:label-kw :t/need-help
|
||||
:accessibility-label :help-button
|
||||
:action-fn #(re-frame/dispatch [:navigate-to :help-center])}]
|
||||
[profile.components/settings-item-separator]
|
||||
[profile.components/settings-item
|
||||
{:label-kw :t/about-app
|
||||
:accessibility-label :about-button
|
||||
:action-fn #(re-frame/dispatch [:navigate-to :about-app])}]
|
||||
[profile.components/settings-item-separator]
|
||||
[react/view styles/my-profile-settings-logout-wrapper
|
||||
[react/view styles/my-profile-settings-logout
|
||||
|
@ -128,9 +134,7 @@
|
|||
:accessibility-label :log-out-button
|
||||
:destructive? true
|
||||
:hide-arrow? true
|
||||
:action-fn #(handle-logout)}]]
|
||||
[react/view styles/my-profile-settings-logout-version
|
||||
[react/text @(re-frame/subscribe [:get-app-version])]]]]))
|
||||
:action-fn #(handle-logout)}]]]]))
|
||||
|
||||
(defview advanced-settings [{:keys [network networks dev-mode?]} on-show]
|
||||
(letsubs [{:keys [sharing-usage-data?]} [:get-current-account]]
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
[status-im.ui.screens.add-new.open-dapp.views :refer [open-dapp dapp-description]]
|
||||
[status-im.ui.screens.intro.views :refer [intro]]
|
||||
[status-im.ui.screens.accounts.create.views :refer [create-account]]
|
||||
[status-im.ui.screens.profile.seed.views :refer [backup-seed]]))
|
||||
[status-im.ui.screens.profile.seed.views :refer [backup-seed]]
|
||||
[status-im.ui.screens.about-app.views :as about-app]))
|
||||
|
||||
(defn get-main-component [view-id]
|
||||
(case view-id
|
||||
|
@ -98,6 +99,7 @@
|
|||
:recipient-qr-code recipient-qr-code
|
||||
:contact-code contact-code
|
||||
:backup-seed backup-seed
|
||||
:about-app about-app/about-app
|
||||
[react/view [react/text (str "Unknown view: " view-id)]]))
|
||||
|
||||
(defn get-modal-component [modal-view]
|
||||
|
|
Loading…
Reference in New Issue