add blocked card popover
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
This commit is contained in:
parent
8448570922
commit
aaf07911c4
|
@ -361,6 +361,14 @@
|
||||||
(clear-on-card-read)
|
(clear-on-card-read)
|
||||||
(hide-connection-sheet))))
|
(hide-connection-sheet))))
|
||||||
|
|
||||||
|
(fx/defn blocked-keycard-popup
|
||||||
|
[{:keys [db] :as cofx}]
|
||||||
|
(fx/merge cofx
|
||||||
|
{:db (-> db
|
||||||
|
(assoc-in [:keycard :pin :status] :blocked-card)
|
||||||
|
(assoc :popover/popover {:view :blocked-card}))}
|
||||||
|
(hide-connection-sheet)))
|
||||||
|
|
||||||
(fx/defn frozen-keycard-popup
|
(fx/defn frozen-keycard-popup
|
||||||
[{:keys [db] :as cofx}]
|
[{:keys [db] :as cofx}]
|
||||||
(if (:multiaccounts/login db)
|
(if (:multiaccounts/login db)
|
||||||
|
@ -438,10 +446,7 @@
|
||||||
(frozen-keycard-popup))
|
(frozen-keycard-popup))
|
||||||
(fn [{:keys [db] :as cofx}]
|
(fn [{:keys [db] :as cofx}]
|
||||||
(if (zero? puk-retry-counter)
|
(if (zero? puk-retry-counter)
|
||||||
(fx/merge
|
(blocked-keycard-popup cofx)
|
||||||
cofx
|
|
||||||
{:db (assoc-in db [:keycard :pin :status] :blocked-card)}
|
|
||||||
hide-connection-sheet)
|
|
||||||
(when on-success'
|
(when on-success'
|
||||||
(dispatch-event cofx on-success')))))))
|
(dispatch-event cofx on-success')))))))
|
||||||
(fx/defn on-get-application-info-error
|
(fx/defn on-get-application-info-error
|
||||||
|
|
|
@ -213,9 +213,9 @@
|
||||||
[frozen-card.view/frozen-card
|
[frozen-card.view/frozen-card
|
||||||
{:show-dismiss-button? false}])
|
{:show-dismiss-button? false}])
|
||||||
|
|
||||||
(defn blocked-card []
|
(defn blocked-card [{:keys [show-dismiss-button?]}]
|
||||||
[react/view {:style {:flex 1
|
[react/view {:style (when-not show-dismiss-button?
|
||||||
:align-items :center}}
|
{:flex 1})}
|
||||||
[react/view {:margin-top 24
|
[react/view {:margin-top 24
|
||||||
:margin-horizontal 24
|
:margin-horizontal 24
|
||||||
:align-items :center}
|
:align-items :center}
|
||||||
|
@ -245,7 +245,17 @@
|
||||||
[react/view {:style {:margin-top 24}}
|
[react/view {:style {:margin-top 24}}
|
||||||
[quo/button
|
[quo/button
|
||||||
{:on-press #(re-frame/dispatch [:keycard-settings.ui/recovery-card-pressed false])}
|
{:on-press #(re-frame/dispatch [:keycard-settings.ui/recovery-card-pressed false])}
|
||||||
(i18n/label :t/keycard-is-frozen-factory-reset)]]]])
|
(i18n/label :t/keycard-is-frozen-factory-reset)]]
|
||||||
|
(when show-dismiss-button?
|
||||||
|
[react/view {:margin-top 24
|
||||||
|
:margin-bottom 24}
|
||||||
|
[quo/button
|
||||||
|
{:on-press #(re-frame/dispatch [::keycard.login/frozen-keycard-popover-dismissed])
|
||||||
|
:type :secondary}
|
||||||
|
(i18n/label :t/dismiss)]])]])
|
||||||
|
|
||||||
|
(defn blocked-card-popover []
|
||||||
|
[blocked-card {:show-dismiss-button? true}])
|
||||||
|
|
||||||
(defview login-pin [{:keys [back-button-handler
|
(defview login-pin [{:keys [back-button-handler
|
||||||
hide-login-actions?
|
hide-login-actions?
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
[status-im.ui.screens.signing.views :as signing]
|
[status-im.ui.screens.signing.views :as signing]
|
||||||
[status-im.ui.screens.biometric.views :as biometric]
|
[status-im.ui.screens.biometric.views :as biometric]
|
||||||
[status-im.ui.components.colors :as colors]
|
[status-im.ui.components.colors :as colors]
|
||||||
|
[status-im.ui.screens.keycard.views :as keycard.views]
|
||||||
[status-im.ui.screens.keycard.frozen-card.view :as frozen-card]))
|
[status-im.ui.screens.keycard.frozen-card.view :as frozen-card]))
|
||||||
|
|
||||||
(defn hide-panel-anim
|
(defn hide-panel-anim
|
||||||
|
@ -146,6 +147,9 @@
|
||||||
(= :frozen-card view)
|
(= :frozen-card view)
|
||||||
[frozen-card/frozen-card]
|
[frozen-card/frozen-card]
|
||||||
|
|
||||||
|
(= :blocked-card view)
|
||||||
|
[keycard.views/blocked-card-popover]
|
||||||
|
|
||||||
(= :advertiser-invite view)
|
(= :advertiser-invite view)
|
||||||
[advertiser.invite/accept-popover]
|
[advertiser.invite/accept-popover]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue