-
Notifications
You must be signed in to change notification settings - Fork 985
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/logout/wakuv2
- Loading branch information
Showing
11 changed files
with
186 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(ns status-im2.common.standard-authentication.core | ||
(:require | ||
status-im2.common.standard-authentication.standard-auth.button.view | ||
status-im2.common.standard-authentication.standard-auth.slide-button.view)) | ||
|
||
(def button status-im2.common.standard-authentication.standard-auth.button.view/view) | ||
(def slide-button status-im2.common.standard-authentication.standard-auth.slide-button.view/view) |
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
44 changes: 44 additions & 0 deletions
44
src/status_im2/common/standard_authentication/standard_auth/button/view.cljs
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,44 @@ | ||
(ns status-im2.common.standard-authentication.standard-auth.button.view | ||
(:require | ||
[quo.core :as quo] | ||
[quo.theme :as quo.theme] | ||
[reagent.core :as reagent] | ||
[status-im2.common.standard-authentication.standard-auth.authorize :as authorize])) | ||
|
||
(defn- view-internal | ||
[_] | ||
(let [reset-slider? (reagent/atom false) | ||
on-close #(reset! reset-slider? true)] | ||
(fn [{:keys [biometric-auth? | ||
customization-color | ||
auth-button-label | ||
on-enter-password | ||
on-auth-success | ||
on-press | ||
on-auth-fail | ||
auth-button-icon-left | ||
size | ||
button-label | ||
theme | ||
blur? | ||
container-style | ||
icon-left]}] | ||
[quo/button | ||
{:size size | ||
:container-style container-style | ||
:customization-color customization-color | ||
:icon-left icon-left | ||
:on-press (if on-press | ||
on-press | ||
#(authorize/authorize {:on-close on-close | ||
:auth-button-icon-left auth-button-icon-left | ||
:theme theme | ||
:blur? blur? | ||
:on-enter-password on-enter-password | ||
:biometric-auth? biometric-auth? | ||
:on-auth-success on-auth-success | ||
:on-auth-fail on-auth-fail | ||
:auth-button-label auth-button-label}))} | ||
button-label]))) | ||
|
||
(def view (quo.theme/with-theme view-internal)) |
43 changes: 43 additions & 0 deletions
43
src/status_im2/common/standard_authentication/standard_auth/slide_button/view.cljs
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,43 @@ | ||
(ns status-im2.common.standard-authentication.standard-auth.slide-button.view | ||
(:require | ||
[quo.core :as quo] | ||
[quo.theme :as quo.theme] | ||
[react-native.core :as rn] | ||
[reagent.core :as reagent] | ||
[status-im2.common.standard-authentication.standard-auth.authorize :as authorize])) | ||
|
||
(defn- view-internal | ||
[_] | ||
(let [reset-slider? (reagent/atom false) | ||
on-close #(reset! reset-slider? true)] | ||
(fn [{:keys [biometric-auth? | ||
track-text | ||
customization-color | ||
auth-button-label | ||
on-enter-password | ||
on-auth-success | ||
on-auth-fail | ||
auth-button-icon-left | ||
size | ||
theme | ||
blur? | ||
container-style]}] | ||
[rn/view {:style {:flex 1}} | ||
[quo/slide-button | ||
{:size size | ||
:container-style container-style | ||
:customization-color customization-color | ||
:on-reset (when @reset-slider? #(reset! reset-slider? false)) | ||
:on-complete #(authorize/authorize {:on-close on-close | ||
:auth-button-icon-left auth-button-icon-left | ||
:theme theme | ||
:blur? blur? | ||
:on-enter-password on-enter-password | ||
:biometric-auth? biometric-auth? | ||
:on-auth-success on-auth-success | ||
:on-auth-fail on-auth-fail | ||
:auth-button-label auth-button-label}) | ||
:track-icon (if biometric-auth? :i/face-id :password) | ||
:track-text track-text}]]))) | ||
|
||
(def view (quo.theme/with-theme view-internal)) |
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