2023-05-03 19:06:16 +03:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
|
|
|
|
import PageEnum 1.0
|
2024-08-20 16:54:05 +07:00
|
|
|
import Style 1.0
|
2023-05-03 19:06:16 +03:00
|
|
|
|
|
|
|
|
import "./"
|
|
|
|
|
import "../Controls2"
|
|
|
|
|
import "../Controls2/TextTypes"
|
|
|
|
|
import "../Config"
|
|
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
PageType {
|
2023-05-03 19:06:16 +03:00
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
FlickableType {
|
|
|
|
|
id: fl
|
2023-06-20 10:25:24 +09:00
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.bottom: parent.bottom
|
2023-05-03 19:06:16 +03:00
|
|
|
contentHeight: content.height
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: content
|
|
|
|
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
spacing: 16
|
|
|
|
|
|
2023-06-05 15:49:10 +08:00
|
|
|
BackButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: backButton
|
2023-05-03 19:06:16 +03:00
|
|
|
Layout.topMargin: 20
|
2023-06-05 15:49:10 +08:00
|
|
|
}
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-06-05 15:49:10 +08:00
|
|
|
HeaderType {
|
|
|
|
|
Layout.fillWidth: true
|
2023-06-30 10:40:43 +09:00
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
Layout.leftMargin: 16
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-06-05 15:49:10 +08:00
|
|
|
headerText: qsTr("Connection key")
|
|
|
|
|
descriptionText: qsTr("A line that starts with vpn://...")
|
2023-05-03 19:06:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TextFieldWithHeaderType {
|
2023-06-05 15:49:10 +08:00
|
|
|
id: textKey
|
|
|
|
|
|
2023-05-03 19:06:16 +03:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 32
|
2023-06-30 10:40:43 +09:00
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
Layout.leftMargin: 16
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-06-05 15:49:10 +08:00
|
|
|
headerText: qsTr("Key")
|
2025-01-24 23:27:01 +07:00
|
|
|
textField.placeholderText: "vpn://"
|
2023-06-05 15:49:10 +08:00
|
|
|
buttonText: qsTr("Insert")
|
2023-05-03 19:06:16 +03:00
|
|
|
|
|
|
|
|
clickedFunc: function() {
|
|
|
|
|
textField.text = ""
|
|
|
|
|
textField.paste()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BasicButtonType {
|
2024-02-17 23:09:05 +02:00
|
|
|
id: continueButton
|
|
|
|
|
|
2023-05-03 19:06:16 +03:00
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.rightMargin: 16
|
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
|
anchors.bottomMargin: 32
|
|
|
|
|
|
2023-06-05 15:49:10 +08:00
|
|
|
text: qsTr("Continue")
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2024-02-17 23:09:05 +02:00
|
|
|
clickedFunc: function() {
|
2025-01-24 23:27:01 +07:00
|
|
|
if (ImportController.extractConfigFromData(textKey.textField.text)) {
|
2024-03-14 12:55:33 +05:00
|
|
|
PageController.goToPage(PageEnum.PageSetupWizardViewConfig)
|
|
|
|
|
}
|
2023-05-03 19:06:16 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|