QML Fixes
This commit is contained in:
parent
62262a3572
commit
3175bc1e48
25 changed files with 535 additions and 791 deletions
|
@ -104,5 +104,8 @@
|
|||
<file>ui/qml/Pages/Protocols/PageProtoOpenVPN.qml</file>
|
||||
<file>ui/qml/Pages/Protocols/PageProtoShadowSocks.qml</file>
|
||||
<file>ui/qml/Controls/BackButton.qml</file>
|
||||
<file>ui/qml/Pages/InstallSettings/InstallSettingsBase.qml</file>
|
||||
<file>ui/qml/Controls/Caption.qml</file>
|
||||
<file>ui/qml/Controls/Logo.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -15,13 +15,13 @@ NewServerProtocolsLogic::NewServerProtocolsLogic(UiLogic *logic, QObject *parent
|
|||
m_frameSettingsParentWireguardVisible{false},
|
||||
m_checkBoxCloakChecked{true},
|
||||
m_checkBoxSsChecked{false},
|
||||
m_checkBoxOpenvpnChecked{false},
|
||||
m_checkBoxOpenVpnChecked{false},
|
||||
m_progressBarConnectionMinimum{0},
|
||||
m_progressBarConnectionMaximum{100}
|
||||
{
|
||||
set_frameSettingsParentWireguardVisible(false);
|
||||
|
||||
connect(this, &NewServerProtocolsLogic::pushButtonConnectConfigureClicked, this, [this](){
|
||||
connect(this, &NewServerProtocolsLogic::pushButtonConfigureClicked, this, [this](){
|
||||
uiLogic()->installServer(getInstallConfigsFromProtocolsPage());
|
||||
});
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ QMap<DockerContainer, QJsonObject> NewServerProtocolsLogic::getInstallConfigsFro
|
|||
containers.insert(DockerContainer::OpenVpnOverShadowSocks, ssConfig);
|
||||
}
|
||||
|
||||
if (checkBoxOpenvpnChecked()) {
|
||||
if (checkBoxOpenVpnChecked()) {
|
||||
containers.insert(DockerContainer::OpenVpn, openVpnConfig);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class NewServerProtocolsLogic : public PageLogicBase
|
|||
AUTO_PROPERTY(QString, comboBoxOpenvpnProtoText)
|
||||
AUTO_PROPERTY(bool, checkBoxCloakChecked)
|
||||
AUTO_PROPERTY(bool, checkBoxSsChecked)
|
||||
AUTO_PROPERTY(bool, checkBoxOpenvpnChecked)
|
||||
AUTO_PROPERTY(bool, checkBoxOpenVpnChecked)
|
||||
AUTO_PROPERTY(double, progressBarConnectionMinimum)
|
||||
AUTO_PROPERTY(double, progressBarConnectionMaximum)
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
|||
QMap<DockerContainer, QJsonObject> getInstallConfigsFromProtocolsPage() const;
|
||||
|
||||
signals:
|
||||
void pushButtonConnectConfigureClicked();
|
||||
void pushButtonConfigureClicked();
|
||||
|
||||
};
|
||||
#endif // NEW_SERVER_PROTOCOLS_LOGIC_H
|
||||
|
|
|
@ -39,6 +39,8 @@ void StartPageLogic::updatePage()
|
|||
|
||||
void StartPageLogic::onPushButtonConnect()
|
||||
{
|
||||
// uiLogic()->goToPage(Page::NewServer);
|
||||
// return;
|
||||
if (pushButtonConnectKeyChecked()){
|
||||
if (lineEditIpText().isEmpty() ||
|
||||
lineEditLoginText().isEmpty() ||
|
||||
|
|
|
@ -4,6 +4,11 @@ import QtQuick.Controls 2.12
|
|||
|
||||
BasicButtonType {
|
||||
id: root
|
||||
width: parent.width - 80
|
||||
height: 40
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.topMargin: 20
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 4
|
||||
|
|
17
client/ui/qml/Controls/Caption.qml
Normal file
17
client/ui/qml/Controls/Caption.qml
Normal file
|
@ -0,0 +1,17 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
x: 10
|
||||
y: 35
|
||||
width: parent.width - 40
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
wrapMode: Text.Wrap
|
||||
//height: 31
|
||||
}
|
|
@ -20,5 +20,6 @@ CheckBox {
|
|||
color: "#181922"
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
leftPadding: root.indicator.width + root.spacing
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@ import QtQuick 2.12
|
|||
|
||||
Text {
|
||||
id: root
|
||||
x: 40
|
||||
width: parent.width
|
||||
anchors.topMargin: 10
|
||||
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 16
|
||||
|
@ -10,3 +14,4 @@ Text {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
|
12
client/ui/qml/Controls/Logo.qml
Normal file
12
client/ui/qml/Controls/Logo.qml
Normal file
|
@ -0,0 +1,12 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
Image {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 30
|
||||
// width: GC.trW(150)
|
||||
// height: GC.trH(22)
|
||||
// y: GC.trY(590)
|
||||
source: "qrc:/images/AmneziaVPN.png"
|
||||
}
|
|
@ -4,7 +4,11 @@ import QtQuick.Controls 2.12
|
|||
TextField {
|
||||
id: root
|
||||
property bool error: false
|
||||
// font.
|
||||
|
||||
width: parent.width - 80
|
||||
height: 40
|
||||
anchors.topMargin: 5
|
||||
|
||||
selectionColor: "darkgray"
|
||||
font.pixelSize: 16
|
||||
color: "#333333"
|
||||
|
|
75
client/ui/qml/Pages/InstallSettings/InstallSettingsBase.qml
Normal file
75
client/ui/qml/Pages/InstallSettings/InstallSettingsBase.qml
Normal file
|
@ -0,0 +1,75 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "./"
|
||||
import "../../Controls"
|
||||
import "../../Config"
|
||||
|
||||
Rectangle {
|
||||
signal containerChecked(bool checked)
|
||||
property bool initiallyChecked: false
|
||||
property string containerDescription
|
||||
default property alias itemSettings: container.data
|
||||
|
||||
x: 5
|
||||
y: 5
|
||||
width: parent.width - 20
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
height: frame_settings.visible ? 140 : 72
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
radius: 2
|
||||
Rectangle {
|
||||
id: frame_settings
|
||||
height: 77
|
||||
width: parent.width
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: false
|
||||
radius: 2
|
||||
Grid {
|
||||
id: container
|
||||
anchors.fill: parent
|
||||
columns: 2
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
topPadding: 5
|
||||
leftPadding: 10
|
||||
spacing: 5
|
||||
}
|
||||
}
|
||||
Row {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 5
|
||||
leftPadding: 15
|
||||
rightPadding: 5
|
||||
height: 55
|
||||
width: parent.width
|
||||
CheckBoxType {
|
||||
text: containerDescription
|
||||
height: parent.height
|
||||
width: parent.width - 50
|
||||
checked: initiallyChecked
|
||||
onCheckedChanged: containerChecked(checked)
|
||||
}
|
||||
ImageButtonType {
|
||||
width: 35
|
||||
height: 35
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
checkable: true
|
||||
checked: initiallyChecked
|
||||
onCheckedChanged: {
|
||||
//NewServerProtocolsLogic.pushButtonSettingsCloakChecked = checked
|
||||
if (checked) {
|
||||
frame_settings.visible = true
|
||||
} else {
|
||||
frame_settings.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,18 +9,8 @@ PageBase {
|
|||
BackButton {
|
||||
id: back
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Application Settings")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
CheckBoxType {
|
||||
x: 30
|
||||
|
|
|
@ -9,18 +9,8 @@ Item {
|
|||
BackButton {
|
||||
id: back
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("DNS Servers")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
Image {
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
|
|
|
@ -10,65 +10,49 @@ Item {
|
|||
BackButton {
|
||||
id: back_from_new_server
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
id: caption
|
||||
text: qsTr("Setup your server to use VPN")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
LabelType {
|
||||
id: labelWizard
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("If you want easily configure your server just run Wizard")
|
||||
wrapMode: Text.Wrap
|
||||
x: 40
|
||||
y: 100
|
||||
width: 301
|
||||
height: 41
|
||||
}
|
||||
LabelType {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("Press configure manually to choose VPN protocols you want to install")
|
||||
wrapMode: Text.Wrap
|
||||
x: 40
|
||||
y: 260
|
||||
width: 301
|
||||
height: 41
|
||||
width: parent.width - 80
|
||||
anchors.top: caption.bottom
|
||||
anchors.topMargin: 30
|
||||
}
|
||||
BlueButtonType {
|
||||
id: pushButtonWizard
|
||||
text: qsTr("Run Setup Wizard")
|
||||
y: 150
|
||||
width: 301
|
||||
height: 40
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: labelWizard.bottom
|
||||
anchors.topMargin: 10
|
||||
onClicked: {
|
||||
UiLogic.goToPage(PageEnum.Wizard);
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
id: labelManual
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("Press configure manually to choose VPN protocols you want to install")
|
||||
|
||||
width: parent.width - 80
|
||||
anchors.top: pushButtonWizard.bottom
|
||||
anchors.topMargin: 40
|
||||
}
|
||||
|
||||
BlueButtonType {
|
||||
text: qsTr("Configure VPN protocols manually")
|
||||
y: 310
|
||||
width: 301
|
||||
height: 40
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: labelManual.bottom
|
||||
anchors.topMargin: 10
|
||||
onClicked: {
|
||||
UiLogic.goToPage(PageEnum.NewServerProtocols);
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
width: GC.trW(150)
|
||||
height: GC.trH(22)
|
||||
y: GC.trY(590)
|
||||
source: "qrc:/images/AmneziaVPN.png"
|
||||
Logo {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,18 +7,8 @@ import "../Config"
|
|||
Item {
|
||||
id: root
|
||||
enabled: NewServerConfiguringLogic.pageEnabled
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Configuring...")
|
||||
x: 0
|
||||
y: 35
|
||||
width: 381
|
||||
height: 31
|
||||
}
|
||||
LabelType {
|
||||
x: 30
|
||||
|
|
|
@ -3,439 +3,217 @@ import QtQuick.Controls 2.12
|
|||
import "./"
|
||||
import "../Controls"
|
||||
import "../Config"
|
||||
import "InstallSettings"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
BackButton {
|
||||
id: back
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
id: caption
|
||||
text: qsTr("Select VPN protocols")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
ProgressBar {
|
||||
id: progress_bar_new_server_connection
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 570
|
||||
width: 301
|
||||
height: 40
|
||||
from: NewServerProtocolsLogic.progressBarConnectionMinimum
|
||||
to: NewServerProtocolsLogic.progressBarConnectionMaximum
|
||||
value: 0
|
||||
background: Rectangle {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
color: "#100A44"
|
||||
radius: 4
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
Rectangle {
|
||||
width: progress_bar_new_server_connection.visualPosition * parent.width
|
||||
height: parent.height
|
||||
radius: 4
|
||||
color: Qt.rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
LabelType {
|
||||
anchors.fill: parent
|
||||
text: qsTr("Configuring...")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 16
|
||||
color: "#D4D4D4"
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
id: pushButtonConfigure
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 570
|
||||
width: 301
|
||||
y: parent.height - 60
|
||||
width: parent.width - 40
|
||||
height: 40
|
||||
text: qsTr("Setup server")
|
||||
onClicked: {
|
||||
NewServerProtocolsLogic.pushButtonConnectConfigureClicked()
|
||||
NewServerProtocolsLogic.pushButtonConfigureClicked()
|
||||
}
|
||||
}
|
||||
|
||||
// RoundButton {
|
||||
// id: pb_add_container
|
||||
// anchors.horizontalCenter: parent.horizontalCenter
|
||||
// anchors.top: labelCaption.bottom
|
||||
// anchors.topMargin: 10
|
||||
|
||||
// width: parent.width - 40
|
||||
// height: 40
|
||||
// text: qsTr("Add protocol")
|
||||
// onClicked: drawer_menu.visible ? drawer_menu.close() : drawer_menu.open()
|
||||
|
||||
// }
|
||||
|
||||
// Drawer {
|
||||
// id: drawer_menu
|
||||
// z: -3
|
||||
|
||||
// y: 0
|
||||
// x: 0
|
||||
// edge: Qt.RightEdge
|
||||
// width: parent.width * 0.75
|
||||
// height: parent.height
|
||||
|
||||
// modal: true
|
||||
// interactive: true
|
||||
|
||||
// Label {
|
||||
// text: "Content goes here!"
|
||||
// anchors.centerIn: parent
|
||||
// }
|
||||
// }
|
||||
|
||||
ScrollView {
|
||||
x: 0
|
||||
y: 70
|
||||
width: 380
|
||||
height: 471
|
||||
id: scrollView
|
||||
width: parent.width - 40
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
anchors.top: caption.bottom
|
||||
anchors.topMargin: 10
|
||||
|
||||
anchors.bottom: pushButtonConfigure.top
|
||||
anchors.bottomMargin: 10
|
||||
|
||||
clip: true
|
||||
Column {
|
||||
width: scrollView.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
spacing: 5
|
||||
Rectangle {
|
||||
x: 5
|
||||
y: 5
|
||||
width: 368
|
||||
height: frame_new_server_setting_cloak.visible ? 140 : 72
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
radius: 2
|
||||
Rectangle {
|
||||
id: frame_new_server_setting_cloak
|
||||
height: 77
|
||||
width: 353
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: false
|
||||
radius: 2
|
||||
Grid {
|
||||
anchors.fill: parent
|
||||
columns: 2
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
topPadding: 5
|
||||
leftPadding: 10
|
||||
spacing: 5
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Port (TCP)")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditCloakPortText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditCloakPortText = text
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Fake Web Site")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditCloakSiteText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditCloakSiteText = text
|
||||
}
|
||||
}
|
||||
InstallSettingsBase {
|
||||
containerDescription: qsTr("OpenVPN and ShadowSocks\n with masking using Cloak plugin")
|
||||
onContainerChecked: NewServerProtocolsLogic.checkBoxCloakChecked = checked
|
||||
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Port (TCP)")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditCloakPortText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditCloakPortText = text
|
||||
}
|
||||
}
|
||||
Row {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 5
|
||||
leftPadding: 15
|
||||
rightPadding: 5
|
||||
height: 55
|
||||
width: parent.width
|
||||
CheckBoxType {
|
||||
text: qsTr("OpenVPN and ShadowSocks\n with masking using Cloak plugin")
|
||||
height: parent.height
|
||||
width: 308
|
||||
checked: NewServerProtocolsLogic.checkBoxCloakChecked
|
||||
onCheckedChanged: {
|
||||
NewServerProtocolsLogic.checkBoxCloakChecked = checked
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
width: 35
|
||||
height: 35
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
checkable: true
|
||||
checked: NewServerProtocolsLogic.pushButtonSettingsCloakChecked
|
||||
onCheckedChanged: {
|
||||
NewServerProtocolsLogic.pushButtonSettingsCloakChecked = checked
|
||||
if (checked) {
|
||||
frame_new_server_setting_cloak.visible = true
|
||||
} else {
|
||||
frame_new_server_setting_cloak.visible = false
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Fake Web Site")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditCloakSiteText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditCloakSiteText = text
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
x: 5
|
||||
y: 5
|
||||
width: 368
|
||||
height: frame_new_server_settings_ss.visible ? 140 : 72
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
radius: 2
|
||||
Rectangle {
|
||||
id: frame_new_server_settings_ss
|
||||
height: 77
|
||||
width: 353
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
radius: 2
|
||||
visible: false
|
||||
Grid {
|
||||
anchors.fill: parent
|
||||
columns: 2
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
topPadding: 5
|
||||
leftPadding: 10
|
||||
spacing: 5
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Port (TCP)")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditSsPortText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditSsPortText = text
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Encryption")
|
||||
}
|
||||
ComboBoxType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
model: [
|
||||
qsTr("chacha20-ietf-poly1305"),
|
||||
qsTr("xchacha20-ietf-poly1305"),
|
||||
qsTr("aes-256-gcm"),
|
||||
qsTr("aes-192-gcm"),
|
||||
qsTr("aes-128-gcm")
|
||||
]
|
||||
currentIndex: {
|
||||
for (let i = 0; i < model.length; ++i) {
|
||||
if (NewServerProtocolsLogic.comboBoxSsCipherText === model[i]) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
NewServerProtocolsLogic.comboBoxSsCipherText = currentText
|
||||
}
|
||||
}
|
||||
|
||||
InstallSettingsBase {
|
||||
containerDescription: qsTr("ShadowSocks")
|
||||
onContainerChecked: NewServerProtocolsLogic.checkBoxSsChecked = checked
|
||||
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Port (TCP)")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditSsPortText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditSsPortText = text
|
||||
}
|
||||
}
|
||||
Row {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 5
|
||||
leftPadding: 15
|
||||
rightPadding: 5
|
||||
height: 55
|
||||
width: parent.width
|
||||
CheckBoxType {
|
||||
text: qsTr("ShadowSocks")
|
||||
height: parent.height
|
||||
width: 308
|
||||
checked: NewServerProtocolsLogic.checkBoxSsChecked
|
||||
onCheckedChanged: {
|
||||
NewServerProtocolsLogic.checkBoxSsChecked = checked
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
width: 35
|
||||
height: 35
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
checked: NewServerProtocolsLogic.pushButtonSettingsSsChecked
|
||||
checkable: true
|
||||
onCheckedChanged: {
|
||||
NewServerProtocolsLogic.pushButtonSettingsSsChecked = checked
|
||||
if (checked) {
|
||||
frame_new_server_settings_ss.visible = true
|
||||
} else {
|
||||
frame_new_server_settings_ss.visible = false
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Encryption")
|
||||
}
|
||||
ComboBoxType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
model: [
|
||||
qsTr("chacha20-ietf-poly1305"),
|
||||
qsTr("xchacha20-ietf-poly1305"),
|
||||
qsTr("aes-256-gcm"),
|
||||
qsTr("aes-192-gcm"),
|
||||
qsTr("aes-128-gcm")
|
||||
]
|
||||
currentIndex: {
|
||||
for (let i = 0; i < model.length; ++i) {
|
||||
if (NewServerProtocolsLogic.comboBoxSsCipherText === model[i]) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
NewServerProtocolsLogic.comboBoxSsCipherText = currentText
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
x: 5
|
||||
y: 5
|
||||
width: 368
|
||||
height: frame_new_server_settings_openvpn.visible ? 140 : 72
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
radius: 2
|
||||
Rectangle {
|
||||
id: frame_new_server_settings_openvpn
|
||||
height: 77
|
||||
width: 353
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
radius: 2
|
||||
visible: false
|
||||
Grid {
|
||||
anchors.fill: parent
|
||||
columns: 2
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
topPadding: 5
|
||||
leftPadding: 10
|
||||
spacing: 5
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Port (TCP)")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditOpenvpnPortText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditOpenvpnPortText = text
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Protocol")
|
||||
}
|
||||
ComboBoxType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
model: [
|
||||
qsTr("udp"),
|
||||
qsTr("tcp"),
|
||||
]
|
||||
currentIndex: {
|
||||
for (let i = 0; i < model.length; ++i) {
|
||||
if (NewServerProtocolsLogic.comboBoxOpenvpnProtoText === model[i]) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
NewServerProtocolsLogic.comboBoxOpenvpnProtoText = currentText
|
||||
}
|
||||
}
|
||||
|
||||
InstallSettingsBase {
|
||||
containerDescription: qsTr("OpenVPN")
|
||||
onContainerChecked: NewServerProtocolsLogic.checkBoxOpenVpnChecked = checked
|
||||
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Port (TCP/UDP)")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: NewServerProtocolsLogic.lineEditOpenvpnPortText
|
||||
onEditingFinished: {
|
||||
NewServerProtocolsLogic.lineEditOpenvpnPortText = text
|
||||
}
|
||||
}
|
||||
Row {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 5
|
||||
leftPadding: 15
|
||||
rightPadding: 5
|
||||
height: 55
|
||||
width: parent.width
|
||||
CheckBoxType {
|
||||
text: qsTr("OpenVPN")
|
||||
height: parent.height
|
||||
width: 308
|
||||
checked: NewServerProtocolsLogic.checkBoxOpenvpnChecked
|
||||
onCheckedChanged: {
|
||||
NewServerProtocolsLogic.checkBoxOpenvpnChecked = checked
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
width: 35
|
||||
height: 35
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
checked: NewServerProtocolsLogic.pushButtonSettingsOpenvpnChecked
|
||||
checkable: true
|
||||
onCheckedChanged: {
|
||||
NewServerProtocolsLogic.pushButtonSettingsOpenvpnChecked = checked
|
||||
if (checked) {
|
||||
frame_new_server_settings_openvpn.visible = true
|
||||
} else {
|
||||
frame_new_server_settings_openvpn.visible = false
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
text: qsTr("Protocol")
|
||||
}
|
||||
ComboBoxType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
|
||||
model: [
|
||||
qsTr("udp"),
|
||||
qsTr("tcp"),
|
||||
]
|
||||
currentIndex: {
|
||||
for (let i = 0; i < model.length; ++i) {
|
||||
if (NewServerProtocolsLogic.comboBoxOpenvpnProtoText === model[i]) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
NewServerProtocolsLogic.comboBoxOpenvpnProtoText = currentText
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
id: frame_new_server_settings_parent_wireguard
|
||||
visible: NewServerProtocolsLogic.frameSettingsParentWireguardVisible
|
||||
x: 5
|
||||
y: 5
|
||||
width: 368
|
||||
height: frame_new_server_settings_wireguard.visible ? 109 : 72
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
radius: 2
|
||||
Rectangle {
|
||||
id: frame_new_server_settings_wireguard
|
||||
height: 46
|
||||
width: 353
|
||||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
radius: 2
|
||||
visible: false
|
||||
Grid {
|
||||
anchors.fill: parent
|
||||
columns: 2
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
topPadding: 5
|
||||
leftPadding: 10
|
||||
spacing: 5
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2)
|
||||
text: qsTr("Port (TCP)")
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2)
|
||||
text: "32767"
|
||||
}
|
||||
}
|
||||
|
||||
InstallSettingsBase {
|
||||
visible: false
|
||||
containerDescription: qsTr("WireGuard")
|
||||
onContainerChecked: NewServerProtocolsLogic.checkBoxWireGuardChecked = checked
|
||||
|
||||
LabelType {
|
||||
width: 130
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2)
|
||||
text: qsTr("Port (UDP)")
|
||||
}
|
||||
Row {
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 5
|
||||
leftPadding: 15
|
||||
rightPadding: 5
|
||||
height: 55
|
||||
width: parent.width
|
||||
CheckBoxType {
|
||||
text: qsTr("WireGuard")
|
||||
height: parent.height
|
||||
width: 308
|
||||
}
|
||||
ImageButtonType {
|
||||
width: 35
|
||||
height: 35
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
checkable: true
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
frame_new_server_settings_wireguard.visible = true
|
||||
} else {
|
||||
frame_new_server_settings_wireguard.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
|
||||
height: (parent.height - parent.spacing - parent.topPadding * 2)
|
||||
text: "32767"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,18 +10,8 @@ Item {
|
|||
BackButton {
|
||||
id: back
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Protocols")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
ProgressBar {
|
||||
id: progress_bar
|
||||
|
|
|
@ -11,22 +11,15 @@ Item {
|
|||
BackButton {
|
||||
id: back
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
id: caption
|
||||
text: qsTr("Servers list")
|
||||
x: 50
|
||||
y: 30
|
||||
width: 171
|
||||
height: 40
|
||||
}
|
||||
ImageButtonType {
|
||||
x: 240
|
||||
y: 39
|
||||
anchors.left: caption.right
|
||||
anchors.leftMargin: 10
|
||||
width: 24
|
||||
height: 24
|
||||
icon.source: "qrc:/images/plus.png"
|
||||
|
|
|
@ -12,18 +12,9 @@ Item {
|
|||
BackButton {
|
||||
id: back
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Server settings")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
Image {
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
|
|
|
@ -10,18 +10,8 @@ Item {
|
|||
BackButton {
|
||||
id: back_from_setup_wizard
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Setup your server to use VPN")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
Item {
|
||||
x: 10
|
||||
|
|
|
@ -10,18 +10,8 @@ Item {
|
|||
BackButton {
|
||||
id: back_from_setup_wizard
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Setup Wizard")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
Item {
|
||||
x: 10
|
||||
|
|
|
@ -9,18 +9,8 @@ Item {
|
|||
BackButton {
|
||||
id: back_from_setup_wizard
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Setup Wizard")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
Item {
|
||||
x: 10
|
||||
|
|
|
@ -7,29 +7,11 @@ import "../Config"
|
|||
|
||||
Item {
|
||||
id: root
|
||||
ImageButtonType {
|
||||
BackButton {
|
||||
id: back_from_setup_wizard
|
||||
x: 10
|
||||
y: 10
|
||||
width: 26
|
||||
height: 20
|
||||
icon.source: "qrc:/images/arrow_left.png"
|
||||
onClicked: {
|
||||
UiLogic.closePage()
|
||||
}
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Setup Wizard")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
Item {
|
||||
x: 10
|
||||
|
|
|
@ -9,18 +9,8 @@ Item {
|
|||
BackButton {
|
||||
id: back_from_setup_wizard
|
||||
}
|
||||
Text {
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Caption {
|
||||
text: qsTr("Setup Wizard")
|
||||
x: 10
|
||||
y: 35
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
Item {
|
||||
x: 10
|
||||
|
|
|
@ -9,20 +9,28 @@ Item {
|
|||
BackButton {
|
||||
id: back_from_start
|
||||
}
|
||||
Image {
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
width: GC.trW(150)
|
||||
height: GC.trH(22)
|
||||
y: GC.trY(590)
|
||||
source: "qrc:/images/AmneziaVPN.png"
|
||||
|
||||
Caption {
|
||||
id: caption
|
||||
text: start_switch_page.checked ?
|
||||
qsTr("Setup your server to use VPN") :
|
||||
qsTr("Connect to the already created VPN server")
|
||||
}
|
||||
|
||||
Logo {
|
||||
id: logo
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: start_switch_page
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 530
|
||||
width: 301
|
||||
anchors.bottom: logo.top
|
||||
anchors.bottomMargin: 10
|
||||
|
||||
width: parent.width - 80
|
||||
height: 40
|
||||
anchors.topMargin: 20
|
||||
|
||||
text: qsTr("Set up your own server")
|
||||
checked: false
|
||||
checkable: true
|
||||
|
@ -60,239 +68,203 @@ Item {
|
|||
|
||||
}
|
||||
|
||||
Item {
|
||||
id: page_start_import
|
||||
width: parent.width
|
||||
anchors.top: caption.bottom
|
||||
anchors.bottom: start_switch_page.top
|
||||
anchors.bottomMargin: 10
|
||||
|
||||
Item {
|
||||
id: page_start_import
|
||||
width: 380
|
||||
height: 481
|
||||
x: 0
|
||||
y: 35
|
||||
visible: true
|
||||
Text {
|
||||
x: 0
|
||||
y: 20
|
||||
width: 381
|
||||
height: 71
|
||||
visible: true
|
||||
|
||||
LabelType {
|
||||
id: label_connection_code
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 20
|
||||
text: qsTr("Connection code")
|
||||
}
|
||||
TextFieldType {
|
||||
id: lineEdit_start_existing_code
|
||||
anchors.top: label_connection_code.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
placeholderText: "vpn://..."
|
||||
text: StartPageLogic.lineEditStartExistingCodeText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditStartExistingCodeText = text
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
id: new_sever_import
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 210
|
||||
anchors.top: lineEdit_start_existing_code.bottom
|
||||
anchors.topMargin: 40
|
||||
text: qsTr("Connect")
|
||||
onClicked: {
|
||||
StartPageLogic.onPushButtonImport()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
id: page_start_new_server
|
||||
width: parent.width
|
||||
anchors.top: caption.bottom
|
||||
anchors.bottom: start_switch_page.top
|
||||
anchors.bottomMargin: 10
|
||||
|
||||
visible: false
|
||||
|
||||
BasicButtonType {
|
||||
id: new_sever_get_info
|
||||
width: parent.width - 80
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 5
|
||||
|
||||
text: qsTr("Where to get connection data →")
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
anchors.fill: parent
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
font.bold: true
|
||||
color: "#100A44"
|
||||
font.pixelSize: 16
|
||||
color: "#15CDCB";
|
||||
text: new_sever_get_info.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("Connect to the already created VPN server")
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
LabelType {
|
||||
x: 40
|
||||
y: 110
|
||||
width: 301
|
||||
height: 21
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("Connection code")
|
||||
wrapMode: Text.Wrap
|
||||
antialiasing: true
|
||||
checkable: true
|
||||
checked: true
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://amnezia.org")
|
||||
}
|
||||
TextFieldType {
|
||||
id: lineEdit_start_existing_code
|
||||
x: 40
|
||||
y: 140
|
||||
width: 300
|
||||
height: 40
|
||||
placeholderText: "vpn://..."
|
||||
text: StartPageLogic.lineEditStartExistingCodeText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditStartExistingCodeText = text
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
id: new_sever_import
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 210
|
||||
width: 301
|
||||
height: 40
|
||||
text: qsTr("Connect")
|
||||
onClicked: {
|
||||
StartPageLogic.onPushButtonImport()
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
id: label_server_ip
|
||||
x: 40
|
||||
anchors.top: new_sever_get_info.bottom
|
||||
text: qsTr("Server IP address")
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_ip
|
||||
anchors.top: label_server_ip.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: StartPageLogic.lineEditIpText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditIpText = text
|
||||
}
|
||||
}
|
||||
|
||||
LabelType {
|
||||
id:label_login
|
||||
x: 40
|
||||
anchors.top: new_server_ip.bottom
|
||||
text: qsTr("Login to connect via SSH")
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_login
|
||||
anchors.top: label_login.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: StartPageLogic.lineEditLoginText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditLoginText = text
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: page_start_new_server
|
||||
width: 380
|
||||
height: 481
|
||||
x: 0
|
||||
y: 35
|
||||
LabelType {
|
||||
id: label_new_server_password
|
||||
x: 40
|
||||
anchors.top: new_server_login.bottom
|
||||
text: qsTr("Password")
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_password
|
||||
anchors.top: label_new_server_password.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
echoMode: TextInput.Password
|
||||
text: StartPageLogic.lineEditPasswordText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditPasswordText = text
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_ssh_key
|
||||
anchors.top: label_new_server_password.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
height: 71
|
||||
echoMode: TextInput.Password
|
||||
font.pixelSize: 9
|
||||
verticalAlignment: Text.AlignTop
|
||||
text: StartPageLogic.textEditSshKeyText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.textEditSshKeyText = text
|
||||
}
|
||||
visible: false
|
||||
Label {
|
||||
x:10
|
||||
y:0
|
||||
width: 361
|
||||
height: 31
|
||||
}
|
||||
|
||||
LabelType {
|
||||
x: 40
|
||||
y: 390
|
||||
width: 301
|
||||
height: 41
|
||||
text: StartPageLogic.labelWaitInfoText
|
||||
visible: StartPageLogic.labelWaitInfoVisible
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
|
||||
|
||||
BlueButtonType {
|
||||
id: new_sever_connect
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: new_server_ssh_key.bottom
|
||||
|
||||
text: StartPageLogic.pushButtonConnectText
|
||||
visible: StartPageLogic.pushButtonConnectVisible
|
||||
onClicked: {
|
||||
StartPageLogic.onPushButtonConnect()
|
||||
}
|
||||
enabled: StartPageLogic.pushButtonConnectEnabled
|
||||
}
|
||||
BasicButtonType {
|
||||
id: new_sever_connect_key
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: new_sever_connect.bottom
|
||||
|
||||
width: 281
|
||||
height: 21
|
||||
text: qsTr("Connect using SSH key")
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
anchors.fill: parent
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 24
|
||||
font.bold: true
|
||||
color: "#100A44"
|
||||
font.pixelSize: 16
|
||||
color: "#15CDCB";
|
||||
text: new_sever_connect_key.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("Setup your server to use VPN")
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
LabelType {
|
||||
x: 40
|
||||
y: 70
|
||||
width: 171
|
||||
height: 21
|
||||
text: qsTr("Server IP address")
|
||||
}
|
||||
LabelType {
|
||||
x: 40
|
||||
y: 150
|
||||
width: 261
|
||||
height: 21
|
||||
text: qsTr("Login to connect via SSH")
|
||||
}
|
||||
LabelType {
|
||||
id: label_new_server_password
|
||||
x: 40
|
||||
y: 230
|
||||
width: 171
|
||||
height: 21
|
||||
text: qsTr("Password")
|
||||
}
|
||||
LabelType {
|
||||
x: 40
|
||||
y: 390
|
||||
width: 301
|
||||
height: 41
|
||||
text: StartPageLogic.labelWaitInfoText
|
||||
visible: StartPageLogic.labelWaitInfoVisible
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_ip
|
||||
x: 40
|
||||
y: 100
|
||||
width: 300
|
||||
height: 40
|
||||
text: StartPageLogic.lineEditIpText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditIpText = text
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_login
|
||||
x: 40
|
||||
y: 180
|
||||
width: 300
|
||||
height: 40
|
||||
text: StartPageLogic.lineEditLoginText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditLoginText = text
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_password
|
||||
x: 40
|
||||
y: 260
|
||||
width: 300
|
||||
height: 40
|
||||
echoMode: TextInput.Password
|
||||
text: StartPageLogic.lineEditPasswordText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditPasswordText = text
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
id: new_sever_connect
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 350
|
||||
width: 301
|
||||
height: 40
|
||||
text: StartPageLogic.pushButtonConnectText
|
||||
visible: StartPageLogic.pushButtonConnectVisible
|
||||
onClicked: {
|
||||
StartPageLogic.onPushButtonConnect()
|
||||
}
|
||||
enabled: StartPageLogic.pushButtonConnectEnabled
|
||||
}
|
||||
BasicButtonType {
|
||||
id: new_sever_connect_key
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 450
|
||||
width: 281
|
||||
height: 21
|
||||
text: qsTr("Connect using SSH key")
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
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
|
||||
checked: StartPageLogic.pushButtonConnectKeyChecked
|
||||
onCheckedChanged: {
|
||||
StartPageLogic.pushButtonConnectKeyChecked = checked
|
||||
label_new_server_password.text = checked ? qsTr("Private key") : qsTr("Password")
|
||||
new_sever_connect_key.text = checked ? qsTr("Connect using SSH password") : qsTr("Connect using SSH key")
|
||||
new_server_password.visible = !checked
|
||||
new_server_ssh_key.visible = checked
|
||||
}
|
||||
}
|
||||
BasicButtonType {
|
||||
id: new_sever_get_info
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 40
|
||||
width: 281
|
||||
height: 21
|
||||
text: qsTr("Where to get connection data →")
|
||||
background: Item {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
anchors.fill: parent
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 16
|
||||
color: "#15CDCB";
|
||||
text: new_sever_get_info.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
antialiasing: true
|
||||
checkable: true
|
||||
checked: true
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://amnezia.org")
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
id: new_server_ssh_key
|
||||
x: 40
|
||||
y: 260
|
||||
width: 300
|
||||
height: 71
|
||||
echoMode: TextInput.Password
|
||||
font.pixelSize: 9
|
||||
verticalAlignment: Text.AlignTop
|
||||
text: StartPageLogic.textEditSshKeyText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.textEditSshKeyText = text
|
||||
}
|
||||
visible: false
|
||||
antialiasing: true
|
||||
checkable: true
|
||||
checked: StartPageLogic.pushButtonConnectKeyChecked
|
||||
onCheckedChanged: {
|
||||
StartPageLogic.pushButtonConnectKeyChecked = checked
|
||||
label_new_server_password.text = checked ? qsTr("Private key") : qsTr("Password")
|
||||
new_sever_connect_key.text = checked ? qsTr("Connect using SSH password") : qsTr("Connect using SSH key")
|
||||
new_server_password.visible = !checked
|
||||
new_server_ssh_key.visible = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue