-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix events and add qr-component for user profile
- Loading branch information
1 parent
b84cb59
commit bd5a5b1
Showing
6 changed files
with
57 additions
and
72 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,32 @@ | ||
(ns quo2.components.qr-code.qr | ||
(:require [react-native.core :as rn])) | ||
|
||
(defn user-profile-qr-code | ||
[{:keys [key-uid public-key port qr-size]}] | ||
(let [profile-qr-url (str "https://join.status.im/u/" public-key) | ||
base-64-qr-url (js/btoa profile-qr-url) | ||
profile-image-type "large" | ||
error-correction-level 4 | ||
superimpose-profile? true | ||
media-server-url (str "https://localhost:" | ||
port | ||
"/GenerateQRCode?level=" | ||
error-correction-level | ||
"&url=" | ||
base-64-qr-url | ||
"&keyUid=" | ||
key-uid | ||
"&allowProfileImage=" | ||
superimpose-profile? | ||
"&size=" | ||
qr-size | ||
"&imageName=" | ||
profile-image-type)] | ||
[rn/view | ||
{:style {:flex-direction :row | ||
:justify-content :center}} | ||
[rn/image | ||
{:source {:uri media-server-url} | ||
:style {:width qr-size | ||
:height qr-size | ||
:border-radius 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
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