From 090ba1a0633d24292b354e5e467eab502bd60dcd Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 17 Jun 2020 16:17:38 -0400 Subject: [PATCH] display pubkey in the profile --- src/app/profile/profileView.nim | 3 +-- ui/app/AppLayouts/Profile/LeftTab.qml | 1 + ui/app/AppLayouts/Profile/LeftTab/Profile.qml | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/app/profile/profileView.nim b/src/app/profile/profileView.nim index 1e7936a80f..0fe98b66ea 100644 --- a/src/app/profile/profileView.nim +++ b/src/app/profile/profileView.nim @@ -3,8 +3,7 @@ import mailserversList QtObject: type ProfileView* = ref object of QObject - username*: string - identicon*: string + username*, identicon*, id*: string mailserversList*: MailServersList proc setup(self: ProfileView) = diff --git a/ui/app/AppLayouts/Profile/LeftTab.qml b/ui/app/AppLayouts/Profile/LeftTab.qml index aeff65c6b6..7ac58ab730 100644 --- a/ui/app/AppLayouts/Profile/LeftTab.qml +++ b/ui/app/AppLayouts/Profile/LeftTab.qml @@ -32,6 +32,7 @@ ColumnLayout { Profile { username: profileModel.profile.username identicon: profileModel.profile.identicon + pubkey: profileModel.profile.id } } diff --git a/ui/app/AppLayouts/Profile/LeftTab/Profile.qml b/ui/app/AppLayouts/Profile/LeftTab/Profile.qml index 5cfa35aa51..e0eb62f85d 100644 --- a/ui/app/AppLayouts/Profile/LeftTab/Profile.qml +++ b/ui/app/AppLayouts/Profile/LeftTab/Profile.qml @@ -7,6 +7,7 @@ import "../../../../imports" Rectangle { property string username: "Jotaro Kujo" property string identicon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAhklEQVR4nOzWwQ1AQBgFYUQvelKHMtShJ9VwFyvrsExe5jvKXiYv+WPoQhhCYwiNITSG0MSEjLUPt3097r7P09L/8f4qZhFDaAyhqboIT76+TiUxixhCYwhN9b/WW6Xr1ErMIobQGEJjCI0hNIbQGEJjCI0haiRmEUNoDKExhMYQmjMAAP//B2kXcP2uDV8AAAAASUVORK5CYII=" + property string pubkey: "0x04d8c07dd137bd1b73a6f51df148b4f77ddaa11209d36e43d8344c0a7d6db1cad6085f27cfb75dd3ae21d86ceffebe4cf8a35b9ce8d26baa19dc264efe6d8f221b" id: profileHeaderContent height: parent.height Layout.fillWidth: true @@ -55,5 +56,17 @@ Rectangle { font.weight: Font.Medium font.pixelSize: 20 } + Text { + id: pubkeyText + text: pubkey + width: 208 + elide: Text.ElideMiddle + anchors.top: profileName.bottom + anchors.topMargin: 10 + anchors.horizontalCenterOffset: 0 + anchors.horizontalCenter: parent.horizontalCenter + font.weight: Font.Medium + font.pixelSize: 20 + } } }