From 24da3fd5de303e89b4b5b3ac8d366341925da64f Mon Sep 17 00:00:00 2001 From: Arnaud Date: Thu, 19 Feb 2026 08:51:16 +0400 Subject: [PATCH] Add missing files --- src/qml/LogosStorageLayout.qml | 12 +++++++ src/qml/Nat.qml | 45 ++++++++++++++++++++++++++ src/qml/PortForwarding.qml | 58 ++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 src/qml/LogosStorageLayout.qml create mode 100644 src/qml/Nat.qml create mode 100644 src/qml/PortForwarding.qml diff --git a/src/qml/LogosStorageLayout.qml b/src/qml/LogosStorageLayout.qml new file mode 100644 index 0000000..0ca2ac8 --- /dev/null +++ b/src/qml/LogosStorageLayout.qml @@ -0,0 +1,12 @@ +import QtQuick +import QtQuick.Layouts +import Logos.Theme + +Rectangle { + id: root + color: Theme.palette.background + Layout.fillWidth: true + Layout.fillHeight: true + implicitWidth: 600 + implicitHeight: 400 +} diff --git a/src/qml/Nat.qml b/src/qml/Nat.qml new file mode 100644 index 0000000..d3a9f0f --- /dev/null +++ b/src/qml/Nat.qml @@ -0,0 +1,45 @@ +import QtQuick +import QtQuick.Layouts +import Logos.Theme +import Logos.Controls + +LogosStorageLayout { + id: root + + signal completed(bool enabled) + + ColumnLayout { + anchors.centerIn: parent + spacing: Theme.spacing.medium + width: 400 + + LogosText { + id: questionText + font.pixelSize: Theme.typography.titleText + text: "Is UPnP enabled on your router ?" + Layout.alignment: Qt.AlignCenter + } + + LogosText { + id: questionDescriptionText + font.pixelSize: Theme.typography.primaryText + text: "UPnP simplifies configuration by handling port forwarding automatically." + Layout.alignment: Qt.AlignCenter + } + + RowLayout { + spacing: Theme.spacing.medium + Layout.alignment: Qt.AlignCenter + + LogosStorageButton { + text: "No / I don't know" + onClicked: root.completed(false) + } + + LogosStorageButton { + text: "Yes, I use UPnP" + onClicked: root.completed(true) + } + } + } +} diff --git a/src/qml/PortForwarding.qml b/src/qml/PortForwarding.qml new file mode 100644 index 0000000..b6102a1 --- /dev/null +++ b/src/qml/PortForwarding.qml @@ -0,0 +1,58 @@ +import QtQuick +import QtQuick.Layouts +import Logos.Theme +import Logos.Controls + +LogosStorageLayout { + id: root + + property var tcpPort: 0 + + signal portTcpSelected(int port) + + ColumnLayout { + anchors.centerIn: parent + spacing: Theme.spacing.medium + width: 400 + + LogosText { + id: questionText + font.pixelSize: Theme.typography.titleText + text: "Choose your TCP port" + Layout.alignment: Qt.AlignCenter + } + + LogosText { + id: questionDescriptionText + font.pixelSize: Theme.typography.primaryText + text: "The TCP port has to be open to connect with other remote peers." + Layout.alignment: Qt.AlignCenter + } + + LogosTextField { + isValid: acceptableInput && text.length > 0 + id: tcpPortTextField + placeholderText: "Enter the TCP port" + text: root.tcpPort + validator: IntValidator { + bottom: 0 + top: 65536 + } + onTextChanged: { + if (isValid) { + root.tcpPort = parseInt(text) + } + } + } + } + + LogosStorageButton { + text: "Next" + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.bottomMargin: 10 + anchors.rightMargin: 10 + enabled: tcpPortTextField.isValid + onClicked: root.portTcpSelected(root.tcpPort) + } +}