|
1 | 1 | (ns status-im2.contexts.onboarding.enable-notifications.view
|
2 |
| - (:require [quo2.core :as quo] |
3 |
| - [quo2.foundations.colors :as colors] |
4 |
| - [react-native.core :as rn] |
5 |
| - [status-im2.contexts.onboarding.enable-notifications.style :as style] |
6 |
| - [utils.i18n :as i18n] |
7 |
| - [status-im2.contexts.onboarding.common.background.view :as background] |
8 |
| - [utils.re-frame :as rf])) |
| 2 | + (:require |
| 3 | + [quo2.core :as quo] |
| 4 | + [quo2.foundations.colors :as colors] |
| 5 | + [utils.i18n :as i18n] |
| 6 | + [utils.re-frame :as rf] |
| 7 | + [react-native.core :as rn] |
| 8 | + [react-native.platform :as platform] |
| 9 | + [status-im.notifications.core :as notifications] |
| 10 | + [status-im2.contexts.onboarding.common.background.view :as background] |
| 11 | + [status-im2.contexts.onboarding.enable-notifications.style :as style])) |
9 | 12 |
|
10 | 13 | (defn navigation-bar
|
11 | 14 | []
|
12 |
| - [rn/view {:style style/navigation-bar} |
13 |
| - [quo/page-nav |
14 |
| - {:align-mid? true |
15 |
| - :mid-section {:type :text-only :main-text ""} |
16 |
| - }]]) |
| 15 | + [quo/page-nav |
| 16 | + (merge {:horizontal-description? false |
| 17 | + :one-icon-align-left? true |
| 18 | + :align-mid? false |
| 19 | + :page-nav-color :transparent |
| 20 | + :left-section {:icon :i/arrow-left |
| 21 | + :icon-background-color colors/white-opa-5 |
| 22 | + :icon-override-theme :dark |
| 23 | + :type :shell |
| 24 | + :on-press #()}})]) |
17 | 25 |
|
18 |
| -(defn page |
| 26 | +(defn page-title |
19 | 27 | []
|
20 |
| - [rn/view {:style style/page-container} |
21 |
| - [navigation-bar] |
22 |
| - [rn/view {:style {:padding-horizontal 20}} |
23 |
| - [quo/text |
24 |
| - {:size :heading-1 |
25 |
| - :weight :semi-bold |
26 |
| - :style {:color colors/white}} "Enable-notifications"] |
27 |
| - [quo/button |
28 |
| - {:on-press #(rf/dispatch [:init-root :shell-stack]) |
29 |
| - :type :grey |
30 |
| - :override-theme :dark |
31 |
| - :style {}} (i18n/label :t/continue)]]]) |
| 28 | + [rn/view {:style style/title-container} |
| 29 | + [quo/text |
| 30 | + {:accessibility-label :notifications-screen-title |
| 31 | + :weight :semi-bold |
| 32 | + :size :heading-1 |
| 33 | + :style {:color colors/white}} |
| 34 | + (i18n/label :t/intro-wizard-title6)] |
| 35 | + [quo/text |
| 36 | + {:accessibility-label :notifications-screen-sub-title |
| 37 | + :weight :regular |
| 38 | + :size :paragraph-1 |
| 39 | + :style {:color colors/white}} |
| 40 | + (i18n/label :t/enable-notifications-sub-title)]]) |
| 41 | + |
| 42 | +(defn enable-notification-buttons |
| 43 | + [] |
| 44 | + [rn/view {:style style/enable-notifications-buttons} |
| 45 | + [quo/button |
| 46 | + {:on-press (fn [] |
| 47 | + (rf/dispatch [::notifications/switch true platform/ios?]) |
| 48 | + (rf/dispatch [:init-root :welcome])) |
| 49 | + :type :primary |
| 50 | + :before :i/notifications |
| 51 | + :accessibility-label :enable-notifications-button |
| 52 | + :override-background-color (colors/custom-color :magenta 60)} |
| 53 | + (i18n/label :t/intro-wizard-title6)] |
| 54 | + [quo/button |
| 55 | + {:on-press #(rf/dispatch [:init-root :welcome]) |
| 56 | + :accessibility-label :enable-notifications-later-button |
| 57 | + :override-background-color colors/white-opa-5 |
| 58 | + :style {:margin-top 12}} |
| 59 | + (i18n/label :t/maybe-later)]]) |
32 | 60 |
|
33 | 61 | (defn enable-notifications
|
34 | 62 | []
|
35 |
| - [rn/view {:style {:flex 1}} |
| 63 | + [rn/view {:style style/enable-notifications} |
36 | 64 | [background/view true]
|
37 |
| - [page]]) |
| 65 | + [navigation-bar] |
| 66 | + [page-title] |
| 67 | + [rn/view {:style style/page-illustration} |
| 68 | + [quo/text |
| 69 | + "[Illustration here]"]] |
| 70 | + [enable-notification-buttons]]) |
| 71 | + |
0 commit comments