Share WireGuard page
Share IKEv2 page
This commit is contained in:
parent
c6efc5b212
commit
25428c9165
28 changed files with 907 additions and 238 deletions
|
@ -9,7 +9,6 @@ import "../../Config"
|
|||
PageShareProtocolBase {
|
||||
id: root
|
||||
protocol: ProtocolEnum.Cloak
|
||||
logic: UiLogic.protocolLogic(protocol)
|
||||
|
||||
BackButton {
|
||||
id: back
|
||||
|
@ -19,25 +18,93 @@ PageShareProtocolBase {
|
|||
text: qsTr("Share Cloak Settings")
|
||||
}
|
||||
|
||||
|
||||
TextAreaType {
|
||||
Flickable {
|
||||
id: fl
|
||||
width: root.width
|
||||
anchors.top: caption.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.bottom: pb_save.top
|
||||
anchors.bottomMargin: 20
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
width: parent.width - 60
|
||||
|
||||
textArea.readOnly: true
|
||||
textArea.text: ShareConnectionLogic.textEditShareCloakText
|
||||
}
|
||||
|
||||
ShareConnectionButtonCopyType {
|
||||
id: pb_save
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottomMargin: 10
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
width: parent.width - 60
|
||||
//enabled: ShareConnectionLogic.pushButtonShareCloakCopyEnabled
|
||||
anchors.bottomMargin: 20
|
||||
anchors.left: root.left
|
||||
anchors.leftMargin: 30
|
||||
anchors.right: root.right
|
||||
anchors.rightMargin: 30
|
||||
|
||||
contentHeight: content.height
|
||||
clip: true
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
enabled: logic.pageEnabled
|
||||
anchors.top: content.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
||||
LabelType {
|
||||
id: lb_desc
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 10
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
wrapMode: Text.Wrap
|
||||
text: qsTr("Note: Cloak protocol using same password for all connections")
|
||||
}
|
||||
|
||||
ShareConnectionButtonType {
|
||||
Layout.topMargin: 10
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
text: genConfigProcess ? generatingConfigText : generateConfigText
|
||||
onClicked: {
|
||||
enabled = false
|
||||
genConfigProcess = true
|
||||
ShareConnectionLogic.onPushButtonShareCloakGenerateClicked()
|
||||
enabled = true
|
||||
genConfigProcess = false
|
||||
}
|
||||
}
|
||||
|
||||
TextAreaType {
|
||||
id: tfShareCode
|
||||
|
||||
Layout.topMargin: 20
|
||||
Layout.bottomMargin: 20
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 200
|
||||
|
||||
textArea.readOnly: true
|
||||
textArea.text: ShareConnectionLogic.textEditShareCloakText
|
||||
|
||||
visible: tfShareCode.textArea.length > 0
|
||||
}
|
||||
|
||||
ShareConnectionButtonCopyType {
|
||||
Layout.bottomMargin: 10
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
copyText: tfShareCode.textArea.text
|
||||
}
|
||||
|
||||
ShareConnectionButtonType {
|
||||
Layout.bottomMargin: 10
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
|
||||
text: qsTr("Save to file")
|
||||
enabled: tfShareCode.textArea.length > 0
|
||||
visible: tfShareCode.textArea.length > 0
|
||||
|
||||
onClicked: {
|
||||
UiLogic.saveTextFile(qsTr("Save AmneziaVPN config"), "*.json", tfShareCode.textArea.text)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue