Skip to content

Commit

Permalink
Merge pull request #1124 from amnezia-vpn/bugfix/page-share-recursive…
Browse files Browse the repository at this point in the history
…-rearrange

bugfix: fixed clientInfoDrawer.expandedHeight recursive rearrange
  • Loading branch information
pokamest authored Oct 24, 2024
2 parents 4685d3b + 5065262 commit 2946dd2
Showing 1 changed file with 39 additions and 42 deletions.
81 changes: 39 additions & 42 deletions client/ui/qml/Pages2/PageShare.qml
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,8 @@ PageType {
}
}

anchors.fill: parent
width: root.width
height: root.height

expandedContent: ColumnLayout {
id: expandedContent
Expand All @@ -783,8 +784,6 @@ PageType {
anchors.leftMargin: 16
anchors.rightMargin: 16

spacing: 8

onImplicitHeightChanged: {
clientInfoDrawer.expandedHeight = expandedContent.implicitHeight + 32
}
Expand All @@ -797,57 +796,54 @@ PageType {
}
}

Header2Type {
Layout.fillWidth: true
Header2TextType {
Layout.maximumWidth: parent.width
Layout.bottomMargin: 24

headerText: clientName
text: clientName
maximumLineCount: 2
wrapMode: Text.Wrap
elide: Qt.ElideRight
}

ColumnLayout
{
id: textColumn
property string textColor: AmneziaStyle.color.mutedGray
Layout.bottomMargin: 24

ParagraphTextType {
color: textColumn.textColor
visible: creationDate
Layout.fillWidth: true
ParagraphTextType {
color: AmneziaStyle.color.mutedGray
visible: creationDate
Layout.fillWidth: true

text: qsTr("Creation date: %1").arg(creationDate)
}
text: qsTr("Creation date: %1").arg(creationDate)
}

ParagraphTextType {
color: textColumn.textColor
visible: latestHandshake
Layout.fillWidth: true
ParagraphTextType {
color: AmneziaStyle.color.mutedGray
visible: latestHandshake
Layout.fillWidth: true

text: qsTr("Latest handshake: %1").arg(latestHandshake)
}
text: qsTr("Latest handshake: %1").arg(latestHandshake)
}

ParagraphTextType {
color: textColumn.textColor
visible: dataReceived
Layout.fillWidth: true
ParagraphTextType {
color: AmneziaStyle.color.mutedGray
visible: dataReceived
Layout.fillWidth: true

text: qsTr("Data received: %1").arg(dataReceived)
}
text: qsTr("Data received: %1").arg(dataReceived)
}

ParagraphTextType {
color: textColumn.textColor
visible: dataSent
Layout.fillWidth: true
ParagraphTextType {
color: AmneziaStyle.color.mutedGray
visible: dataSent
Layout.fillWidth: true

text: qsTr("Data sent: %1").arg(dataSent)
}
text: qsTr("Data sent: %1").arg(dataSent)
}

ParagraphTextType {
color: textColumn.textColor
visible: allowedIps
Layout.fillWidth: true
ParagraphTextType {
color: AmneziaStyle.color.mutedGray
visible: allowedIps
Layout.fillWidth: true

text: qsTr("Allowed IPs: %1").arg(allowedIps)
}
text: qsTr("Allowed IPs: %1").arg(allowedIps)
}

Item {
Expand Down Expand Up @@ -952,6 +948,7 @@ PageType {
BasicButtonType {
id: revokeButton
Layout.fillWidth: true
Layout.topMargin: 8

defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.translucentWhite
Expand Down

0 comments on commit 2946dd2

Please sign in to comment.