diff --git a/ui/app/AppLayouts/Profile/views/profile/MyProfileSettingsView.qml b/ui/app/AppLayouts/Profile/views/profile/MyProfileSettingsView.qml index db7a3102b5..ae88254ca8 100644 --- a/ui/app/AppLayouts/Profile/views/profile/MyProfileSettingsView.qml +++ b/ui/app/AppLayouts/Profile/views/profile/MyProfileSettingsView.qml @@ -68,6 +68,8 @@ ColumnLayout { Layout.leftMargin: Style.current.padding Layout.rightMargin: Style.current.padding + store: root.profileStore + displayName: profileStore.name pubkey: profileStore.pubkey icon: profileStore.profileLargeImage diff --git a/ui/imports/shared/controls/chat/ProfileHeader.qml b/ui/imports/shared/controls/chat/ProfileHeader.qml index f647326310..5fb92246b7 100644 --- a/ui/imports/shared/controls/chat/ProfileHeader.qml +++ b/ui/imports/shared/controls/chat/ProfileHeader.qml @@ -7,6 +7,7 @@ import shared.controls 1.0 import StatusQ.Controls 0.1 import StatusQ.Components 0.1 +import StatusQ.Popups 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils Item { @@ -95,7 +96,12 @@ Item { icon.width: d.getSize(8, 12, 20) icon.height: d.getSize(8, 12, 20) - onClicked: Global.openChangeProfilePicPopup() + onClicked: { + if (!!root.store.profileLargeImage) + imageEditMenu.popup(this, mouse.x, mouse.y); + else + Global.openChangeProfilePicPopup(); + } } } @@ -213,4 +219,22 @@ Item { publicKey: root.pubkey } } + + StatusPopupMenu { + id: imageEditMenu + + StatusMenuItem { + text: qsTr("Upload a file") + icon.name: "download" + iconRotation: 180 + onTriggered: Global.openChangeProfilePicPopup() + } + + StatusMenuItem { + text: qsTr("Remove image") + type: StatusMenuItem.Danger + icon.name: "delete" + onTriggered: root.store.removeImage() + } + } }