mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-21 20:09:37 +00:00
[#2707] Added "My Profile" button in new chat popup
My profile link was not shown when starting 1x1 chat having someone in contacts as it is currently the case in mobile app Closes #2707
This commit is contained in:
parent
7ac63b4451
commit
03db6a4985
@ -15,6 +15,7 @@ StatusAppTwoPanelLayout {
|
||||
property alias chatColumn: chatColumn
|
||||
property bool stickersLoaded: false
|
||||
property bool profilePopupOpened: false
|
||||
signal profileButtonClicked()
|
||||
|
||||
Connections {
|
||||
target: chatsModel.stickers
|
||||
@ -44,6 +45,9 @@ StatusAppTwoPanelLayout {
|
||||
Component {
|
||||
id: contactsColumnComponent
|
||||
ContactsColumn {
|
||||
onOpenProfileClicked: {
|
||||
chatView.profileButtonClicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,10 +15,10 @@ import StatusQ.Components 0.1
|
||||
import StatusQ.Popups 0.1
|
||||
|
||||
Item {
|
||||
id: contactsColumn
|
||||
property int chatGroupsListViewCount: channelList.chatListItems.count
|
||||
property alias searchStr: searchBox.text
|
||||
|
||||
id: contactsColumn
|
||||
signal openProfileClicked()
|
||||
|
||||
Layout.fillHeight: true
|
||||
width: 304
|
||||
@ -195,6 +195,9 @@ Item {
|
||||
onClosed: {
|
||||
destroy()
|
||||
}
|
||||
onProfileClicked: {
|
||||
contactsColumn.openProfileClicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,15 +7,16 @@ import "../../../../shared/status"
|
||||
import "./"
|
||||
|
||||
ModalPopup {
|
||||
id: popup
|
||||
//% "New chat"
|
||||
title: qsTrId("new-chat")
|
||||
|
||||
signal profileClicked()
|
||||
function doJoin(pk, ensName) {
|
||||
chatsModel.channelView.joinPrivateChat(pk, Utils.isChatKey(pk) ? "" : ensName);
|
||||
popup.close();
|
||||
}
|
||||
|
||||
id: popup
|
||||
//% "New chat"
|
||||
title: qsTrId("new-chat")
|
||||
|
||||
onOpened: {
|
||||
contactFieldAndList.chatKey.text = ""
|
||||
contactFieldAndList.pubKey = ""
|
||||
@ -36,6 +37,49 @@ ModalPopup {
|
||||
popup.close();
|
||||
}
|
||||
}
|
||||
|
||||
Control {
|
||||
width: 124
|
||||
height: 36
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 24
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 34
|
||||
color: Style.current.roundedButtonSecondaryHoveredBackgroundColor
|
||||
}
|
||||
contentItem: Item {
|
||||
anchors.fill: parent
|
||||
SVGImage {
|
||||
id: dollarEmoji
|
||||
width: 32
|
||||
height: 32
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: Qt.resolvedUrl("../../../../imports/twemoji/svg/1f911.svg")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
anchors.left: dollarEmoji.right
|
||||
anchors.leftMargin: 6
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: qsTr("My Profile")
|
||||
font.pixelSize: 15
|
||||
color: Style.current.white
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: "PointingHandCursor"
|
||||
onClicked: {
|
||||
popup.profileClicked();
|
||||
Config.currentMenuTab = 0;
|
||||
popup.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
|
@ -4,7 +4,6 @@ import "../../../shared"
|
||||
import "./LeftTab"
|
||||
|
||||
Rectangle {
|
||||
property alias currentTab: profileMenu.profileCurrentIndex
|
||||
property alias changeProfileSection: profileMenu.changeProfileSection
|
||||
|
||||
id: profileInfoContainer
|
||||
|
@ -7,7 +7,6 @@ import "./components"
|
||||
import "./constants.js" as ProfileConstants
|
||||
|
||||
ScrollView {
|
||||
property int profileCurrentIndex: ProfileConstants.PROFILE
|
||||
readonly property int btnheight: 42
|
||||
readonly property int w: 340
|
||||
property var changeProfileSection: function (sectionId) {
|
||||
@ -31,8 +30,8 @@ ScrollView {
|
||||
active: profileMenu.profileCurrentIndex === modelData.id
|
||||
Layout.fillWidth: true
|
||||
width: profileMenu.width
|
||||
onClicked: function () {
|
||||
profileMenu.profileCurrentIndex = modelData.id
|
||||
onClicked: {
|
||||
Config.currentMenuTab = modelData.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,7 +54,7 @@ ScrollView {
|
||||
Layout.fillWidth: true
|
||||
width: profileMenu.width
|
||||
onClicked: function () {
|
||||
profileMenu.profileCurrentIndex = modelData.id
|
||||
Config.currentMenuTab = modelData.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,7 +76,7 @@ ScrollView {
|
||||
if (modelData.function === "exit") {
|
||||
return Qt.quit()
|
||||
}
|
||||
profileMenu.profileCurrentIndex = modelData.id
|
||||
Config.currentMenuTab = modelData.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ Rectangle {
|
||||
property bool active: false
|
||||
property url source: "../../../../img/eye.svg"
|
||||
property string text: "My Profile"
|
||||
property var onClicked: function () {}
|
||||
signal clicked()
|
||||
|
||||
id: menuButton
|
||||
color: {
|
||||
@ -79,7 +79,7 @@ Rectangle {
|
||||
menuButton.hovered = false
|
||||
}
|
||||
onClicked: function () {
|
||||
menuButton.onClicked()
|
||||
menuButton.clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ StatusAppTwoPanelLayout {
|
||||
property int profileContentWidth: Math.max(contentMinWidth, Math.min(profileContainer.width * 0.8, contentMaxWidth))
|
||||
anchors.fill: parent
|
||||
|
||||
currentIndex: leftTab.currentTab
|
||||
currentIndex: Config.currentMenuTab
|
||||
|
||||
onCurrentIndexChanged: {
|
||||
if(visibleChildren[0] === ensContainer){
|
||||
|
@ -271,6 +271,9 @@ StatusAppLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
onProfileButtonClicked: {
|
||||
appMain.changeAppSection(Constants.profile);
|
||||
}
|
||||
}
|
||||
|
||||
WalletLayout {
|
||||
|
8
ui/imports/Config.qml
Normal file
8
ui/imports/Config.qml
Normal file
@ -0,0 +1,8 @@
|
||||
pragma Singleton
|
||||
|
||||
import QtQuick 2.13
|
||||
|
||||
QtObject {
|
||||
|
||||
property int currentMenuTab: 0
|
||||
}
|
@ -3,5 +3,6 @@ singleton Style 1.0 ./Style.qml
|
||||
singleton Constants 1.0 ./Constants.qml
|
||||
singleton Utils 1.0 ./Utils.qml
|
||||
singleton Emoji 1.0 ./Emoji.qml
|
||||
singleton Config 1.0 ./Config.qml
|
||||
singleton SelectedMessage 1.0 ./SelectedMessage.qml
|
||||
singleton Backpressure 1.0 ./Backpressure/Backpressure.qml
|
||||
|
Loading…
x
Reference in New Issue
Block a user