-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4105951
commit 47af03c
Showing
11 changed files
with
233 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(ns status-im.common.new-device-sheet.style | ||
(:require [quo.foundations.colors :as colors])) | ||
|
||
(def heading | ||
{:padding-left 20 | ||
:padding-bottom 8}) | ||
|
||
(def message | ||
{:padding-horizontal 20 | ||
:padding-top 4}) | ||
|
||
(def warning | ||
{:margin-horizontal 20 | ||
:margin-top 10}) | ||
|
||
(def drawer-container | ||
{:padding-horizontal 13 | ||
:padding-top 16}) | ||
|
||
(def settings-subtext | ||
{:color colors/white-opa-70 | ||
:align-self :center | ||
:margin-bottom 12}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
(ns status-im.common.new-device-sheet.view | ||
(:require | ||
[quo.core :as quo] | ||
[react-native.core :as rn] | ||
[status-im.common.events-helper :as events-helper] | ||
[status-im.common.new-device-sheet.style :as style] | ||
[utils.i18n :as i18n] | ||
[utils.re-frame :as rf])) | ||
|
||
(defn- pair-and-sync | ||
[installation-id] | ||
(rf/dispatch [:pairing/pair-and-sync installation-id]) | ||
(events-helper/hide-bottom-sheet)) | ||
|
||
(defn origin-device-view | ||
[installation-id] | ||
(rn/use-mount events-helper/dismiss-keyboard) | ||
[:<> | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-sheet-heading | ||
:style style/heading} | ||
(i18n/label :t/pair-new-device-and-sync)] | ||
[quo/text | ||
{:weight :regular | ||
:size :paragraph-1 | ||
:accessibility-label :new-device-sheet-message | ||
:style style/message} | ||
(i18n/label :t/new-device-detected-recovered-device-message)] | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-installation-id | ||
:style style/heading} | ||
installation-id] | ||
[quo/bottom-actions | ||
{:actions :two-actions | ||
:blur? true | ||
:container-style {:margin-top 12} | ||
:button-two-label (i18n/label :t/cancel) | ||
:button-two-props {:type :grey | ||
:on-press events-helper/hide-bottom-sheet} | ||
:button-one-label (i18n/label :t/pair-and-sync) | ||
:button-one-props {:on-press #(pair-and-sync installation-id)}}]]) | ||
|
||
(defn other-device-view | ||
[] | ||
(let [installation-id (rf/sub [:profile/installation-id])] | ||
(rn/use-mount events-helper/dismiss-keyboard) | ||
[:<> | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-sheet-heading | ||
:style style/heading} | ||
(i18n/label :t/pair-this-device-and-sync)] | ||
[quo/text | ||
{:weight :regular | ||
:size :paragraph-1 | ||
:accessibility-label :new-device-sheet-message | ||
:style style/message} | ||
(i18n/label :t/new-device-detected-other-device-message)] | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-installation-id | ||
:style style/heading} | ||
installation-id] | ||
[quo/bottom-actions | ||
{:actions :one-action | ||
:blur? true | ||
:container-style {:margin-top 12} | ||
:button-one-label (i18n/label :t/close) | ||
:button-one-props {:type :grey | ||
:on-press events-helper/hide-bottom-sheet}}]])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.