refact fixes
This commit is contained in:
parent
16e887dcf0
commit
6516a84986
27 changed files with 558 additions and 561 deletions
|
|
@ -105,15 +105,15 @@ Item {
|
|||
icon.source: checked ? "qrc:/images/check.png" : "qrc:/images/uncheck.png"
|
||||
width: 24
|
||||
height: 24
|
||||
checked: ServerContainersLogic.pushButtonCloakOpenvpnContDefaultChecked
|
||||
checked: ServerContainersLogic.pushButtonCloakOpenVpnContDefaultChecked
|
||||
onCheckedChanged: {
|
||||
ServerContainersLogic.pushButtonCloakOpenvpnContDefaultChecked = checked
|
||||
ServerContainersLogic.pushButtonCloakOpenVpnContDefaultChecked = checked
|
||||
}
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenvpnContDefaultClicked(checked)
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenVpnContDefaultClicked(checked)
|
||||
}
|
||||
|
||||
visible: ServerContainersLogic.pushButtonCloakOpenvpnContDefaultVisible
|
||||
visible: ServerContainersLogic.pushButtonCloakOpenVpnContDefaultVisible
|
||||
}
|
||||
|
||||
ImageButtonType {
|
||||
|
|
@ -123,9 +123,9 @@ Item {
|
|||
icon.source: "qrc:/images/share.png"
|
||||
width: 24
|
||||
height: 24
|
||||
visible: ServerContainersLogic.pushButtonCloakOpenvpnContShareVisible
|
||||
visible: ServerContainersLogic.pushButtonCloakOpenVpnContShareVisible
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenvpnContShareClicked(false)
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenVpnContShareClicked(false)
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
|
|
@ -136,14 +136,14 @@ Item {
|
|||
: "qrc:/images/connect_button_disconnected.png"
|
||||
width: 36
|
||||
height: 24
|
||||
checked: ServerContainersLogic.pushButtonCloakOpenvpnContInstallChecked
|
||||
checked: ServerContainersLogic.pushButtonCloakOpenVpnContInstallChecked
|
||||
onCheckedChanged: {
|
||||
ServerContainersLogic.pushButtonCloakOpenvpnContInstallChecked = checked
|
||||
ServerContainersLogic.pushButtonCloakOpenVpnContInstallChecked = checked
|
||||
}
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenvpnContInstallClicked(checked)
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenVpnContInstallClicked(checked)
|
||||
}
|
||||
enabled: ServerContainersLogic.pushButtonCloakOpenvpnContInstallEnabled
|
||||
enabled: ServerContainersLogic.pushButtonCloakOpenVpnContInstallEnabled
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
|
|
@ -162,7 +162,7 @@ Item {
|
|||
text: qsTr("OpenVPN settings")
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenvpnContOpenvpnConfigClicked()
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenVpnContOpenvpnConfigClicked()
|
||||
}
|
||||
}
|
||||
SettingButtonType {
|
||||
|
|
@ -173,7 +173,7 @@ Item {
|
|||
text: qsTr("ShadowSocks settings")
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenvpnContSsConfigClicked()
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenVpnContSsConfigClicked()
|
||||
}
|
||||
}
|
||||
SettingButtonType {
|
||||
|
|
@ -184,7 +184,7 @@ Item {
|
|||
text: qsTr("Cloak settings")
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenvpnContCloakConfigClicked()
|
||||
ServerContainersLogic.onPushButtonProtoCloakOpenVpnContCloakConfigClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -217,15 +217,15 @@ Item {
|
|||
icon.source: checked ? "qrc:/images/check.png" : "qrc:/images/uncheck.png"
|
||||
width: 24
|
||||
height: 24
|
||||
checked: ServerContainersLogic.pushButtonSsOpenvpnContDefaultChecked
|
||||
checked: ServerContainersLogic.pushButtonSsOpenVpnContDefaultChecked
|
||||
onCheckedChanged: {
|
||||
ServerContainersLogic.pushButtonSsOpenvpnContDefaultChecked = checked
|
||||
ServerContainersLogic.pushButtonSsOpenVpnContDefaultChecked = checked
|
||||
}
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenvpnContDefaultClicked(checked)
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenVpnContDefaultClicked(checked)
|
||||
}
|
||||
|
||||
visible: ServerContainersLogic.pushButtonSsOpenvpnContDefaultVisible
|
||||
visible: ServerContainersLogic.pushButtonSsOpenVpnContDefaultVisible
|
||||
}
|
||||
|
||||
ImageButtonType {
|
||||
|
|
@ -235,9 +235,9 @@ Item {
|
|||
icon.source: "qrc:/images/share.png"
|
||||
width: 24
|
||||
height: 24
|
||||
visible: ServerContainersLogic.pushButtonSsOpenvpnContShareVisible
|
||||
visible: ServerContainersLogic.pushButtonSsOpenVpnContShareVisible
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenvpnContShareClicked(false)
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenVpnContShareClicked(false)
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
|
|
@ -248,14 +248,14 @@ Item {
|
|||
: "qrc:/images/connect_button_disconnected.png"
|
||||
width: 36
|
||||
height: 24
|
||||
checked: ServerContainersLogic.pushButtonSsOpenvpnContInstallChecked
|
||||
checked: ServerContainersLogic.pushButtonSsOpenVpnContInstallChecked
|
||||
onCheckedChanged: {
|
||||
ServerContainersLogic.pushButtonSsOpenvpnContInstallChecked = checked
|
||||
ServerContainersLogic.pushButtonSsOpenVpnContInstallChecked = checked
|
||||
}
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenvpnContInstallClicked(checked)
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenVpnContInstallClicked(checked)
|
||||
}
|
||||
enabled: ServerContainersLogic.pushButtonSsOpenvpnContInstallEnabled
|
||||
enabled: ServerContainersLogic.pushButtonSsOpenVpnContInstallEnabled
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
|
|
@ -274,7 +274,7 @@ Item {
|
|||
text: qsTr("OpenVPN settings")
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenvpnContOpenvpnConfigClicked()
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenVpnContOpenvpnConfigClicked()
|
||||
}
|
||||
}
|
||||
SettingButtonType {
|
||||
|
|
@ -285,7 +285,7 @@ Item {
|
|||
text: qsTr("ShadowSocks settings")
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenvpnContSsConfigClicked()
|
||||
ServerContainersLogic.onPushButtonProtoSsOpenVpnContSsConfigClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -318,15 +318,15 @@ Item {
|
|||
icon.source: checked ? "qrc:/images/check.png" : "qrc:/images/uncheck.png"
|
||||
width: 24
|
||||
height: 24
|
||||
checked: ServerContainersLogic.pushButtonOpenvpnContDefaultChecked
|
||||
checked: ServerContainersLogic.pushButtonOpenVpnContDefaultChecked
|
||||
onCheckedChanged: {
|
||||
ServerContainersLogic.pushButtonOpenvpnContDefaultChecked = checked
|
||||
ServerContainersLogic.pushButtonOpenVpnContDefaultChecked = checked
|
||||
}
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoOpenvpnContDefaultClicked(checked)
|
||||
ServerContainersLogic.onPushButtonProtoOpenVpnContDefaultClicked(checked)
|
||||
}
|
||||
|
||||
visible: ServerContainersLogic.pushButtonOpenvpnContDefaultVisible
|
||||
visible: ServerContainersLogic.pushButtonOpenVpnContDefaultVisible
|
||||
}
|
||||
|
||||
ImageButtonType {
|
||||
|
|
@ -336,9 +336,9 @@ Item {
|
|||
icon.source: "qrc:/images/share.png"
|
||||
width: 24
|
||||
height: 24
|
||||
visible: ServerContainersLogic.pushButtonOpenvpnContShareVisible
|
||||
visible: ServerContainersLogic.pushButtonOpenVpnContShareVisible
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoOpenvpnContShareClicked(false)
|
||||
ServerContainersLogic.onPushButtonProtoOpenVpnContShareClicked(false)
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
|
|
@ -349,14 +349,14 @@ Item {
|
|||
: "qrc:/images/connect_button_disconnected.png"
|
||||
width: 36
|
||||
height: 24
|
||||
checked: ServerContainersLogic.pushButtonOpenvpnContInstallChecked
|
||||
checked: ServerContainersLogic.pushButtonOpenVpnContInstallChecked
|
||||
onCheckedChanged: {
|
||||
ServerContainersLogic.pushButtonOpenvpnContInstallChecked = checked
|
||||
ServerContainersLogic.pushButtonOpenVpnContInstallChecked = checked
|
||||
}
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoOpenvpnContInstallClicked(checked)
|
||||
ServerContainersLogic.onPushButtonProtoOpenVpnContInstallClicked(checked)
|
||||
}
|
||||
enabled: ServerContainersLogic.pushButtonOpenvpnContInstallEnabled
|
||||
enabled: ServerContainersLogic.pushButtonOpenVpnContInstallEnabled
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
|
|
@ -375,7 +375,7 @@ Item {
|
|||
text: qsTr("OpenVPN settings")
|
||||
icon.source: "qrc:/images/settings.png"
|
||||
onClicked: {
|
||||
ServerContainersLogic.onPushButtonProtoOpenvpnContOpenvpnConfigClicked()
|
||||
ServerContainersLogic.onPushButtonProtoOpenVpnContOpenvpnConfigClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import "../Config"
|
|||
|
||||
Item {
|
||||
id: root
|
||||
enabled: ServerSettingsLogic.pageServerSettingsEnabled
|
||||
enabled: ServerSettingsLogic.pageEnabled
|
||||
|
||||
ImageButtonType {
|
||||
id: back
|
||||
|
|
@ -47,7 +47,7 @@ Item {
|
|||
height: 31
|
||||
font.pixelSize: 20
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: ServerSettingsLogic.labelServerSettingsCurrentVpnProtocolText
|
||||
text: ServerSettingsLogic.labelCurrentVpnProtocolText
|
||||
}
|
||||
LabelType {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
|
@ -56,25 +56,25 @@ Item {
|
|||
height: 31
|
||||
font.pixelSize: 20
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: ServerSettingsLogic.labelServerSettingsServerText
|
||||
text: ServerSettingsLogic.labelServerText
|
||||
}
|
||||
LabelType {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 530
|
||||
width: 301
|
||||
height: 41
|
||||
text: ServerSettingsLogic.labelServerSettingsWaitInfoText
|
||||
visible: ServerSettingsLogic.labelServerSettingsWaitInfoVisible
|
||||
text: ServerSettingsLogic.labelWaitInfoText
|
||||
visible: ServerSettingsLogic.labelWaitInfoVisible
|
||||
}
|
||||
TextFieldType {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
y: 80
|
||||
width: 251
|
||||
height: 31
|
||||
text: ServerSettingsLogic.lineEditServerSettingsDescriptionText
|
||||
text: ServerSettingsLogic.lineEditDescriptionText
|
||||
onEditingFinished: {
|
||||
ServerSettingsLogic.lineEditServerSettingsDescriptionText = text
|
||||
ServerSettingsLogic.onLineEditServerSettingsDescriptionEditingFinished()
|
||||
ServerSettingsLogic.lineEditDescriptionText = text
|
||||
ServerSettingsLogic.onLineEditDescriptionEditingFinished()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
|
@ -82,10 +82,10 @@ Item {
|
|||
y: 410
|
||||
width: 300
|
||||
height: 40
|
||||
text: ServerSettingsLogic.pushButtonServerSettingsClearText
|
||||
visible: ServerSettingsLogic.pushButtonServerSettingsClearVisible
|
||||
text: ServerSettingsLogic.pushButtonClearText
|
||||
visible: ServerSettingsLogic.pushButtonClearVisible
|
||||
onClicked: {
|
||||
ServerSettingsLogic.onPushButtonServerSettingsClearServer()
|
||||
ServerSettingsLogic.onPushButtonClearServer()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
|
@ -93,10 +93,10 @@ Item {
|
|||
y: 350
|
||||
width: 300
|
||||
height: 40
|
||||
text: ServerSettingsLogic.pushButtonServerSettingsClearClientCacheText
|
||||
visible: ServerSettingsLogic.pushButtonServerSettingsClearClientCacheVisible
|
||||
text: ServerSettingsLogic.pushButtonClearClientCacheText
|
||||
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
|
||||
onClicked: {
|
||||
ServerSettingsLogic.onPushButtonServerSettingsClearClientCacheClicked()
|
||||
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
|
@ -106,7 +106,7 @@ Item {
|
|||
height: 40
|
||||
text: qsTr("Forget this server")
|
||||
onClicked: {
|
||||
ServerSettingsLogic.onPushButtonServerSettingsForgetServer()
|
||||
ServerSettingsLogic.onPushButtonForgetServer()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
|
@ -125,9 +125,9 @@ Item {
|
|||
width: 300
|
||||
height: 40
|
||||
text: qsTr("Share Server (FULL ACCESS)")
|
||||
visible: ServerSettingsLogic.pushButtonServerSettingsShareFullVisible
|
||||
visible: ServerSettingsLogic.pushButtonShareFullVisible
|
||||
onClicked: {
|
||||
ServerSettingsLogic.onPushButtonServerSettingsShareFullClicked()
|
||||
ServerSettingsLogic.onPushButtonShareFullClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,9 +89,9 @@ Item {
|
|||
width: 331
|
||||
height: 25
|
||||
text: qsTr("High censorship level")
|
||||
checked: WizardLogic.radioButtonSetupWizardHighChecked
|
||||
checked: WizardLogic.radioButtonHighChecked
|
||||
onCheckedChanged: {
|
||||
WizardLogic.radioButtonSetupWizardHighChecked = checked
|
||||
WizardLogic.radioButtonHighChecked = checked
|
||||
}
|
||||
}
|
||||
RadioButtonType {
|
||||
|
|
@ -101,9 +101,9 @@ Item {
|
|||
width: 331
|
||||
height: 25
|
||||
text: qsTr("Low censorship level")
|
||||
checked: WizardLogic.radioButtonSetupWizardLowChecked
|
||||
checked: WizardLogic.radioButtonLowChecked
|
||||
onCheckedChanged: {
|
||||
WizardLogic.radioButtonSetupWizardLowChecked = checked
|
||||
WizardLogic.radioButtonLowChecked = checked
|
||||
}
|
||||
}
|
||||
RadioButtonType {
|
||||
|
|
@ -113,9 +113,9 @@ Item {
|
|||
width: 331
|
||||
height: 25
|
||||
text: qsTr("Medium censorship level")
|
||||
checked: WizardLogic.radioButtonSetupWizardMediumChecked
|
||||
checked: WizardLogic.radioButtonMediumChecked
|
||||
onCheckedChanged: {
|
||||
WizardLogic.radioButtonSetupWizardMediumChecked = checked
|
||||
WizardLogic.radioButtonMediumChecked = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ Item {
|
|||
y: 360
|
||||
width: 301
|
||||
height: 41
|
||||
text: WizardLogic.lineEditSetupWizardHighWebsiteMaskingText
|
||||
text: WizardLogic.lineEditHighWebsiteMaskingText
|
||||
onEditingFinished: {
|
||||
let _text = website_masking.text
|
||||
_text.replace("http://", "");
|
||||
|
|
@ -72,7 +72,7 @@ Item {
|
|||
return
|
||||
}
|
||||
_text = _text.split("/").first();
|
||||
WizardLogic.lineEditSetupWizardHighWebsiteMaskingText = _text
|
||||
WizardLogic.lineEditHighWebsiteMaskingText = _text
|
||||
}
|
||||
onAccepted: {
|
||||
next_button.clicked()
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Item {
|
|||
height: 40
|
||||
text: qsTr("Start configuring")
|
||||
onClicked: {
|
||||
WizardLogic.onPushButtonSetupWizardLowFinishClicked()
|
||||
WizardLogic.onPushButtonLowFinishClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@ Item {
|
|||
width: 301
|
||||
height: 71
|
||||
text: qsTr('Turn on mode "VPN for selected sites"')
|
||||
checked: WizardLogic.checkBoxSetupWizardVpnModeChecked
|
||||
checked: WizardLogic.checkBoxVpnModeChecked
|
||||
onCheckedChanged: {
|
||||
WizardLogic.checkBoxSetupWizardVpnModeChecked = checked
|
||||
WizardLogic.checkBoxVpnModeChecked = checked
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
|
|
@ -61,7 +61,7 @@ Item {
|
|||
height: 40
|
||||
text: qsTr("Start configuring")
|
||||
onClicked: {
|
||||
WizardLogic.onPushButtonSetupWizardVpnModeFinishClicked()
|
||||
WizardLogic.onPushButtonVpnModeFinishClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ Item {
|
|||
id: share_openvpn
|
||||
x: 0
|
||||
text: qsTr("Share for OpenVPN client")
|
||||
visible: ShareConnectionLogic.pageShareOpenvpnVisible
|
||||
visible: ShareConnectionLogic.pageShareOpenVpnVisible
|
||||
content: Component {
|
||||
Item {
|
||||
width: 360
|
||||
|
|
@ -210,10 +210,10 @@ Item {
|
|||
y: 180
|
||||
width: 341
|
||||
height: 40
|
||||
text: ShareConnectionLogic.pushButtonShareOpenvpnCopyText
|
||||
enabled: ShareConnectionLogic.pushButtonShareOpenvpnCopyEnabled
|
||||
text: ShareConnectionLogic.pushButtonShareOpenVpnCopyText
|
||||
enabled: ShareConnectionLogic.pushButtonShareOpenVpnCopyEnabled
|
||||
onClicked: {
|
||||
ShareConnectionLogic.onPushButtonShareOpenvpnCopyClicked()
|
||||
ShareConnectionLogic.onPushButtonShareOpenVpnCopyClicked()
|
||||
}
|
||||
}
|
||||
ShareConnectionButtonType {
|
||||
|
|
@ -221,11 +221,11 @@ Item {
|
|||
y: 130
|
||||
width: 341
|
||||
height: 40
|
||||
text: ShareConnectionLogic.pushButtonShareOpenvpnGenerateText
|
||||
text: ShareConnectionLogic.pushButtonShareOpenVpnGenerateText
|
||||
onClicked: {
|
||||
ShareConnectionLogic.onPushButtonShareOpenvpnGenerateClicked()
|
||||
ShareConnectionLogic.onPushButtonShareOpenVpnGenerateClicked()
|
||||
}
|
||||
enabled: ShareConnectionLogic.pushButtonShareOpenvpnGenerateEnabled
|
||||
enabled: ShareConnectionLogic.pushButtonShareOpenVpnGenerateEnabled
|
||||
}
|
||||
ShareConnectionButtonType {
|
||||
x: 10
|
||||
|
|
@ -233,9 +233,9 @@ Item {
|
|||
width: 341
|
||||
height: 40
|
||||
text: qsTr("Save file")
|
||||
enabled: ShareConnectionLogic.pushButtonShareOpenvpnSaveEnabled
|
||||
enabled: ShareConnectionLogic.pushButtonShareOpenVpnSaveEnabled
|
||||
onClicked: {
|
||||
ShareConnectionLogic.onPushButtonShareOpenvpnSaveClicked()
|
||||
ShareConnectionLogic.onPushButtonShareOpenVpnSaveClicked()
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
|
|
@ -244,9 +244,9 @@ Item {
|
|||
width: 341
|
||||
height: 100
|
||||
verticalAlignment: Text.AlignTop
|
||||
text: ShareConnectionLogic.textEditShareOpenvpnCodeText
|
||||
text: ShareConnectionLogic.textEditShareOpenVpnCodeText
|
||||
onEditingFinished: {
|
||||
ShareConnectionLogic.textEditShareOpenvpnCodeText = text
|
||||
ShareConnectionLogic.textEditShareOpenVpnCodeText = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ Item {
|
|||
id: share_shadowshock
|
||||
x: 0
|
||||
text: qsTr("Share for ShadowSocks client")
|
||||
visible: ShareConnectionLogic.pageShareShadowsocksVisible
|
||||
visible: ShareConnectionLogic.pageShareShadowSocksVisible
|
||||
content: Component {
|
||||
Item {
|
||||
width: 360
|
||||
|
|
@ -309,28 +309,28 @@ Item {
|
|||
y: 70
|
||||
width: 100
|
||||
height: 20
|
||||
text: ShareConnectionLogic.labelShareSsPasswordText
|
||||
text: ShareConnectionLogic.labelShareShadowSocksPasswordText
|
||||
}
|
||||
LabelType {
|
||||
x: 130
|
||||
y: 10
|
||||
width: 100
|
||||
height: 20
|
||||
text: ShareConnectionLogic.labelShareSsServerText
|
||||
text: ShareConnectionLogic.labelShareShadowSocksServerText
|
||||
}
|
||||
LabelType {
|
||||
x: 130
|
||||
y: 50
|
||||
width: 100
|
||||
height: 20
|
||||
text: ShareConnectionLogic.labelShareSsMethodText
|
||||
text: ShareConnectionLogic.labelShareShadowSocksMethodText
|
||||
}
|
||||
LabelType {
|
||||
x: 130
|
||||
y: 30
|
||||
width: 100
|
||||
height: 20
|
||||
text: ShareConnectionLogic.labelShareSsPortText
|
||||
text: ShareConnectionLogic.labelShareShadowSocksPortText
|
||||
}
|
||||
Image {
|
||||
id: label_share_ss_qr_code
|
||||
|
|
@ -338,17 +338,17 @@ Item {
|
|||
y: 235
|
||||
width: 200
|
||||
height: 200
|
||||
source: ShareConnectionLogic.labelShareSsQrCodeText === "" ? "" : "data:image/png;base64," + UiLogic.labelShareSsQrCodeText
|
||||
source: ShareConnectionLogic.labelShareShadowSocksQrCodeText === "" ? "" : "data:image/png;base64," + UiLogic.labelShareShadowSocksQrCodeText
|
||||
}
|
||||
ShareConnectionButtonType {
|
||||
x: 10
|
||||
y: 180
|
||||
width: 331
|
||||
height: 40
|
||||
text: ShareConnectionLogic.pushButtonShareSsCopyText
|
||||
enabled: ShareConnectionLogic.pushButtonShareSsCopyEnabled
|
||||
text: ShareConnectionLogic.pushButtonShareShadowSocksCopyText
|
||||
enabled: ShareConnectionLogic.pushButtonShareShadowSocksCopyEnabled
|
||||
onClicked: {
|
||||
ShareConnectionLogic.onPushButtonShareSsCopyClicked()
|
||||
ShareConnectionLogic.onPushButtonShareShadowSocksCopyClicked()
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
|
|
@ -357,9 +357,9 @@ Item {
|
|||
width: 331
|
||||
height: 100
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: ShareConnectionLogic.lineEditShareSsStringText
|
||||
text: ShareConnectionLogic.lineEditShareShadowSocksStringText
|
||||
onEditingFinished: {
|
||||
ShareConnectionLogic.lineEditShareSsStringText = text
|
||||
ShareConnectionLogic.lineEditShareShadowSocksStringText = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ Item {
|
|||
height: 40
|
||||
text: qsTr("Connect")
|
||||
onClicked: {
|
||||
StartPageLogic.onPushButtonNewServerImport()
|
||||
StartPageLogic.onPushButtonImport()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -165,8 +165,8 @@ Item {
|
|||
y: 390
|
||||
width: 301
|
||||
height: 41
|
||||
text: StartPageLogic.labelNewServerWaitInfoText
|
||||
visible: StartPageLogic.labelNewServerWaitInfoVisible
|
||||
text: StartPageLogic.labelWaitInfoText
|
||||
visible: StartPageLogic.labelWaitInfoVisible
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
TextFieldType {
|
||||
|
|
@ -175,9 +175,9 @@ Item {
|
|||
y: 100
|
||||
width: 300
|
||||
height: 40
|
||||
text: StartPageLogic.lineEditNewServerIpText
|
||||
text: StartPageLogic.lineEditIpText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditNewServerIpText = text
|
||||
StartPageLogic.lineEditIpText = text
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
|
|
@ -186,9 +186,9 @@ Item {
|
|||
y: 180
|
||||
width: 300
|
||||
height: 40
|
||||
text: StartPageLogic.lineEditNewServerLoginText
|
||||
text: StartPageLogic.lineEditLoginText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditNewServerLoginText = text
|
||||
StartPageLogic.lineEditLoginText = text
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
|
|
@ -198,9 +198,9 @@ Item {
|
|||
width: 300
|
||||
height: 40
|
||||
echoMode: TextInput.Password
|
||||
text: StartPageLogic.lineEditNewServerPasswordText
|
||||
text: StartPageLogic.lineEditPasswordText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.lineEditNewServerPasswordText = text
|
||||
StartPageLogic.lineEditPasswordText = text
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
|
@ -209,12 +209,12 @@ Item {
|
|||
y: 350
|
||||
width: 301
|
||||
height: 40
|
||||
text: StartPageLogic.pushButtonNewServerConnectText
|
||||
visible: StartPageLogic.pushButtonNewServerConnectVisible
|
||||
text: StartPageLogic.pushButtonConnectText
|
||||
visible: StartPageLogic.pushButtonConnectVisible
|
||||
onClicked: {
|
||||
StartPageLogic.onPushButtonNewServerConnect()
|
||||
StartPageLogic.onPushButtonConnect()
|
||||
}
|
||||
enabled: StartPageLogic.pushButtonNewServerConnectEnabled
|
||||
enabled: StartPageLogic.pushButtonConnectEnabled
|
||||
}
|
||||
BasicButtonType {
|
||||
id: new_sever_connect_key
|
||||
|
|
@ -239,9 +239,9 @@ Item {
|
|||
}
|
||||
antialiasing: true
|
||||
checkable: true
|
||||
checked: StartPageLogic.pushButtonNewServerConnectKeyChecked
|
||||
checked: StartPageLogic.pushButtonConnectKeyChecked
|
||||
onCheckedChanged: {
|
||||
StartPageLogic.pushButtonNewServerConnectKeyChecked = checked
|
||||
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
|
||||
|
|
@ -285,9 +285,9 @@ Item {
|
|||
echoMode: TextInput.Password
|
||||
font.pixelSize: 9
|
||||
verticalAlignment: Text.AlignTop
|
||||
text: StartPageLogic.textEditNewServerSshKeyText
|
||||
text: StartPageLogic.textEditSshKeyText
|
||||
onEditingFinished: {
|
||||
StartPageLogic.textEditNewServerSshKeyText = text
|
||||
StartPageLogic.textEditSshKeyText = text
|
||||
}
|
||||
visible: false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import "../../Config"
|
|||
|
||||
Item {
|
||||
id: root
|
||||
enabled: OpenVpnLogic.pageProtoOpenvpnEnabled
|
||||
enabled: OpenVpnLogic.pageProtoOpenVpnEnabled
|
||||
ImageButtonType {
|
||||
id: back
|
||||
x: 10
|
||||
|
|
@ -23,19 +23,19 @@ Item {
|
|||
y: 40
|
||||
width: 380
|
||||
height: 600
|
||||
enabled: OpenVpnLogic.widgetProtoOpenvpnEnabled
|
||||
enabled: OpenVpnLogic.widgetProtoOpenVpnEnabled
|
||||
CheckBoxType {
|
||||
x: 30
|
||||
y: 280
|
||||
width: 321
|
||||
height: 21
|
||||
text: qsTr("Auto-negotiate encryption")
|
||||
checked: OpenVpnLogic.checkBoxProtoOpenvpnAutoEncryptionChecked
|
||||
checked: OpenVpnLogic.checkBoxProtoOpenVpnAutoEncryptionChecked
|
||||
onCheckedChanged: {
|
||||
OpenVpnLogic.checkBoxProtoOpenvpnAutoEncryptionChecked = checked
|
||||
OpenVpnLogic.checkBoxProtoOpenVpnAutoEncryptionChecked = checked
|
||||
}
|
||||
onClicked: {
|
||||
OpenVpnLogic.checkBoxProtoOpenvpnAutoEncryptionClicked()
|
||||
OpenVpnLogic.checkBoxProtoOpenVpnAutoEncryptionClicked()
|
||||
}
|
||||
}
|
||||
CheckBoxType {
|
||||
|
|
@ -44,9 +44,9 @@ Item {
|
|||
width: 321
|
||||
height: 21
|
||||
text: qsTr("Block DNS requests outside of VPN")
|
||||
checked: OpenVpnLogic.checkBoxProtoOpenvpnBlockDnsChecked
|
||||
checked: OpenVpnLogic.checkBoxProtoOpenVpnBlockDnsChecked
|
||||
onCheckedChanged: {
|
||||
OpenVpnLogic.checkBoxProtoOpenvpnBlockDnsChecked = checked
|
||||
OpenVpnLogic.checkBoxProtoOpenVpnBlockDnsChecked = checked
|
||||
}
|
||||
}
|
||||
CheckBoxType {
|
||||
|
|
@ -55,9 +55,9 @@ Item {
|
|||
width: 321
|
||||
height: 21
|
||||
text: qsTr("Enable TLS auth")
|
||||
checked: OpenVpnLogic.checkBoxProtoOpenvpnTlsAuthChecked
|
||||
checked: OpenVpnLogic.checkBoxProtoOpenVpnTlsAuthChecked
|
||||
onCheckedChanged: {
|
||||
OpenVpnLogic.checkBoxProtoOpenvpnTlsAuthChecked = checked
|
||||
OpenVpnLogic.checkBoxProtoOpenVpnTlsAuthChecked = checked
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -80,16 +80,16 @@ Item {
|
|||
]
|
||||
currentIndex: {
|
||||
for (let i = 0; i < model.length; ++i) {
|
||||
if (OpenVpnLogic.comboBoxProtoOpenvpnCipherText === model[i]) {
|
||||
if (OpenVpnLogic.comboBoxProtoOpenVpnCipherText === model[i]) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
OpenVpnLogic.comboBoxProtoOpenvpnCipherText = currentText
|
||||
OpenVpnLogic.comboBoxProtoOpenVpnCipherText = currentText
|
||||
}
|
||||
enabled: OpenVpnLogic.comboBoxProtoOpenvpnCipherEnabled
|
||||
enabled: OpenVpnLogic.comboBoxProtoOpenVpnCipherEnabled
|
||||
}
|
||||
ComboBoxType {
|
||||
x: 200
|
||||
|
|
@ -110,16 +110,16 @@ Item {
|
|||
]
|
||||
currentIndex: {
|
||||
for (let i = 0; i < model.length; ++i) {
|
||||
if (OpenVpnLogic.comboBoxProtoOpenvpnHashText === model[i]) {
|
||||
if (OpenVpnLogic.comboBoxProtoOpenVpnHashText === model[i]) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
OpenVpnLogic.comboBoxProtoOpenvpnHashText = currentText
|
||||
OpenVpnLogic.comboBoxProtoOpenVpnHashText = currentText
|
||||
}
|
||||
enabled: OpenVpnLogic.comboBoxProtoOpenvpnHashEnabled
|
||||
enabled: OpenVpnLogic.comboBoxProtoOpenVpnHashEnabled
|
||||
}
|
||||
Rectangle {
|
||||
x: 30
|
||||
|
|
@ -135,10 +135,10 @@ Item {
|
|||
width: 171
|
||||
height: 19
|
||||
text: qsTr("TCP")
|
||||
enabled: OpenVpnLogic.radioButtonProtoOpenvpnTcpEnabled
|
||||
checked: OpenVpnLogic.radioButtonProtoOpenvpnTcpChecked
|
||||
enabled: OpenVpnLogic.radioButtonProtoOpenVpnTcpEnabled
|
||||
checked: OpenVpnLogic.radioButtonProtoOpenVpnTcpChecked
|
||||
onCheckedChanged: {
|
||||
UiLogic.radioButtonProtoOpenvpnTcpChecked = checked
|
||||
UiLogic.radioButtonProtoOpenVpnTcpChecked = checked
|
||||
}
|
||||
}
|
||||
RadioButtonType {
|
||||
|
|
@ -147,11 +147,11 @@ Item {
|
|||
width: 171
|
||||
height: 19
|
||||
text: qsTr("UDP")
|
||||
checked: OpenVpnLogic.radioButtonProtoOpenvpnUdpChecked
|
||||
checked: OpenVpnLogic.radioButtonProtoOpenVpnUdpChecked
|
||||
onCheckedChanged: {
|
||||
OpenVpnLogic.radioButtonProtoOpenvpnUdpChecked = checked
|
||||
OpenVpnLogic.radioButtonProtoOpenVpnUdpChecked = checked
|
||||
}
|
||||
enabled: OpenVpnLogic.radioButtonProtoOpenvpnUdpEnabled
|
||||
enabled: OpenVpnLogic.radioButtonProtoOpenVpnUdpEnabled
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
|
|
@ -208,8 +208,8 @@ Item {
|
|||
y: 550
|
||||
width: 321
|
||||
height: 41
|
||||
visible: OpenVpnLogic.labelProtoOpenvpnInfoVisible
|
||||
text: OpenVpnLogic.labelProtoOpenvpnInfoText
|
||||
visible: OpenVpnLogic.labelProtoOpenVpnInfoVisible
|
||||
text: OpenVpnLogic.labelProtoOpenVpnInfoText
|
||||
}
|
||||
TextFieldType {
|
||||
id: lineEdit_proto_openvpn_port
|
||||
|
|
@ -217,11 +217,11 @@ Item {
|
|||
y: 230
|
||||
width: 151
|
||||
height: 31
|
||||
text: OpenVpnLogic.lineEditProtoOpenvpnPortText
|
||||
text: OpenVpnLogic.lineEditProtoOpenVpnPortText
|
||||
onEditingFinished: {
|
||||
OpenVpnLogic.lineEditProtoOpenvpnPortText = text
|
||||
OpenVpnLogic.lineEditProtoOpenVpnPortText = text
|
||||
}
|
||||
enabled: OpenVpnLogic.lineEditProtoOpenvpnPortEnabled
|
||||
enabled: OpenVpnLogic.lineEditProtoOpenVpnPortEnabled
|
||||
}
|
||||
TextFieldType {
|
||||
id: lineEdit_proto_openvpn_subnet
|
||||
|
|
@ -229,9 +229,9 @@ Item {
|
|||
y: 65
|
||||
width: 321
|
||||
height: 31
|
||||
text: OpenVpnLogic.lineEditProtoOpenvpnSubnetText
|
||||
text: OpenVpnLogic.lineEditProtoOpenVpnSubnetText
|
||||
onEditingFinished: {
|
||||
OpenVpnLogic.lineEditProtoOpenvpnSubnetText = text
|
||||
OpenVpnLogic.lineEditProtoOpenVpnSubnetText = text
|
||||
}
|
||||
}
|
||||
ProgressBar {
|
||||
|
|
@ -241,9 +241,9 @@ Item {
|
|||
width: 321
|
||||
height: 40
|
||||
from: 0
|
||||
to: OpenVpnLogic.progressBarProtoOpenvpnResetMaximium
|
||||
value: OpenVpnLogic.progressBarProtoOpenvpnResetValue
|
||||
visible: OpenVpnLogic.progressBarProtoOpenvpnResetVisible
|
||||
to: OpenVpnLogic.progressBarProtoOpenVpnResetMaximium
|
||||
value: OpenVpnLogic.progressBarProtoOpenVpnResetValue
|
||||
visible: OpenVpnLogic.progressBarProtoOpenVpnResetVisible
|
||||
background: Rectangle {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
|
@ -270,7 +270,7 @@ Item {
|
|||
text: qsTr("Save and restart VPN")
|
||||
visible: OpenVpnLogic.pushButtonOpenvpnSaveVisible
|
||||
onClicked: {
|
||||
OpenVpnLogic.onPushButtonProtoOpenvpnSaveClicked()
|
||||
OpenVpnLogic.onPushButtonProtoOpenVpnSaveClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import "../../Config"
|
|||
|
||||
Item {
|
||||
id: root
|
||||
enabled: ShadowSocksLogic.pageProtoShadowsocksEnabled
|
||||
enabled: ShadowSocksLogic.pageProtoShadowSocksEnabled
|
||||
ImageButtonType {
|
||||
id: back
|
||||
x: 10
|
||||
|
|
@ -23,7 +23,7 @@ Item {
|
|||
y: 40
|
||||
width: 380
|
||||
height: 600
|
||||
enabled: ShadowSocksLogic.widgetProtoSsEnabled
|
||||
enabled: ShadowSocksLogic.widgetProtoShadowSocksEnabled
|
||||
ComboBoxType {
|
||||
x: 190
|
||||
y: 60
|
||||
|
|
@ -36,14 +36,14 @@ Item {
|
|||
]
|
||||
currentIndex: {
|
||||
for (let i = 0; i < model.length; ++i) {
|
||||
if (ShadowSocksLogic.comboBoxProtoShadowsocksCipherText === model[i]) {
|
||||
if (ShadowSocksLogic.comboBoxProtoShadowSocksCipherText === model[i]) {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
onCurrentTextChanged: {
|
||||
ShadowSocksLogic.comboBoxProtoShadowsocksCipherText = currentText
|
||||
ShadowSocksLogic.comboBoxProtoShadowSocksCipherText = currentText
|
||||
}
|
||||
}
|
||||
LabelType {
|
||||
|
|
@ -79,8 +79,8 @@ Item {
|
|||
y: 550
|
||||
width: 321
|
||||
height: 41
|
||||
visible: ShadowSocksLogic.labelProtoShadowsocksInfoVisible
|
||||
text: ShadowSocksLogic.labelProtoShadowsocksInfoText
|
||||
visible: ShadowSocksLogic.labelProtoShadowSocksInfoVisible
|
||||
text: ShadowSocksLogic.labelProtoShadowSocksInfoText
|
||||
}
|
||||
TextFieldType {
|
||||
id: lineEdit_proto_shadowsocks_port
|
||||
|
|
@ -88,11 +88,11 @@ Item {
|
|||
y: 110
|
||||
width: 151
|
||||
height: 31
|
||||
text: ShadowSocksLogic.lineEditProtoShadowsocksPortText
|
||||
text: ShadowSocksLogic.lineEditProtoShadowSocksPortText
|
||||
onEditingFinished: {
|
||||
ShadowSocksLogic.lineEditProtoShadowsocksPortText = text
|
||||
ShadowSocksLogic.lineEditProtoShadowSocksPortText = text
|
||||
}
|
||||
enabled: ShadowSocksLogic.lineEditProtoShadowsocksPortEnabled
|
||||
enabled: ShadowSocksLogic.lineEditProtoShadowSocksPortEnabled
|
||||
}
|
||||
ProgressBar {
|
||||
id: progressBar_proto_shadowsocks_reset
|
||||
|
|
@ -101,9 +101,9 @@ Item {
|
|||
width: 321
|
||||
height: 40
|
||||
from: 0
|
||||
to: ShadowSocksLogic.progressBarProtoShadowsocksResetMaximium
|
||||
value: ShadowSocksLogic.progressBarProtoShadowsocksResetValue
|
||||
visible: ShadowSocksLogic.progressBarProtoShadowsocksResetVisible
|
||||
to: ShadowSocksLogic.progressBarProtoShadowSocksResetMaximium
|
||||
value: ShadowSocksLogic.progressBarProtoShadowSocksResetValue
|
||||
visible: ShadowSocksLogic.progressBarProtoShadowSocksResetVisible
|
||||
background: Rectangle {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: parent.height
|
||||
|
|
@ -128,9 +128,9 @@ Item {
|
|||
width: 321
|
||||
height: 40
|
||||
text: qsTr("Save and restart VPN")
|
||||
visible: ShadowSocksLogic.pushButtonShadowsocksSaveVisible
|
||||
visible: ShadowSocksLogic.pushButtonShadowSocksSaveVisible
|
||||
onClicked: {
|
||||
ShadowSocksLogic.onPushButtonProtoShadowsocksSaveClicked()
|
||||
ShadowSocksLogic.onPushButtonProtoShadowSocksSaveClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,27 +144,28 @@ Window {
|
|||
console.debug(pageComponent)
|
||||
if (reset) {
|
||||
if (page === PageEnum.ServerSettings) {
|
||||
ServerSettingsLogic.updateServerSettingsPage();
|
||||
ServerSettingsLogic.updatePage();
|
||||
}
|
||||
if (page === PageEnum.ShareConnection) {
|
||||
}
|
||||
if (page === PageEnum.ShareConnection) {}
|
||||
if (page === PageEnum.Wizard) {
|
||||
UiLogic.radioButtonSetupWizardMediumChecked = true
|
||||
WizardLogic.radioButtonMediumChecked = true
|
||||
}
|
||||
if (page === PageEnum.WizardHigh) {
|
||||
UiLogic.updateWizardHighPage();
|
||||
WizardLogic.updatePage();
|
||||
}
|
||||
if (page === PageEnum.ServerConfiguring) {
|
||||
UiLogic.progressBarValue = 0;
|
||||
ServerConfiguringLogic.progressBarValue = 0;
|
||||
}
|
||||
if (page === PageEnum.GeneralSettings) {
|
||||
GeneralSettingsLogic.updatePage();
|
||||
}
|
||||
if (page === PageEnum.ServersList) {
|
||||
ServerListLogic.updateServersListPage();
|
||||
ServerListLogic.updatePage();
|
||||
}
|
||||
if (page === PageEnum.Start) {
|
||||
StartPageLogic.pushButtonBackFromStartVisible = !pageLoader.empty
|
||||
StartPageLogic.updateStartPage();
|
||||
StartPageLogic.updatePage();
|
||||
}
|
||||
if (page === PageEnum.NewServerProtocols) {
|
||||
NewServerProtocolsLogic.updatePage()
|
||||
|
|
@ -184,7 +185,6 @@ Window {
|
|||
if (page === PageEnum.Vpn) {
|
||||
VpnLogic.updateVpnPage()
|
||||
}
|
||||
UiLogic.pushButtonNewServerConnectKeyChecked = false
|
||||
}
|
||||
if (slide) {
|
||||
pageLoader.push(pageComponent, {}, StackView.PushTransition)
|
||||
|
|
@ -210,7 +210,7 @@ Window {
|
|||
}
|
||||
if (page === PageEnum.Start) {
|
||||
UiLogic.pushButtonBackFromStartVisible = !pageLoader.empty
|
||||
UiLogic.updateStartPage();
|
||||
UiLogic.updatePage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue