QML refactoring
This commit is contained in:
parent
fd905ef308
commit
1d8f342417
33 changed files with 322 additions and 473 deletions
|
@ -161,5 +161,6 @@
|
||||||
<file>server_scripts/website_tor/Dockerfile</file>
|
<file>server_scripts/website_tor/Dockerfile</file>
|
||||||
<file>ui/qml/Pages/PageViewConfig.qml</file>
|
<file>ui/qml/Pages/PageViewConfig.qml</file>
|
||||||
<file>ui/qml/Controls/FlickableType.qml</file>
|
<file>ui/qml/Controls/FlickableType.qml</file>
|
||||||
|
<file>ui/qml/Controls/UrlButtonType.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -8,6 +8,8 @@ Item {
|
||||||
readonly property int screenWidth: 380
|
readonly property int screenWidth: 380
|
||||||
readonly property int screenHeight: 640
|
readonly property int screenHeight: 640
|
||||||
|
|
||||||
|
readonly property int defaultMargin: 20
|
||||||
|
|
||||||
function isMobile() {
|
function isMobile() {
|
||||||
if (Qt.platform.os == "android" ||
|
if (Qt.platform.os == "android" ||
|
||||||
Qt.platform.os == "ios") {
|
Qt.platform.os == "ios") {
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
|
||||||
|
import "../Config"
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: root
|
id: root
|
||||||
width: parent.width - 80
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
height: 40
|
implicitHeight: 40
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
import "../Config"
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
id: fl
|
id: fl
|
||||||
|
|
||||||
|
clip: true
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
anchors.topMargin: GC.defaultMargin
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: GC.defaultMargin
|
||||||
|
anchors.left: root.left
|
||||||
|
anchors.leftMargin: GC.defaultMargin
|
||||||
|
anchors.right: root.right
|
||||||
|
anchors.rightMargin: 1
|
||||||
|
|
||||||
Keys.onUpPressed: scrollBar.decrease()
|
Keys.onUpPressed: scrollBar.decrease()
|
||||||
Keys.onDownPressed: scrollBar.increase()
|
Keys.onDownPressed: scrollBar.increase()
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
id: scrollBar
|
id: scrollBar
|
||||||
policy: fl.height > fl.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
policy: fl.height >= fl.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
|
import "../Config"
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: root
|
id: root
|
||||||
x: 40
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
width: parent.width
|
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
|
|
||||||
font.family: "Lato"
|
font.family: "Lato"
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Qt.labs.platform 1.0
|
||||||
|
|
||||||
import "../Config"
|
import "../Config"
|
||||||
|
|
||||||
FlickableType
|
Flickable
|
||||||
{
|
{
|
||||||
property alias textArea: root
|
property alias textArea: root
|
||||||
id: flickable
|
id: flickable
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import Qt.labs.platform 1.0
|
import Qt.labs.platform 1.0
|
||||||
|
import "../Config"
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: root
|
id: root
|
||||||
property bool error: false
|
property bool error: false
|
||||||
|
|
||||||
width: parent.width - 80
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
height: 40
|
height: 40
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|
||||||
selectionColor: "darkgray"
|
selectionColor: "darkgray"
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
color: "#333333"
|
color: "#333333"
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: 200
|
implicitWidth: 200
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
|
|
25
client/ui/qml/Controls/UrlButtonType.qml
Normal file
25
client/ui/qml/Controls/UrlButtonType.qml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
import QtQuick 2.12
|
||||||
|
import QtQuick.Controls 2.12
|
||||||
|
|
||||||
|
BasicButtonType {
|
||||||
|
property alias label: lbl
|
||||||
|
id: root
|
||||||
|
antialiasing: true
|
||||||
|
height: 21
|
||||||
|
background: Item {}
|
||||||
|
|
||||||
|
contentItem: Text {
|
||||||
|
id: lbl
|
||||||
|
anchors.fill: parent
|
||||||
|
font.family: "Lato"
|
||||||
|
font.styleName: "normal"
|
||||||
|
font.pixelSize: 18
|
||||||
|
font.underline: true
|
||||||
|
|
||||||
|
text: root.text
|
||||||
|
color: "#3045ee"
|
||||||
|
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
}
|
||||||
|
}
|
|
@ -51,7 +51,6 @@ Drawer {
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
clip: true
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
contentHeight: col.height
|
contentHeight: col.height
|
||||||
|
|
||||||
|
|
|
@ -21,18 +21,9 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: logo.top
|
anchors.bottom: logo.top
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -17,8 +17,4 @@ Item {
|
||||||
|
|
||||||
onActivated: pageActive = true
|
onActivated: pageActive = true
|
||||||
onDeactivated: pageActive = false
|
onDeactivated: pageActive = false
|
||||||
|
|
||||||
// width: GC.screenWidth
|
|
||||||
// height: GC.screenHeight
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,18 +19,10 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: back.bottom
|
anchors.top: back.bottom
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 10
|
anchors.bottomMargin: 10
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 30
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
@ -39,6 +31,7 @@ PageBase {
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: GC.defaultMargin
|
||||||
|
|
||||||
spacing: 15
|
spacing: 15
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
import PageEnum 1.0
|
import PageEnum 1.0
|
||||||
import "./"
|
import "./"
|
||||||
import "../Controls"
|
import "../Controls"
|
||||||
|
@ -18,108 +19,97 @@ PageBase {
|
||||||
text: qsTr("DNS Servers")
|
text: qsTr("DNS Servers")
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBoxType {
|
FlickableType {
|
||||||
id: cb_amnezia_dns
|
id: fl
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
x: 30
|
contentHeight: content.height
|
||||||
width: parent.width - 60
|
|
||||||
text: qsTr("Use AmneziaDNS service (recommended)")
|
|
||||||
checked: NetworkSettingsLogic.checkBoxUseAmneziaDnsChecked
|
|
||||||
onCheckedChanged: {
|
|
||||||
NetworkSettingsLogic.checkBoxUseAmneziaDnsChecked = checked
|
|
||||||
NetworkSettingsLogic.onCheckBoxUseAmneziaDnsToggled(checked)
|
|
||||||
UiLogic.onUpdateAllPages()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LabelType {
|
ColumnLayout {
|
||||||
id: lb_amnezia_dns
|
id: content
|
||||||
x: 30
|
enabled: logic.pageEnabled
|
||||||
anchors.top: cb_amnezia_dns.bottom
|
anchors.top: parent.top
|
||||||
width: parent.width - 60
|
anchors.left: parent.left
|
||||||
text: qsTr("Use AmneziaDNS container on your server, when it installed.\n
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 15
|
||||||
|
|
||||||
|
CheckBoxType {
|
||||||
|
Layout.preferredWidth: parent.width
|
||||||
|
text: qsTr("Use AmneziaDNS service (recommended)")
|
||||||
|
checked: NetworkSettingsLogic.checkBoxUseAmneziaDnsChecked
|
||||||
|
onCheckedChanged: {
|
||||||
|
NetworkSettingsLogic.checkBoxUseAmneziaDnsChecked = checked
|
||||||
|
NetworkSettingsLogic.onCheckBoxUseAmneziaDnsToggled(checked)
|
||||||
|
UiLogic.onUpdateAllPages()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LabelType {
|
||||||
|
Layout.preferredWidth: parent.width
|
||||||
|
text: qsTr("Use AmneziaDNS container on your server, when it installed.\n
|
||||||
Your AmneziaDNS server available only when it installed and VPN connected, it has internal IP address 172.29.172.254\n
|
Your AmneziaDNS server available only when it installed and VPN connected, it has internal IP address 172.29.172.254\n
|
||||||
If AmneziaDNS service is not installed on the same server, or this option is unchecked, the following DNS servers will be used:")
|
If AmneziaDNS service is not installed on the same server, or this option is unchecked, the following DNS servers will be used:")
|
||||||
}
|
}
|
||||||
|
|
||||||
LabelType {
|
LabelType {
|
||||||
id: l1
|
Layout.topMargin: 15
|
||||||
x: 30
|
text: qsTr("Primary DNS server")
|
||||||
anchors.top: lb_amnezia_dns.bottom
|
}
|
||||||
width: parent.width - 30
|
TextFieldType {
|
||||||
height: 21
|
height: 40
|
||||||
text: qsTr("Primary DNS server")
|
implicitWidth: parent.width
|
||||||
}
|
text: NetworkSettingsLogic.lineEditDns1Text
|
||||||
TextFieldType {
|
onEditingFinished: {
|
||||||
id: dns1
|
NetworkSettingsLogic.lineEditDns1Text = text
|
||||||
x: 30
|
NetworkSettingsLogic.onLineEditDns1EditFinished(text)
|
||||||
anchors.top: l1.bottom
|
UiLogic.onUpdateAllPages()
|
||||||
width: parent.width - 90
|
}
|
||||||
height: 40
|
validator: RegExpValidator {
|
||||||
text: NetworkSettingsLogic.lineEditDns1Text
|
regExp: NetworkSettingsLogic.ipAddressRegex
|
||||||
onEditingFinished: {
|
}
|
||||||
NetworkSettingsLogic.lineEditDns1Text = text
|
}
|
||||||
NetworkSettingsLogic.onLineEditDns1EditFinished(text)
|
|
||||||
UiLogic.onUpdateAllPages()
|
UrlButtonType {
|
||||||
}
|
text: qsTr("Reset to default")
|
||||||
validator: RegExpValidator {
|
label.horizontalAlignment: Text.AlignLeft
|
||||||
regExp: NetworkSettingsLogic.ipAddressRegex
|
label.verticalAlignment: Text.AlignTop
|
||||||
}
|
label.font.pixelSize: 14
|
||||||
}
|
icon.source: "qrc:/images/svg/refresh_black_24dp.svg"
|
||||||
SvgButtonType {
|
onClicked: {
|
||||||
id: resetDNS1
|
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
|
||||||
anchors. left: dns1.right
|
UiLogic.onUpdateAllPages()
|
||||||
anchors.leftMargin: 10
|
}
|
||||||
anchors.verticalCenter: dns1.verticalCenter
|
}
|
||||||
width: 24
|
|
||||||
height: 24
|
LabelType {
|
||||||
icon.source: "qrc:/images/svg/refresh_black_24dp.svg"
|
text: qsTr("Secondary DNS server")
|
||||||
onClicked: {
|
}
|
||||||
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
|
TextFieldType {
|
||||||
UiLogic.onUpdateAllPages()
|
height: 40
|
||||||
|
implicitWidth: parent.width
|
||||||
|
text: NetworkSettingsLogic.lineEditDns2Text
|
||||||
|
onEditingFinished: {
|
||||||
|
NetworkSettingsLogic.lineEditDns2Text = text
|
||||||
|
NetworkSettingsLogic.onLineEditDns2EditFinished(text)
|
||||||
|
UiLogic.onUpdateAllPages()
|
||||||
|
}
|
||||||
|
validator: RegExpValidator {
|
||||||
|
regExp: NetworkSettingsLogic.ipAddressRegex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UrlButtonType {
|
||||||
|
text: qsTr("Reset to default")
|
||||||
|
label.horizontalAlignment: Text.AlignLeft
|
||||||
|
label.verticalAlignment: Text.AlignTop
|
||||||
|
label.font.pixelSize: 14
|
||||||
|
icon.source: "qrc:/images/svg/refresh_black_24dp.svg"
|
||||||
|
onClicked: {
|
||||||
|
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
|
||||||
|
UiLogic.onUpdateAllPages()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LabelType {
|
|
||||||
id: l2
|
|
||||||
x: 30
|
|
||||||
anchors.top: dns1.bottom
|
|
||||||
anchors.topMargin: 20
|
|
||||||
width: parent.width - 60
|
|
||||||
height: 21
|
|
||||||
text: qsTr("Secondary DNS server")
|
|
||||||
}
|
|
||||||
TextFieldType {
|
|
||||||
id: dns2
|
|
||||||
x: 30
|
|
||||||
anchors.top: l2.bottom
|
|
||||||
width: parent.width - 90
|
|
||||||
height: 40
|
|
||||||
text: NetworkSettingsLogic.lineEditDns2Text
|
|
||||||
onEditingFinished: {
|
|
||||||
NetworkSettingsLogic.lineEditDns2Text = text
|
|
||||||
NetworkSettingsLogic.onLineEditDns2EditFinished(text)
|
|
||||||
UiLogic.onUpdateAllPages()
|
|
||||||
}
|
|
||||||
validator: RegExpValidator {
|
|
||||||
regExp: NetworkSettingsLogic.ipAddressRegex
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SvgButtonType {
|
|
||||||
id: resetDNS2
|
|
||||||
anchors. left: dns2.right
|
|
||||||
anchors.leftMargin: 10
|
|
||||||
anchors.verticalCenter: dns2.verticalCenter
|
|
||||||
width: 24
|
|
||||||
height: 24
|
|
||||||
icon.source: "qrc:/images/svg/refresh_black_24dp.svg"
|
|
||||||
onClicked: {
|
|
||||||
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
|
|
||||||
UiLogic.onUpdateAllPages()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Logo {
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@ import "../Config"
|
||||||
PageBase {
|
PageBase {
|
||||||
id: root
|
id: root
|
||||||
page: PageEnum.NewServer
|
page: PageEnum.NewServer
|
||||||
//logic: {}
|
|
||||||
|
|
||||||
BackButton {
|
BackButton {
|
||||||
id: back_from_new_server
|
id: back_from_new_server
|
||||||
|
@ -22,15 +21,15 @@ PageBase {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: qsTr("If you want easily configure your server just run Wizard")
|
text: qsTr("If you want easily configure your server just run Wizard")
|
||||||
width: parent.width - 80
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 30
|
anchors.topMargin: 30
|
||||||
}
|
}
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
id: pushButtonWizard
|
id: pushButtonWizard
|
||||||
text: qsTr("Run Setup Wizard")
|
text: qsTr("Run Setup Wizard")
|
||||||
anchors.top: labelWizard.bottom
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.top: labelWizard.bottom
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UiLogic.goToPage(PageEnum.Wizard);
|
UiLogic.goToPage(PageEnum.Wizard);
|
||||||
|
@ -41,14 +40,13 @@ PageBase {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: qsTr("Press configure manually to choose VPN protocols you want to install")
|
text: qsTr("Press configure manually to choose VPN protocols you want to install")
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
width: parent.width - 80
|
|
||||||
anchors.top: pushButtonWizard.bottom
|
anchors.top: pushButtonWizard.bottom
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
}
|
}
|
||||||
|
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
text: qsTr("Configure VPN protocols manually")
|
text: qsTr("Configure")
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: labelManual.bottom
|
anchors.top: labelManual.bottom
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
|
|
|
@ -220,7 +220,6 @@ PageBase {
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: tb_c
|
id: tb_c
|
||||||
x: 10
|
|
||||||
width: parent.width - 10
|
width: parent.width - 10
|
||||||
height: tb_c.contentItem.height
|
height: tb_c.contentItem.height
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
|
@ -427,7 +426,7 @@ PageBase {
|
||||||
|
|
||||||
width: parent.width - 40
|
width: parent.width - 40
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Install new protocols container")
|
text: qsTr("Install new service")
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
onClicked: container_selector.visible ? container_selector.close() : container_selector.open()
|
onClicked: container_selector.visible ? container_selector.close() : container_selector.open()
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,10 @@ PageBase {
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listWidget_servers
|
id: listWidget_servers
|
||||||
x: 20
|
x: GC.defaultMargin
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 15
|
anchors.topMargin: 15
|
||||||
width: parent.width - 30
|
width: parent.width - GC.defaultMargin - 1
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 20
|
anchors.bottomMargin: 20
|
||||||
model: ServerListLogic.serverListModel
|
model: ServerListLogic.serverListModel
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
import PageEnum 1.0
|
import PageEnum 1.0
|
||||||
import "./"
|
import "./"
|
||||||
import "../Controls"
|
import "../Controls"
|
||||||
|
@ -16,113 +17,103 @@ PageBase {
|
||||||
id: back
|
id: back
|
||||||
}
|
}
|
||||||
Caption {
|
Caption {
|
||||||
|
id: caption
|
||||||
text: qsTr("Server settings")
|
text: qsTr("Server settings")
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
LabelType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
FlickableType {
|
||||||
y: 150
|
id: fl
|
||||||
width: 341
|
anchors.top: caption.bottom
|
||||||
height: 31
|
anchors.bottom: logo.top
|
||||||
font.pixelSize: 20
|
contentHeight: content.height
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
text: ServerSettingsLogic.labelCurrentVpnProtocolText
|
ColumnLayout {
|
||||||
}
|
id: content
|
||||||
// LabelType {
|
enabled: logic.pageEnabled
|
||||||
// anchors.horizontalCenter: parent.horizontalCenter
|
anchors.top: parent.top
|
||||||
// y: 120
|
anchors.left: parent.left
|
||||||
// width: 341
|
anchors.right: parent.right
|
||||||
// height: 31
|
anchors.rightMargin: 15
|
||||||
// font.pixelSize: 20
|
|
||||||
// horizontalAlignment: Text.AlignHCenter
|
LabelType {
|
||||||
// text: ServerSettingsLogic.labelServerText
|
Layout.fillWidth: true
|
||||||
// }
|
font.pixelSize: 20
|
||||||
TextFieldType {
|
horizontalAlignment: Text.AlignHCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
text: ServerSettingsLogic.labelCurrentVpnProtocolText
|
||||||
y: 120
|
}
|
||||||
width: 341
|
|
||||||
height: 31
|
TextFieldType {
|
||||||
font.pixelSize: 20
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
font.pixelSize: 20
|
||||||
text: ServerSettingsLogic.labelServerText
|
horizontalAlignment: Text.AlignHCenter
|
||||||
readOnly: true
|
text: ServerSettingsLogic.labelServerText
|
||||||
background: Item {}
|
readOnly: true
|
||||||
|
background: Item {}
|
||||||
|
}
|
||||||
|
|
||||||
|
LabelType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: ServerSettingsLogic.labelWaitInfoText
|
||||||
|
visible: ServerSettingsLogic.labelWaitInfoVisible
|
||||||
|
}
|
||||||
|
TextFieldType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: ServerSettingsLogic.lineEditDescriptionText
|
||||||
|
onEditingFinished: {
|
||||||
|
ServerSettingsLogic.lineEditDescriptionText = text
|
||||||
|
ServerSettingsLogic.onLineEditDescriptionEditingFinished()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BlueButtonType {
|
||||||
|
text: qsTr("Protocols and Services")
|
||||||
|
Layout.topMargin: 20
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onClicked: {
|
||||||
|
UiLogic.goToPage(PageEnum.ServerContainers)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BlueButtonType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Share Server (FULL ACCESS)")
|
||||||
|
visible: ServerSettingsLogic.pushButtonShareFullVisible
|
||||||
|
onClicked: {
|
||||||
|
ServerSettingsLogic.onPushButtonShareFullClicked()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BlueButtonType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 60
|
||||||
|
text: ServerSettingsLogic.pushButtonClearText
|
||||||
|
visible: ServerSettingsLogic.pushButtonClearVisible
|
||||||
|
onClicked: {
|
||||||
|
ServerSettingsLogic.onPushButtonClearServer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BlueButtonType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: ServerSettingsLogic.pushButtonClearClientCacheText
|
||||||
|
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
|
||||||
|
onClicked: {
|
||||||
|
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BlueButtonType {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Forget this server")
|
||||||
|
onClicked: {
|
||||||
|
ServerSettingsLogic.onPushButtonForgetServer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LabelType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
y: 530
|
|
||||||
width: 301
|
|
||||||
height: 41
|
|
||||||
text: ServerSettingsLogic.labelWaitInfoText
|
|
||||||
visible: ServerSettingsLogic.labelWaitInfoVisible
|
|
||||||
}
|
|
||||||
TextFieldType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
y: 80
|
|
||||||
width: 251
|
|
||||||
height: 31
|
|
||||||
text: ServerSettingsLogic.lineEditDescriptionText
|
|
||||||
onEditingFinished: {
|
|
||||||
ServerSettingsLogic.lineEditDescriptionText = text
|
|
||||||
ServerSettingsLogic.onLineEditDescriptionEditingFinished()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlueButtonType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
y: 410
|
|
||||||
width: parent.width - 40
|
|
||||||
height: 40
|
|
||||||
text: ServerSettingsLogic.pushButtonClearText
|
|
||||||
visible: ServerSettingsLogic.pushButtonClearVisible
|
|
||||||
onClicked: {
|
|
||||||
ServerSettingsLogic.onPushButtonClearServer()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlueButtonType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
y: 350
|
|
||||||
width: parent.width - 40
|
|
||||||
height: 40
|
|
||||||
text: ServerSettingsLogic.pushButtonClearClientCacheText
|
|
||||||
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
|
|
||||||
onClicked: {
|
|
||||||
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlueButtonType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
y: 470
|
|
||||||
width: parent.width - 40
|
|
||||||
height: 40
|
|
||||||
text: qsTr("Forget this server")
|
|
||||||
onClicked: {
|
|
||||||
ServerSettingsLogic.onPushButtonForgetServer()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlueButtonType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
y: 210
|
|
||||||
width: parent.width - 40
|
|
||||||
height: 40
|
|
||||||
text: qsTr("Protocols and Services")
|
|
||||||
onClicked: {
|
|
||||||
UiLogic.goToPage(PageEnum.ServerContainers)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlueButtonType {
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
y: 260
|
|
||||||
width: parent.width - 40
|
|
||||||
height: 40
|
|
||||||
text: qsTr("Share Server (FULL ACCESS)")
|
|
||||||
visible: ServerSettingsLogic.pushButtonShareFullVisible
|
|
||||||
onClicked: {
|
|
||||||
ServerSettingsLogic.onPushButtonShareFullClicked()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Logo {
|
Logo {
|
||||||
|
id : logo
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,18 +21,9 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
anchors.bottom: next_button.top
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
@ -94,21 +85,23 @@ OpenVPN over ShadowSocks profile will be installed.\n")
|
||||||
text: qsTr("I want to improve my privacy on the internet.
|
text: qsTr("I want to improve my privacy on the internet.
|
||||||
OpenVPN profile will be installed.\n")
|
OpenVPN profile will be installed.\n")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BlueButtonType {
|
||||||
BlueButtonType {
|
id: next_button
|
||||||
Layout.fillWidth: true
|
anchors.bottom: parent.bottom
|
||||||
Layout.preferredHeight: 41
|
anchors.bottomMargin: GC.defaultMargin
|
||||||
text: qsTr("Next")
|
x: GC.defaultMargin
|
||||||
onClicked: {
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
if (radioButton_setup_wizard_high.checked) {
|
text: qsTr("Next")
|
||||||
UiLogic.goToPage(PageEnum.WizardHigh, false);
|
onClicked: {
|
||||||
} else if (radioButton_setup_wizard_medium.checked) {
|
if (radioButton_setup_wizard_high.checked) {
|
||||||
UiLogic.goToPage(PageEnum.WizardMedium, false);
|
UiLogic.goToPage(PageEnum.WizardHigh, false);
|
||||||
} else if (radioButton_setup_wizard_low.checked) {
|
} else if (radioButton_setup_wizard_medium.checked) {
|
||||||
UiLogic.goToPage(PageEnum.WizardLow, false);
|
UiLogic.goToPage(PageEnum.WizardMedium, false);
|
||||||
}
|
} else if (radioButton_setup_wizard_low.checked) {
|
||||||
}
|
UiLogic.goToPage(PageEnum.WizardLow, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,18 +21,9 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
anchors.bottom: next_button.top
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
@ -84,22 +75,22 @@ You SHOULD set this website address to some foreign website which is not blocked
|
||||||
|
|
||||||
This protocol support exporting connection profiles to mobile devices by exporting ShadowSocks and Cloak configs (you should launch the 3rd party open source VPN client - ShadowSocks VPN and install Cloak plugin).")
|
This protocol support exporting connection profiles to mobile devices by exporting ShadowSocks and Cloak configs (you should launch the 3rd party open source VPN client - ShadowSocks VPN and install Cloak plugin).")
|
||||||
}
|
}
|
||||||
BlueButtonType {
|
|
||||||
id: next_button
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 15
|
|
||||||
Layout.preferredHeight: 41
|
|
||||||
text: qsTr("Next")
|
|
||||||
onClicked: {
|
|
||||||
let domain = website_masking.text;
|
|
||||||
if (!domain || !domain.includes(".")) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
UiLogic.goToPage(PageEnum.WizardVpnMode, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BlueButtonType {
|
||||||
|
id: next_button
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: GC.defaultMargin
|
||||||
|
x: GC.defaultMargin
|
||||||
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
|
text: qsTr("Next")
|
||||||
|
onClicked: {
|
||||||
|
let domain = website_masking.text;
|
||||||
|
if (!domain || !domain.includes(".")) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
UiLogic.goToPage(PageEnum.WizardVpnMode, false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,18 +21,9 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
anchors.bottom: next_button.top
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
@ -57,16 +48,18 @@ We recommend not to use messaging applications for sending the connection profil
|
||||||
text: qsTr('OpenVPN profile will be installed')
|
text: qsTr('OpenVPN profile will be installed')
|
||||||
verticalAlignment: Text.AlignBottom
|
verticalAlignment: Text.AlignBottom
|
||||||
}
|
}
|
||||||
BlueButtonType {
|
}
|
||||||
id: next_button
|
}
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 15
|
BlueButtonType {
|
||||||
Layout.preferredHeight: 41
|
id: next_button
|
||||||
text: qsTr("Start configuring")
|
anchors.bottom: parent.bottom
|
||||||
onClicked: {
|
anchors.bottomMargin: GC.defaultMargin
|
||||||
WizardLogic.onPushButtonLowFinishClicked()
|
x: GC.defaultMargin
|
||||||
}
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
}
|
text: qsTr("Start configuring")
|
||||||
|
onClicked: {
|
||||||
|
WizardLogic.onPushButtonLowFinishClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,18 +21,9 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
anchors.bottom: next_button.top
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
@ -52,16 +43,18 @@ PageBase {
|
||||||
Layout.topMargin: 15
|
Layout.topMargin: 15
|
||||||
text: qsTr('OpenVPN over ShadowSocks profile will be installed')
|
text: qsTr('OpenVPN over ShadowSocks profile will be installed')
|
||||||
}
|
}
|
||||||
BlueButtonType {
|
}
|
||||||
id: next_button
|
}
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 15
|
BlueButtonType {
|
||||||
Layout.preferredHeight: 41
|
id: next_button
|
||||||
text: qsTr("Next")
|
anchors.bottom: parent.bottom
|
||||||
onClicked: {
|
anchors.bottomMargin: GC.defaultMargin
|
||||||
UiLogic.goToPage(PageEnum.WizardVpnMode, false)
|
x: GC.defaultMargin
|
||||||
}
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
}
|
text: qsTr("Next")
|
||||||
|
onClicked: {
|
||||||
|
UiLogic.goToPage(PageEnum.WizardVpnMode, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,18 +21,9 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
anchors.bottom: vpn_mode_finish.top
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
@ -57,17 +48,18 @@ You can enable VPN mode "For selected sites" and add blocked sites you need to v
|
||||||
WizardLogic.checkBoxVpnModeChecked = checked
|
WizardLogic.checkBoxVpnModeChecked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BlueButtonType {
|
BlueButtonType {
|
||||||
id: vpn_mode_finish
|
id: vpn_mode_finish
|
||||||
Layout.fillWidth: true
|
anchors.bottom: parent.bottom
|
||||||
Layout.topMargin: 15
|
anchors.bottomMargin: GC.defaultMargin
|
||||||
Layout.preferredHeight: 41
|
x: GC.defaultMargin
|
||||||
text: qsTr("Start configuring")
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
onClicked: {
|
text: qsTr("Start configuring")
|
||||||
WizardLogic.onPushButtonVpnModeFinishClicked()
|
onClicked: {
|
||||||
}
|
WizardLogic.onPushButtonVpnModeFinishClicked()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,7 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
clip: true
|
clip: true
|
||||||
width: parent.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.bottom: root.bottom
|
|
||||||
contentHeight: col.height
|
contentHeight: col.height
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
|
||||||
|
@ -56,7 +54,6 @@ PageBase {
|
||||||
|
|
||||||
|
|
||||||
ShareConnectionContent {
|
ShareConnectionContent {
|
||||||
x: 10
|
|
||||||
text: qsTr("Share for Amnezia")
|
text: qsTr("Share for Amnezia")
|
||||||
height: 40
|
height: 40
|
||||||
width: tb_c.width - 10
|
width: tb_c.width - 10
|
||||||
|
@ -65,7 +62,6 @@ PageBase {
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: tb_c
|
id: tb_c
|
||||||
x: 10
|
|
||||||
width: parent.width - 10
|
width: parent.width - 10
|
||||||
height: tb_c.contentItem.height
|
height: tb_c.contentItem.height
|
||||||
currentIndex: -1
|
currentIndex: -1
|
||||||
|
|
|
@ -29,12 +29,12 @@ PageBase {
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: start_switch_page
|
id: start_switch_page
|
||||||
|
width: parent.width - 2 * GC.defaultMargin
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.bottom: logo.top
|
anchors.bottom: logo.top
|
||||||
anchors.bottomMargin: 10
|
anchors.bottomMargin: 10
|
||||||
|
|
||||||
width: parent.width - 80
|
|
||||||
height: 40
|
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
|
||||||
text: qsTr("Set up your own server")
|
text: qsTr("Set up your own server")
|
||||||
|
@ -71,7 +71,6 @@ PageBase {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -87,6 +86,7 @@ PageBase {
|
||||||
id: label_connection_code
|
id: label_connection_code
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 20
|
anchors.topMargin: 20
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: qsTr("Connection code")
|
text: qsTr("Connection code")
|
||||||
}
|
}
|
||||||
TextFieldType {
|
TextFieldType {
|
||||||
|
@ -286,7 +286,8 @@ PageBase {
|
||||||
}
|
}
|
||||||
enabled: StartPageLogic.pushButtonConnectEnabled
|
enabled: StartPageLogic.pushButtonConnectEnabled
|
||||||
}
|
}
|
||||||
BasicButtonType {
|
|
||||||
|
UrlButtonType {
|
||||||
id: new_sever_connect_key
|
id: new_sever_connect_key
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: new_sever_connect.bottom
|
anchors.top: new_sever_connect.bottom
|
||||||
|
@ -294,21 +295,8 @@ PageBase {
|
||||||
width: 281
|
width: 281
|
||||||
height: 21
|
height: 21
|
||||||
text: qsTr("Connect using SSH key")
|
text: qsTr("Connect using SSH key")
|
||||||
background: Item {
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
|
|
||||||
contentItem: Text {
|
label.font.pixelSize: 16
|
||||||
anchors.fill: parent
|
|
||||||
font.family: "Lato"
|
|
||||||
font.styleName: "normal"
|
|
||||||
font.pixelSize: 16
|
|
||||||
color: "#15CDCB";
|
|
||||||
text: new_sever_connect_key.text
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
}
|
|
||||||
antialiasing: true
|
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: StartPageLogic.pushButtonConnectKeyChecked
|
checked: StartPageLogic.pushButtonConnectKeyChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
|
|
|
@ -30,27 +30,12 @@ PageBase {
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
UrlButtonType {
|
||||||
y: 10
|
y: 10
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
height: 21
|
height: 21
|
||||||
background: Item {}
|
label.color: "#D4D4D4"
|
||||||
|
label.text: qsTr("Donate")
|
||||||
|
|
||||||
contentItem: Text {
|
|
||||||
anchors.fill: parent
|
|
||||||
font.family: "Lato"
|
|
||||||
font.styleName: "normal"
|
|
||||||
font.pixelSize: 18
|
|
||||||
font.underline: true
|
|
||||||
|
|
||||||
text: qsTr("Donate")
|
|
||||||
color: "#D4D4D4"
|
|
||||||
|
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UiLogic.goToPage(PageEnum.About)
|
UiLogic.goToPage(PageEnum.About)
|
||||||
|
|
|
@ -22,18 +22,8 @@ PageBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -21,18 +21,8 @@ PageProtocolBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
@ -67,7 +57,7 @@ PageProtocolBase {
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rect_proto
|
id: rect_proto
|
||||||
implicitWidth: root.width - 60
|
implicitWidth: parent.width
|
||||||
height: 71
|
height: 71
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: "lightgray"
|
border.color: "lightgray"
|
||||||
|
@ -75,7 +65,7 @@ PageProtocolBase {
|
||||||
RadioButtonType {
|
RadioButtonType {
|
||||||
x: 10
|
x: 10
|
||||||
y: 40
|
y: 40
|
||||||
width: 171
|
width: parent.width
|
||||||
height: 19
|
height: 19
|
||||||
text: qsTr("TCP")
|
text: qsTr("TCP")
|
||||||
enabled: logic.radioButtonTcpEnabled
|
enabled: logic.radioButtonTcpEnabled
|
||||||
|
@ -87,7 +77,7 @@ PageProtocolBase {
|
||||||
RadioButtonType {
|
RadioButtonType {
|
||||||
x: 10
|
x: 10
|
||||||
y: 10
|
y: 10
|
||||||
width: 171
|
width: parent.width
|
||||||
height: 19
|
height: 19
|
||||||
text: qsTr("UDP")
|
text: qsTr("UDP")
|
||||||
checked: logic.radioButtonUdpChecked
|
checked: logic.radioButtonUdpChecked
|
||||||
|
@ -101,16 +91,17 @@ PageProtocolBase {
|
||||||
//
|
//
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
Layout.fillWidth: true
|
implicitWidth: parent.width
|
||||||
LabelType {
|
LabelType {
|
||||||
id: lb_port
|
id: lb_port
|
||||||
height: 31
|
height: 31
|
||||||
text: qsTr("Port")
|
text: qsTr("Port")
|
||||||
Layout.preferredWidth: root.width / 2 - 10
|
Layout.preferredWidth: content.width / 2 - 5
|
||||||
}
|
}
|
||||||
TextFieldType {
|
TextFieldType {
|
||||||
id: tf_port
|
id: tf_port
|
||||||
Layout.fillWidth: true
|
Layout.preferredWidth: content.width / 2 - 5
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
height: 31
|
height: 31
|
||||||
text: logic.lineEditPortText
|
text: logic.lineEditPortText
|
||||||
|
@ -121,8 +112,6 @@ PageProtocolBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
CheckBoxType {
|
CheckBoxType {
|
||||||
id: check_auto_enc
|
id: check_auto_enc
|
||||||
|
|
|
@ -20,18 +20,8 @@ PageShareProtocolBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height + 20
|
contentHeight: content.height + 20
|
||||||
clip: true
|
|
||||||
|
|
||||||
Behavior on contentY{
|
Behavior on contentY{
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
|
@ -20,18 +20,8 @@ PageShareProtocolBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -44,18 +44,8 @@ PageShareProtocolBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -20,18 +20,8 @@ PageShareProtocolBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -20,18 +20,8 @@ PageShareProtocolBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -20,18 +20,8 @@ PageShareProtocolBase {
|
||||||
|
|
||||||
FlickableType {
|
FlickableType {
|
||||||
id: fl
|
id: fl
|
||||||
width: root.width
|
|
||||||
anchors.top: caption.bottom
|
anchors.top: caption.bottom
|
||||||
anchors.topMargin: 20
|
|
||||||
anchors.bottom: root.bottom
|
|
||||||
anchors.bottomMargin: 20
|
|
||||||
anchors.left: root.left
|
|
||||||
anchors.leftMargin: 30
|
|
||||||
anchors.right: root.right
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
|
|
||||||
contentHeight: content.height
|
contentHeight: content.height
|
||||||
clip: true
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue