added protocol settings page and openvpn settings page
This commit is contained in:
parent
80fca589af
commit
1fd48a1cf8
12 changed files with 209 additions and 67 deletions
|
|
@ -164,7 +164,7 @@ PageType {
|
|||
|
||||
text: root.currentContainerName
|
||||
textColor: "#0E0E11"
|
||||
headerText: "Протокол подключения"
|
||||
headerText: qsTr("Протокол подключения")
|
||||
headerBackButtonImage: "qrc:/images/controls/arrow-left.svg"
|
||||
|
||||
onRootButtonClicked: function() {
|
||||
|
|
@ -198,7 +198,7 @@ PageType {
|
|||
|
||||
actionButtonImage: "qrc:/images/controls/plus.svg"
|
||||
|
||||
headerText: "Серверы"
|
||||
headerText: qsTr("Servers")
|
||||
|
||||
actionButtonFunction: function() {
|
||||
menu.visible = false
|
||||
|
|
@ -237,6 +237,7 @@ PageType {
|
|||
currentIndex: ServersModel.getDefaultServerIndex()
|
||||
|
||||
clip: true
|
||||
interactive: false
|
||||
|
||||
delegate: Item {
|
||||
id: menuContentDelegate
|
||||
|
|
|
|||
24
client/ui/qml/Pages2/PageSettingsServerProtocol.qml
Normal file
24
client/ui/qml/Pages2/PageSettingsServerProtocol.qml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
import "../Config"
|
||||
import "../Components"
|
||||
import "../Components/Protocols"
|
||||
|
||||
PageType {
|
||||
id: root
|
||||
|
||||
OpenVpnSettings {
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
|
@ -67,6 +67,7 @@ PageType {
|
|||
model: ServersModel
|
||||
|
||||
clip: true
|
||||
interactive: false
|
||||
|
||||
delegate: Item {
|
||||
implicitWidth: servers.width
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import "./"
|
|||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
import "../Config"
|
||||
import "../Components"
|
||||
|
||||
PageType {
|
||||
id: root
|
||||
|
|
@ -83,53 +84,11 @@ PageType {
|
|||
text: "Network protocol"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: transportProtoBackground
|
||||
TransportProtoSelector {
|
||||
id: transportProtoSelector
|
||||
|
||||
implicitWidth: transportProtoButtonGroup.implicitWidth
|
||||
implicitHeight: transportProtoButtonGroup.implicitHeight
|
||||
|
||||
color: "#1C1D21"
|
||||
radius: 16
|
||||
|
||||
RowLayout {
|
||||
id: transportProtoButtonGroup
|
||||
|
||||
property int currentIndex
|
||||
spacing: 0
|
||||
|
||||
HorizontalRadioButton {
|
||||
checked: transportProtoButtonGroup.currentIndex === 0
|
||||
|
||||
implicitWidth: (root.width - 32) / 2
|
||||
text: "UDP"
|
||||
|
||||
hoverEnabled: !transportProtoButtonMouseArea.enabled
|
||||
|
||||
onClicked: {
|
||||
transportProtoButtonGroup.currentIndex = 0
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalRadioButton {
|
||||
checked: transportProtoButtonGroup.currentIndex === 1
|
||||
|
||||
implicitWidth: (root.width - 32) / 2
|
||||
text: "TCP"
|
||||
|
||||
hoverEnabled: !transportProtoButtonMouseArea.enabled
|
||||
|
||||
onClicked: {
|
||||
transportProtoButtonGroup.currentIndex = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: transportProtoButtonMouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
Layout.fillWidth: true
|
||||
rootWidth: root.width
|
||||
}
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
|
|
@ -143,7 +102,7 @@ PageType {
|
|||
Rectangle {
|
||||
// todo make it dynamic
|
||||
implicitHeight: root.height - port.implicitHeight -
|
||||
transportProtoBackground.implicitHeight - transportProtoHeader.implicitHeight -
|
||||
transportProtoSelector.implicitHeight - transportProtoHeader.implicitHeight -
|
||||
header.implicitHeight - backButton.implicitHeight - installButton.implicitHeight - 116
|
||||
|
||||
color: "transparent"
|
||||
|
|
@ -159,7 +118,7 @@ PageType {
|
|||
|
||||
onClicked: function() {
|
||||
goToPage(PageEnum.PageSetupWizardInstalling);
|
||||
InstallController.install(dockerContainer, port.textFieldText, transportProtoButtonGroup.currentIndex)
|
||||
InstallController.install(dockerContainer, port.textFieldText, transportProtoSelector.currentIndex)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -172,10 +131,10 @@ PageType {
|
|||
} else {
|
||||
port.textFieldText = ProtocolProps.defaultPort(defaultContainerProto)
|
||||
}
|
||||
transportProtoButtonGroup.currentIndex = ProtocolProps.defaultTransportProto(defaultContainerProto)
|
||||
transportProtoSelector.currentIndex = ProtocolProps.defaultTransportProto(defaultContainerProto)
|
||||
|
||||
port.enabled = ProtocolProps.defaultPortChangeable(defaultContainerProto)
|
||||
transportProtoButtonMouseArea.enabled = !ProtocolProps.defaultTransportProtoChangeable(defaultContainerProto)
|
||||
transportProtoSelector.mouseArea.enabled = !ProtocolProps.defaultTransportProtoChangeable(defaultContainerProto)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ PageType {
|
|||
TabImageButtonType {
|
||||
isSelected: tabBar.currentIndex === 1
|
||||
image: "qrc:/images/controls/share-2.svg"
|
||||
onClicked: {}
|
||||
}
|
||||
TabImageButtonType {
|
||||
isSelected: tabBar.currentIndex === 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue