2023-05-03 19:06:16 +03:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Dialogs
|
|
|
|
|
|
|
|
|
|
import PageEnum 1.0
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2023-06-30 10:40:43 +09:00
|
|
|
spacing: 0
|
|
|
|
|
|
2023-06-05 15:49:10 +08:00
|
|
|
BackButtonType {
|
|
|
|
|
Layout.topMargin: 20
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-03 19:06:16 +03:00
|
|
|
HeaderType {
|
|
|
|
|
Layout.fillWidth: true
|
2023-06-30 10:40:43 +09:00
|
|
|
Layout.topMargin: 8
|
2023-05-27 22:46:41 +08:00
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
Layout.leftMargin: 16
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
headerText: "Подключение к серверу"
|
2023-05-03 19:06:16 +03:00
|
|
|
descriptionText: "Не используйте код подключения из публичных источников. Его могли создать, чтобы перехватывать ваши данные.\n
|
|
|
|
|
Всё в порядке, если код передал друг."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Header2TextType {
|
|
|
|
|
Layout.fillWidth: true
|
2023-06-30 10:40:43 +09:00
|
|
|
Layout.topMargin: 48
|
2023-05-27 22:46:41 +08:00
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
Layout.leftMargin: 16
|
2023-05-03 19:06:16 +03:00
|
|
|
|
|
|
|
|
text: "Что у вас есть?"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 16
|
|
|
|
|
|
|
|
|
|
text: "Файл с настройками подключения"
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/folder-open.svg"
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
clickedFunction: function() {
|
2023-05-03 19:06:16 +03:00
|
|
|
onClicked: fileDialog.open()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FileDialog {
|
|
|
|
|
id: fileDialog
|
|
|
|
|
onAccepted: {
|
2023-06-05 15:49:10 +08:00
|
|
|
ImportController.extractConfigFromFile(selectedFile)
|
|
|
|
|
goToPage(PageEnum.PageSetupWizardViewConfig)
|
2023-05-03 19:06:16 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
|
|
|
|
DividerType {}
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-05-06 06:52:23 +03:00
|
|
|
//todo ifdef mobile platforms
|
2023-05-03 19:06:16 +03:00
|
|
|
LabelWithButtonType {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
text: "QR-код"
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/qr-code.svg"
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
clickedFunction: function() {
|
2023-05-03 19:06:16 +03:00
|
|
|
}
|
|
|
|
|
}
|
2023-05-22 22:11:20 +08:00
|
|
|
|
2023-05-27 22:46:41 +08:00
|
|
|
DividerType {}
|
2023-05-03 19:06:16 +03:00
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
text: "Ключ в виде текста"
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/text-cursor.svg"
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
clickedFunction: function() {
|
|
|
|
|
goToPage(PageEnum.PageSetupWizardTextKey)
|
2023-05-03 19:06:16 +03:00
|
|
|
}
|
|
|
|
|
}
|
2023-05-22 22:11:20 +08:00
|
|
|
|
2023-05-27 22:46:41 +08:00
|
|
|
DividerType {}
|
2023-05-03 19:06:16 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|