Patch "Show QR Code" functionality (#19893)
This commit is contained in:
parent
8a24185ad6
commit
a9b4d86b00
|
@ -277,23 +277,29 @@
|
|||
:sub-label nil
|
||||
:chevron? false}))
|
||||
|
||||
;; TODO(OmarBasem): Requires design input.
|
||||
(defn show-qr-entry
|
||||
[]
|
||||
[public-key]
|
||||
(entry {:icon :i/qr-code
|
||||
:label (i18n/label :t/show-qr)
|
||||
:on-press #(js/alert "TODO: to be implemented, requires design input")
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:universal-links/generate-profile-url
|
||||
{:public-key public-key
|
||||
:on-success #(rf/dispatch [:open-modal
|
||||
:share-contact])}]))
|
||||
:danger? false
|
||||
:accessibility-label :show-qr-code
|
||||
:sub-label nil
|
||||
:chevron? false}))
|
||||
|
||||
;; TODO(OmarBasem): to be implemented.
|
||||
(defn share-profile-entry
|
||||
[]
|
||||
[public-key]
|
||||
(entry {:icon :i/share
|
||||
:label (i18n/label :t/share-profile)
|
||||
:on-press #(js/alert "TODO: to be implemented")
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:universal-links/generate-profile-url
|
||||
{:public-key public-key
|
||||
:on-success #(rf/dispatch [:open-share
|
||||
{:options {:message %}}])}]))
|
||||
:danger? false
|
||||
:accessibility-label :share-profile
|
||||
:sub-label nil
|
||||
|
@ -419,9 +425,6 @@
|
|||
(notifications-entry false))
|
||||
(when (and config/fetch-messages-enabled? inside-chat?)
|
||||
(chat-actions/fetch-messages chat-id))
|
||||
(when public?
|
||||
(when config/show-not-implemented-features?
|
||||
(show-qr-entry)))
|
||||
(when public?
|
||||
(when config/show-not-implemented-features?
|
||||
(share-group-entry)))])
|
||||
|
@ -467,10 +470,8 @@
|
|||
[[(view-profile-entry public-key)
|
||||
(when-not (= current-pub-key public-key)
|
||||
(edit-nickname-entry public-key))
|
||||
(when config/show-not-implemented-features?
|
||||
(show-qr-entry))
|
||||
(when config/show-not-implemented-features?
|
||||
(share-profile-entry))]
|
||||
(show-qr-entry public-key)
|
||||
(share-profile-entry public-key)]
|
||||
[(when-not (= current-pub-key public-key)
|
||||
(when config/show-not-implemented-features?
|
||||
(mark-untrustworthy-entry)))
|
||||
|
|
Loading…
Reference in New Issue