File tree Expand file tree Collapse file tree 2 files changed +29
-18
lines changed Expand file tree Collapse file tree 2 files changed +29
-18
lines changed Original file line number Diff line number Diff line change 2323(defn view
2424 []
2525 (let [error (rf/sub [:keycard/application-info-error ])
26+ logged-in? (rf/sub [:multiaccount/logged-in? ])
2627 {:keys [title description]} (get titles error)]
2728 [:<>
2829 [quo/page-nav
3738 [quo/section-label
3839 {:section (i18n/label :t/what-you-can-do ) :container-style {:padding-vertical 8 }}]
3940 (if (= error :keycard/error.keycard-empty )
40- [quo/settings-item
41- {:title (i18n/label :t/use-backup-keycard )
42- :image :icon
43- :image-props :i/placeholder
44- :action :arrow
45- :description :text
46- :description-props {:text (i18n/label :t/create-backup-profile-keycard )}
47- :on-press (fn []
48- (rf/dispatch [:show-bottom-sheet
49- {:content
50- (fn []
51- [backup.view/sheet
52- {:on-continue
53- (rf/dispatch
54- [:keycard/backup.create-or-enter-pin ])}])}]))}]
41+ (if logged-in?
42+ [quo/settings-item
43+ {:title (i18n/label :t/use-backup-keycard )
44+ :image :icon
45+ :image-props :i/placeholder
46+ :action :arrow
47+ :description :text
48+ :description-props {:text (i18n/label :t/create-backup-profile-keycard )}
49+ :on-press (fn []
50+ (rf/dispatch [:show-bottom-sheet
51+ {:content
52+ (fn []
53+ [backup.view/sheet
54+ {:on-continue
55+ (rf/dispatch
56+ [:keycard/backup.create-or-enter-pin ])}])}]))}]
57+ [quo/settings-item
58+ {:title (i18n/label :t/create-new-profile )
59+ :image :icon
60+ :image-props :i/profile
61+ :action :arrow
62+ :description :text
63+ :description-props {:text (i18n/label :t/new-key-pair-keycard )}
64+ :on-press (fn []
65+ (rf/dispatch [:keycard/create.get-phrase ]))}])
5566 [:<>
5667 (when (or (= error :keycard/error.keycard-frozen )
5768 (= error :keycard/error.keycard-locked ))
Original file line number Diff line number Diff line change 164164 theme)})
165165 options
166166 (when sheet?
167- options/sheet-options))}}]}})
168- (state/navigation-state-push {:id component
169- :type :modal })) )))
167+ options/sheet-options))}}]}})))
168+ (state/navigation-state-push {:id component
169+ :type :modal })))
170170
171171(rf/reg-fx :open-modal-fx open-modal)
172172
You can’t perform that action at this time.
0 commit comments