mirror of
https://github.com/logos-storage/logos-storage-app-skeleton.git
synced 2026-06-13 20:09:28 +00:00
Add missing files
This commit is contained in:
parent
fa7664720c
commit
24da3fd5de
12
src/qml/LogosStorageLayout.qml
Normal file
12
src/qml/LogosStorageLayout.qml
Normal file
@ -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
|
||||
}
|
||||
45
src/qml/Nat.qml
Normal file
45
src/qml/Nat.qml
Normal file
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
58
src/qml/PortForwarding.qml
Normal file
58
src/qml/PortForwarding.qml
Normal file
@ -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)
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user