fix: improve profile sections min width and scaling
This commit is contained in:
parent
3fe9f6c6b8
commit
bf67c941ff
|
@ -6,8 +6,8 @@ import "../../../shared"
|
||||||
import "./Sections"
|
import "./Sections"
|
||||||
|
|
||||||
SplitView {
|
SplitView {
|
||||||
property int contentMargin: 120
|
|
||||||
property int contentMaxWidth: 624
|
property int contentMaxWidth: 624
|
||||||
|
property int contentMinWidth: 450
|
||||||
property int topMargin: 46
|
property int topMargin: 46
|
||||||
property alias changeProfileSection: leftTab.changeProfileSection
|
property alias changeProfileSection: leftTab.changeProfileSection
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ SplitView {
|
||||||
}
|
}
|
||||||
|
|
||||||
StackLayout {
|
StackLayout {
|
||||||
|
property int profileContentWidth: Math.max(contentMinWidth, Math.min(profileContainer.width * 0.8, contentMaxWidth))
|
||||||
|
|
||||||
id: profileContainer
|
id: profileContainer
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
|
|
|
@ -9,13 +9,14 @@ Item {
|
||||||
id: aboutContainer
|
id: aboutContainer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: generalColumn
|
id: generalColumn
|
||||||
spacing: Style.current.bigPadding
|
spacing: Style.current.bigPadding
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 46
|
anchors.topMargin: 46
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
StatusSectionDescItem {
|
StatusSectionDescItem {
|
||||||
|
|
|
@ -10,12 +10,14 @@ Item {
|
||||||
id: advancedContainer
|
id: advancedContainer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: generalColumn
|
id: generalColumn
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: topMargin
|
anchors.topMargin: topMargin
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
StatusSettingsLineButton {
|
StatusSettingsLineButton {
|
||||||
|
|
|
@ -37,7 +37,8 @@ ScrollView {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: appearanceContainer
|
id: appearanceContainer
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
height: this.childrenRect.height + 100
|
height: this.childrenRect.height + 100
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
property Component dappListPopup: DappList {
|
property Component dappListPopup: DappList {
|
||||||
onClosed: destroy()
|
onClosed: destroy()
|
||||||
|
@ -22,7 +23,8 @@ Item {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: topMargin
|
anchors.topMargin: topMargin
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
|
@ -12,12 +12,14 @@ Item {
|
||||||
property bool isPending: false
|
property bool isPending: false
|
||||||
height: parent.height
|
height: parent.height
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 32
|
anchors.topMargin: 32
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
SearchBox {
|
SearchBox {
|
||||||
|
|
|
@ -14,6 +14,7 @@ Item {
|
||||||
height: 200
|
height: 200
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: firstTimeSetup
|
id: firstTimeSetup
|
||||||
|
|
|
@ -24,306 +24,313 @@ Item {
|
||||||
property int timestamp: 1577872140
|
property int timestamp: 1577872140
|
||||||
|
|
||||||
function shouldDisplayExampleMessage(){
|
function shouldDisplayExampleMessage(){
|
||||||
return profileModel.ens.rowCount() > 0 && profileModel.ens.pendingLen() != profileModel.ens.rowCount() && profileModel.ens.preferredUsername !== ""
|
return profileModel.ens.rowCount() > 0 && profileModel.ens.pendingLen() !== profileModel.ens.rowCount() && profileModel.ens.preferredUsername !== ""
|
||||||
}
|
}
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
Component {
|
Item {
|
||||||
id: statusENS
|
anchors.top: parent.top
|
||||||
Item {
|
width: profileContainer.profileContentWidth
|
||||||
Text {
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
id: usernameTxt
|
|
||||||
//% "(pending)"
|
|
||||||
text: username.substr(0, username.indexOf(".")) + " " + (isPending ? qsTrId("-pending-") : "")
|
|
||||||
color: Style.current.textColor
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
Component {
|
||||||
|
id: statusENS
|
||||||
|
Item {
|
||||||
|
Text {
|
||||||
|
id: usernameTxt
|
||||||
|
//% "(pending)"
|
||||||
|
text: username.substr(0, username.indexOf(".")) + " " + (isPending ? qsTrId("-pending-") : "")
|
||||||
|
color: Style.current.textColor
|
||||||
|
}
|
||||||
|
|
||||||
anchors.top: usernameTxt.bottom
|
Text {
|
||||||
anchors.topMargin: 2
|
|
||||||
text: username.substr(username.indexOf("."))
|
anchors.top: usernameTxt.bottom
|
||||||
color: Style.current.darkGrey
|
anchors.topMargin: 2
|
||||||
|
text: username.substr(username.indexOf("."))
|
||||||
|
color: Style.current.darkGrey
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: normalENS
|
id: normalENS
|
||||||
Item {
|
Item {
|
||||||
Text {
|
Text {
|
||||||
id: usernameTxt
|
id: usernameTxt
|
||||||
//% "(pending)"
|
//% "(pending)"
|
||||||
text: username + " " + (isPending ? qsTrId("-pending-") : "")
|
text: username + " " + (isPending ? qsTrId("-pending-") : "")
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: Style.current.textColor
|
color: Style.current.textColor
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: ensDelegate
|
id: ensDelegate
|
||||||
Item {
|
Item {
|
||||||
height: 45
|
height: 45
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: selectEns(model.username)
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: circle
|
||||||
|
width: 35
|
||||||
|
height: 35
|
||||||
|
radius: 35
|
||||||
|
color: Style.current.blue
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: "@"
|
||||||
|
opacity: 0.7
|
||||||
|
font.weight: Font.Bold
|
||||||
|
font.pixelSize: 16
|
||||||
|
color: Style.current.white
|
||||||
|
anchors.centerIn: parent
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
sourceComponent: model.username.endsWith(".stateofus.eth") ? statusENS : normalENS
|
||||||
|
property string username: model.username
|
||||||
|
property bool isPending: model.isPending
|
||||||
|
active: true
|
||||||
|
anchors.left: circle.right
|
||||||
|
anchors.leftMargin: Style.current.smallPadding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ENSPopup {
|
||||||
|
id: ensPopup
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: sectionTitle
|
||||||
|
//% "ENS usernames"
|
||||||
|
text: qsTrId("ens-usernames")
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.leftMargin: 24
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 24
|
||||||
|
font.weight: Font.Bold
|
||||||
|
font.pixelSize: 20
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: addUsername
|
||||||
|
anchors.top: sectionTitle.bottom
|
||||||
|
anchors.topMargin: Style.current.bigPadding
|
||||||
|
width: addButton.width + usernameText.width + Style.current.padding
|
||||||
|
height: addButton.height
|
||||||
|
|
||||||
|
StatusRoundButton {
|
||||||
|
id: addButton
|
||||||
|
icon.name: "plusSign"
|
||||||
|
size: "medium"
|
||||||
|
type: "secondary"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: usernameText
|
||||||
|
//% "Add username"
|
||||||
|
text: qsTrId("ens-add-username")
|
||||||
|
color: Style.current.blue
|
||||||
|
anchors.left: addButton.right
|
||||||
|
anchors.leftMargin: Style.current.padding
|
||||||
|
anchors.verticalCenter: addButton.verticalCenter
|
||||||
|
font.pixelSize: 15
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: selectEns(model.username)
|
onClicked: addBtnClicked()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: usernamesLabel
|
||||||
|
//% "Your usernames"
|
||||||
|
text: qsTrId("ens-your-usernames")
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: addUsername.bottom
|
||||||
|
anchors.topMargin: 24
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
anchors.top: usernamesLabel.bottom
|
||||||
|
anchors.topMargin: 10
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: 200
|
||||||
|
id: ensList
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
anchors.fill: parent
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
ScrollBar.vertical.policy: lvEns.contentHeight > lvEns.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
id: lvEns
|
||||||
|
anchors.fill: parent
|
||||||
|
model: profileModel.ens
|
||||||
|
spacing: 10
|
||||||
|
clip: true
|
||||||
|
delegate: ensDelegate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Separator {
|
||||||
|
id: separator
|
||||||
|
anchors.topMargin: Style.current.padding
|
||||||
|
anchors.top: ensList.bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: chatSettingsLabel
|
||||||
|
visible: profileModel.ens.rowCount() > 0 && profileModel.ens.pendingLen() != profileModel.ens.rowCount()
|
||||||
|
//% "Chat settings"
|
||||||
|
text: qsTrId("chat-settings")
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: ensList.bottom
|
||||||
|
anchors.topMargin: 24
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
width: childrenRect.width
|
||||||
|
height: childrenRect.height
|
||||||
|
|
||||||
|
id: preferredUsername
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: chatSettingsLabel.bottom
|
||||||
|
anchors.topMargin: 24
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: usernameLabel
|
||||||
|
visible: chatSettingsLabel.visible
|
||||||
|
//% "Primary Username"
|
||||||
|
text: qsTrId("primary-username")
|
||||||
|
font.pixelSize: 14
|
||||||
|
font.weight: Font.Bold
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
id: usernameLabel2
|
||||||
|
visible: chatSettingsLabel.visible
|
||||||
|
//% "None selected"
|
||||||
|
text: profileModel.ens.preferredUsername || qsTrId("none-selected")
|
||||||
|
anchors.left: usernameLabel.right
|
||||||
|
anchors.leftMargin: Style.current.padding
|
||||||
|
font.pixelSize: 14
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: ensPopup.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: messagesShownAs
|
||||||
|
visible: shouldDisplayExampleMessage()
|
||||||
|
anchors.top: !visible ? separator.bottom : preferredUsername.bottom
|
||||||
|
anchors.topMargin: Style.current.padding * 2
|
||||||
|
|
||||||
|
UserImage {
|
||||||
|
id: chatImage
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Style.current.padding
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 20
|
||||||
|
}
|
||||||
|
|
||||||
|
UsernameLabel {
|
||||||
|
id: chatName
|
||||||
|
label.text: "@" + (profileModel.ens.preferredUsername.replace(".stateofus.eth", ""))
|
||||||
|
label.color: Style.current.blue
|
||||||
|
anchors.leftMargin: 20
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 0
|
||||||
|
anchors.left: chatImage.right
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: circle
|
property int chatVerticalPadding: 7
|
||||||
width: 35
|
property int chatHorizontalPadding: 12
|
||||||
|
id: chatBox
|
||||||
|
color: Style.current.secondaryBackground
|
||||||
height: 35
|
height: 35
|
||||||
radius: 35
|
width: 80
|
||||||
color: Style.current.blue
|
radius: 16
|
||||||
|
anchors.left: chatImage.right
|
||||||
|
anchors.leftMargin: 8
|
||||||
|
anchors.top: chatImage.top
|
||||||
|
|
||||||
StyledText {
|
ChatText {
|
||||||
text: "@"
|
id: chatText
|
||||||
opacity: 0.7
|
anchors.top: parent.top
|
||||||
font.weight: Font.Bold
|
anchors.topMargin: chatBox.chatVerticalPadding
|
||||||
font.pixelSize: 16
|
anchors.left: parent.left
|
||||||
color: Style.current.white
|
anchors.leftMargin: chatBox.chatHorizontalPadding
|
||||||
anchors.centerIn: parent
|
width: parent.width
|
||||||
verticalAlignment: Text.AlignVCenter
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Loader {
|
|
||||||
sourceComponent: model.username.endsWith(".stateofus.eth") ? statusENS : normalENS
|
|
||||||
property string username: model.username
|
|
||||||
property bool isPending: model.isPending
|
|
||||||
active: true
|
|
||||||
anchors.left: circle.right
|
|
||||||
anchors.leftMargin: Style.current.smallPadding
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ENSPopup {
|
RectangleCorner {}
|
||||||
id: ensPopup
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
id: sectionTitle
|
|
||||||
//% "ENS usernames"
|
|
||||||
text: qsTrId("ens-usernames")
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 24
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 24
|
|
||||||
font.weight: Font.Bold
|
|
||||||
font.pixelSize: 20
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: addUsername
|
|
||||||
anchors.top: sectionTitle.bottom
|
|
||||||
anchors.topMargin: Style.current.bigPadding
|
|
||||||
width: addButton.width + usernameText.width + Style.current.padding
|
|
||||||
height: addButton.height
|
|
||||||
|
|
||||||
StatusRoundButton {
|
|
||||||
id: addButton
|
|
||||||
icon.name: "plusSign"
|
|
||||||
size: "medium"
|
|
||||||
type: "secondary"
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
id: usernameText
|
|
||||||
//% "Add username"
|
|
||||||
text: qsTrId("ens-add-username")
|
|
||||||
color: Style.current.blue
|
|
||||||
anchors.left: addButton.right
|
|
||||||
anchors.leftMargin: Style.current.padding
|
|
||||||
anchors.verticalCenter: addButton.verticalCenter
|
|
||||||
font.pixelSize: 15
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: addBtnClicked()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
id: usernamesLabel
|
|
||||||
//% "Your usernames"
|
|
||||||
text: qsTrId("ens-your-usernames")
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: addUsername.bottom
|
|
||||||
anchors.topMargin: 24
|
|
||||||
font.pixelSize: 16
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
anchors.top: usernamesLabel.bottom
|
|
||||||
anchors.topMargin: 10
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: 200
|
|
||||||
id: ensList
|
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
anchors.fill: parent
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
||||||
ScrollBar.vertical.policy: lvEns.contentHeight > lvEns.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: lvEns
|
|
||||||
anchors.fill: parent
|
|
||||||
model: profileModel.ens
|
|
||||||
spacing: 10
|
|
||||||
clip: true
|
|
||||||
delegate: ensDelegate
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Separator {
|
|
||||||
id: separator
|
|
||||||
anchors.topMargin: Style.current.padding
|
|
||||||
anchors.top: ensList.bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
id: chatSettingsLabel
|
|
||||||
visible: profileModel.ens.rowCount() > 0 && profileModel.ens.pendingLen() != profileModel.ens.rowCount()
|
|
||||||
//% "Chat settings"
|
|
||||||
text: qsTrId("chat-settings")
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: ensList.bottom
|
|
||||||
anchors.topMargin: 24
|
|
||||||
font.pixelSize: 16
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
width: childrenRect.width
|
|
||||||
height: childrenRect.height
|
|
||||||
|
|
||||||
id: preferredUsername
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: chatSettingsLabel.bottom
|
|
||||||
anchors.topMargin: 24
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
id: usernameLabel
|
|
||||||
visible: chatSettingsLabel.visible
|
|
||||||
//% "Primary Username"
|
|
||||||
text: qsTrId("primary-username")
|
|
||||||
font.pixelSize: 14
|
|
||||||
font.weight: Font.Bold
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
id: usernameLabel2
|
|
||||||
visible: chatSettingsLabel.visible
|
|
||||||
//% "None selected"
|
|
||||||
text: profileModel.ens.preferredUsername || qsTrId("none-selected")
|
|
||||||
anchors.left: usernameLabel.right
|
|
||||||
anchors.leftMargin: Style.current.padding
|
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: ensPopup.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: messagesShownAs
|
|
||||||
visible: shouldDisplayExampleMessage()
|
|
||||||
anchors.top: !visible ? separator.bottom : preferredUsername.bottom
|
|
||||||
anchors.topMargin: Style.current.padding * 2
|
|
||||||
|
|
||||||
UserImage {
|
|
||||||
id: chatImage
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: Style.current.padding
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 20
|
|
||||||
}
|
|
||||||
|
|
||||||
UsernameLabel {
|
|
||||||
id: chatName
|
|
||||||
label.text: "@" + (profileModel.ens.preferredUsername.replace(".stateofus.eth", ""))
|
|
||||||
label.color: Style.current.blue
|
|
||||||
anchors.leftMargin: 20
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: 0
|
|
||||||
anchors.left: chatImage.right
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
property int chatVerticalPadding: 7
|
|
||||||
property int chatHorizontalPadding: 12
|
|
||||||
id: chatBox
|
|
||||||
color: Style.current.secondaryBackground
|
|
||||||
height: 35
|
|
||||||
width: 80
|
|
||||||
radius: 16
|
|
||||||
anchors.left: chatImage.right
|
|
||||||
anchors.leftMargin: 8
|
|
||||||
anchors.top: chatImage.top
|
|
||||||
|
|
||||||
ChatText {
|
|
||||||
id: chatText
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: chatBox.chatVerticalPadding
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: chatBox.chatHorizontalPadding
|
|
||||||
width: parent.width
|
|
||||||
anchors.right: parent.right
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RectangleCorner {}
|
ChatTime {
|
||||||
|
id: chatTime
|
||||||
|
anchors.top: chatBox.bottom
|
||||||
|
anchors.topMargin: 4
|
||||||
|
anchors.bottomMargin: Style.current.padding
|
||||||
|
anchors.right: chatBox.right
|
||||||
|
anchors.rightMargin: Style.current.padding
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
anchors.top: chatTime.bottom
|
||||||
|
anchors.left: chatImage.left
|
||||||
|
anchors.topMargin: Style.current.padding
|
||||||
|
//% "You’re displaying your ENS username in chats"
|
||||||
|
text: qsTrId("you-re-displaying-your-ens-username-in-chats")
|
||||||
|
font.pixelSize: 14
|
||||||
|
color: Style.current.secondaryText
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatTime {
|
|
||||||
id: chatTime
|
|
||||||
anchors.top: chatBox.bottom
|
|
||||||
anchors.topMargin: 4
|
|
||||||
anchors.bottomMargin: Style.current.padding
|
|
||||||
anchors.right: chatBox.right
|
|
||||||
anchors.rightMargin: Style.current.padding
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
Connections {
|
||||||
anchors.top: chatTime.bottom
|
target: profileModel.ens
|
||||||
anchors.left: chatImage.left
|
onPreferredUsernameChanged: {
|
||||||
anchors.topMargin: Style.current.padding
|
messagesShownAs.visible = shouldDisplayExampleMessage()
|
||||||
//% "You’re displaying your ENS username in chats"
|
}
|
||||||
text: qsTrId("you-re-displaying-your-ens-username-in-chats")
|
onUsernameConfirmed: {
|
||||||
font.pixelSize: 14
|
messagesShownAs.visible = shouldDisplayExampleMessage()
|
||||||
color: Style.current.secondaryText
|
chatSettingsLabel.visible = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: profileModel.ens
|
|
||||||
onPreferredUsernameChanged: {
|
|
||||||
messagesShownAs.visible = shouldDisplayExampleMessage()
|
|
||||||
}
|
|
||||||
onUsernameConfirmed: {
|
|
||||||
messagesShownAs.visible = shouldDisplayExampleMessage()
|
|
||||||
chatSettingsLabel.visible = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ Item {
|
||||||
onClosed: {
|
onClosed: {
|
||||||
transactionDialog.closed()
|
transactionDialog.closed()
|
||||||
}
|
}
|
||||||
ensUsername: ensUsername.text
|
ensUsername: ensUsername.text || ""
|
||||||
width: 400
|
width: 400
|
||||||
height: 400
|
height: 400
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ Item {
|
||||||
Item {
|
Item {
|
||||||
id: ensContainer
|
id: ensContainer
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
width: 624
|
width: profileContainer.profileContentWidth
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -245,7 +245,9 @@ Item {
|
||||||
id: validationResult
|
id: validationResult
|
||||||
text: validationMessage
|
text: validationMessage
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
width: parent.width
|
||||||
anchors.top: ensTypeRect.bottom
|
anchors.top: ensTypeRect.bottom
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
anchors.topMargin: Style.current.bigPadding
|
anchors.topMargin: Style.current.bigPadding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ Item {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: contentItem
|
id: contentItem
|
||||||
width: 624
|
width: profileContainer.profileContentWidth
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
|
|
@ -10,6 +10,7 @@ Item {
|
||||||
id: ensContainer
|
id: ensContainer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
property bool showSearchScreen: false
|
property bool showSearchScreen: false
|
||||||
property string addedUsername: ""
|
property string addedUsername: ""
|
||||||
|
|
|
@ -9,7 +9,7 @@ Item {
|
||||||
id: helpContainer
|
id: helpContainer
|
||||||
height: parent.height
|
height: parent.height
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
@ -20,7 +20,8 @@ Item {
|
||||||
id: glossary
|
id: glossary
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
height: this.childrenRect.height
|
height: this.childrenRect.height
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
StatusSectionHeadline {
|
StatusSectionHeadline {
|
||||||
|
@ -126,7 +127,8 @@ Item {
|
||||||
anchors.top: glossary.bottom
|
anchors.top: glossary.bottom
|
||||||
anchors.topMargin: Style.current.bigPadding * 2
|
anchors.topMargin: Style.current.bigPadding * 2
|
||||||
height: this.childrenRect.height
|
height: this.childrenRect.height
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
|
|
@ -10,6 +10,7 @@ Item {
|
||||||
id: languageContainer
|
id: languageContainer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
property Component languagePopup: LanguageModal {}
|
property Component languagePopup: LanguageModal {}
|
||||||
|
|
||||||
|
@ -17,7 +18,8 @@ Item {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: topMargin
|
anchors.topMargin: topMargin
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
|
@ -12,6 +12,7 @@ Item {
|
||||||
|
|
||||||
id: profileHeaderContent
|
id: profileHeaderContent
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
clip: true
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: changeProfileModalComponent
|
id: changeProfileModalComponent
|
||||||
|
@ -22,7 +23,8 @@ Item {
|
||||||
id: profileImgNameContainer
|
id: profileImgNameContainer
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 64
|
anchors.topMargin: 64
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
height: this.childrenRect.height
|
height: this.childrenRect.height
|
||||||
|
|
|
@ -15,7 +15,7 @@ ScrollView {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: notificationsContainer
|
id: notificationsContainer
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
height: this.childrenRect.height + 100
|
height: this.childrenRect.height + 100
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,14 @@ Item {
|
||||||
id: privacyContainer
|
id: privacyContainer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: containerColumn
|
id: containerColumn
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: topMargin
|
anchors.topMargin: topMargin
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
StatusSectionHeadline {
|
StatusSectionHeadline {
|
||||||
|
|
|
@ -11,6 +11,7 @@ Item {
|
||||||
height: 200
|
height: 200
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: txtTitle
|
id: txtTitle
|
||||||
|
|
|
@ -9,9 +9,11 @@ Item {
|
||||||
id: soundsContainer
|
id: soundsContainer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
|
|
@ -9,9 +9,11 @@ Item {
|
||||||
id: syncContainer
|
id: syncContainer
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
clip: true
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: contentMaxWidth
|
width: profileContainer.profileContentWidth
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
@ -19,7 +21,7 @@ Item {
|
||||||
|
|
||||||
StatusRadioButton {
|
StatusRadioButton {
|
||||||
text: name
|
text: name
|
||||||
checked: name == profileModel.mailservers.activeMailserver
|
checked: name === profileModel.mailservers.activeMailserver
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
profileModel.mailservers.setMailserver(name);
|
profileModel.mailservers.setMailserver(name);
|
||||||
|
|
|
@ -135,7 +135,7 @@ QtObject {
|
||||||
readonly property string ens_taken: "taken"
|
readonly property string ens_taken: "taken"
|
||||||
readonly property string ens_taken_custom: "taken-custom"
|
readonly property string ens_taken_custom: "taken-custom"
|
||||||
readonly property string ens_owned: "owned"
|
readonly property string ens_owned: "owned"
|
||||||
readonly property string ens_availabe: "available"
|
readonly property string ens_available: "available"
|
||||||
readonly property string ens_already_connected: "already-connected"
|
readonly property string ens_already_connected: "already-connected"
|
||||||
readonly property string ens_connected: "connected"
|
readonly property string ens_connected: "connected"
|
||||||
readonly property string ens_connected_dkey: "connected-different-key"
|
readonly property string ens_connected_dkey: "connected-different-key"
|
||||||
|
|
|
@ -24,7 +24,7 @@ ApplicationWindow {
|
||||||
Universal.theme: Universal.System
|
Universal.theme: Universal.System
|
||||||
|
|
||||||
id: applicationWindow
|
id: applicationWindow
|
||||||
minimumWidth: 800
|
minimumWidth: 900
|
||||||
minimumHeight: 600
|
minimumHeight: 600
|
||||||
width: 1232
|
width: 1232
|
||||||
height: 770
|
height: 770
|
||||||
|
|
Loading…
Reference in New Issue