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
|
|
|
|
|
|
2023-05-22 22:11:20 +08:00
|
|
|
Connections {
|
|
|
|
|
target: ImportController
|
|
|
|
|
|
|
|
|
|
function onImportFinished() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-03 19:06:16 +03:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
HeaderType {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 20
|
2023-05-27 22:46:41 +08:00
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
Layout.leftMargin: 16
|
2023-05-03 19:06:16 +03:00
|
|
|
|
2023-05-11 14:50:50 +08:00
|
|
|
backButtonImage: "qrc:/images/controls/arrow-left.svg"
|
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
|
|
|
|
|
Layout.topMargin: 32
|
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: "Файл с настройками подключения"
|
|
|
|
|
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
iconImage: "qrc:/images/controls/folder-open.svg"
|
|
|
|
|
|
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-05-22 22:11:20 +08:00
|
|
|
ImportController.importFromFile(selectedFile)
|
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-код"
|
|
|
|
|
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
iconImage: "qrc:/images/controls/qr-code.svg"
|
|
|
|
|
|
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: "Ключ в виде текста"
|
|
|
|
|
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
iconImage: "qrc:/images/controls/text-cursor.svg"
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|