amnezia-client/client/ui/qml/Pages2/PageSetupWizardTextKey.qml
vladimir.kuznetsov 420c33d3ba added PageSetupWizardViewConfig
- added a popup with a question when deleting containers/servers
- added import from code and import error handling
2023-06-05 15:49:10 +08:00

76 lines
1.7 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import PageEnum 1.0
import "./"
import "../Controls2"
import "../Controls2/TextTypes"
import "../Config"
PageType {
id: root
FlickableType {
id: fl
anchors.top: root.top
anchors.bottom: root.bottom
contentHeight: content.height
ColumnLayout {
id: content
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 16
anchors.leftMargin: 16
spacing: 16
BackButtonType {
Layout.topMargin: 20
}
HeaderType {
Layout.fillWidth: true
headerText: qsTr("Connection key")
descriptionText: qsTr("A line that starts with vpn://...")
}
TextFieldWithHeaderType {
id: textKey
Layout.fillWidth: true
Layout.topMargin: 32
headerText: qsTr("Key")
textFieldPlaceholderText: "vpn://"
buttonText: qsTr("Insert")
clickedFunc: function() {
textField.text = ""
textField.paste()
}
}
}
}
BasicButtonType {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 16
anchors.leftMargin: 16
anchors.bottomMargin: 32
text: qsTr("Continue")
onClicked: function() {
ImportController.extractConfigFromCode(textKey.textFieldText)
goToPage(PageEnum.PageSetupWizardViewConfig)
}
}
}