Skip to content

Commit

Permalink
Merge pull request #1189 from amnezia-vpn/feature/support-tag
Browse files Browse the repository at this point in the history
feature/added support tag to PageSetupWizardConfigSource
  • Loading branch information
pokamest authored Oct 24, 2024
2 parents 823c1b5 + e31a206 commit 2e175cb
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions client/ui/qml/Pages2/PageSetupWizardConfigSource.qml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ PageType {


HeaderType {
property bool isVisible: SettingsController.getInstallationUuid() !== "" || PageController.isStartPageVisible()

Layout.fillWidth: true
Layout.topMargin: 24
Layout.rightMargin: 16
Layout.leftMargin: 16

headerText: qsTr("Connection")

actionButtonImage: PageController.isStartPageVisible() ? "qrc:/images/controls/more-vertical.svg" : ""
actionButtonImage: isVisible ? "qrc:/images/controls/more-vertical.svg" : ""
actionButtonFunction: function() {
moreActionsDrawer.open()
}
Expand All @@ -67,18 +69,19 @@ PageType {
parent: root

anchors.fill: parent
expandedHeight: root.height * 0.35
expandedHeight: root.height * 0.5

expandedContent: ColumnLayout {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
anchors.rightMargin: 16
spacing: 0

HeaderType {
Layout.fillWidth: true
Layout.topMargin: 32
Layout.leftMargin: 16
Layout.rightMargin: 16

headerText: qsTr("Settings")
}
Expand All @@ -87,9 +90,12 @@ PageType {
id: switcher
Layout.fillWidth: true
Layout.topMargin: 16
Layout.leftMargin: 16
Layout.rightMargin: 16

text: qsTr("Enable logs")

visible: PageController.isStartPageVisible()
checked: SettingsController.isLoggingEnabled
onCheckedChanged: {
if (checked !== SettingsController.isLoggingEnabled) {
Expand All @@ -98,6 +104,28 @@ PageType {
}
}

LabelWithButtonType {
id: supportUuid
Layout.fillWidth: true
Layout.topMargin: 16

text: qsTr("Support tag")
descriptionText: SettingsController.getInstallationUuid()

descriptionOnTop: true

rightImageSource: "qrc:/images/controls/copy.svg"
rightImageColor: AmneziaStyle.color.paleGray

visible: SettingsController.getInstallationUuid() !== ""
clickedFunction: function() {
GC.copyToClipBoard(descriptionText)
PageController.showNotificationMessage(qsTr("Copied"))
if (!GC.isMobile()) {
this.rightButton.forceActiveFocus()
}
}
}
}
}
}
Expand Down

0 comments on commit 2e175cb

Please sign in to comment.