Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed additional info can not be save in page OpenVpn settings #329

Merged
merged 1 commit into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions client/ui/qml/Controls2/TextAreaType.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Rectangle {

property string placeholderText
property string text
property var onEditingFinished
property alias textArea: textArea
property alias textAreaText: textArea.text

height: 148
color: "#1C1D21"
Expand Down Expand Up @@ -40,12 +41,6 @@ Rectangle {
placeholderText: root.placeholderText
text: root.text

onEditingFinished: {
if (root.onEditingFinished && typeof root.onEditingFinished === "function") {
root.onEditingFinished()
}
}

wrapMode: Text.Wrap

MouseArea {
Expand Down
22 changes: 14 additions & 8 deletions client/ui/qml/Pages2/PageProtocolOpenVpnSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ PageType {

visible: additionalClientCommandsSwitcher.checked

text: additionalClientCommands
textAreaText: additionalClientCommands
placeholderText: qsTr("Commands:")

onEditingFinished: {
if (additionalClientCommands !== text) {
additionalClientCommands = text
textArea.onEditingFinished: {
if (additionalClientCommands !== textAreaText) {
additionalClientCommands = textAreaText
}
}
}
Expand All @@ -330,6 +330,12 @@ PageType {
checked: additionalServerCommands !== ""

text: qsTr("Additional server configuration commands")

onCheckedChanged: {
if (!checked) {
additionalServerCommands = ""
}
}
}

TextAreaType {
Expand All @@ -338,12 +344,12 @@ PageType {

visible: additionalServerCommandsSwitcher.checked

text: additionalServerCommands
textAreaText: additionalServerCommands
placeholderText: qsTr("Commands:")

onEditingFinished: {
if (additionalServerCommands !== text) {
additionalServerCommands = text
textArea.onEditingFinished: {
if (additionalServerCommands !== textAreaText) {
additionalServerCommands = textAreaText
}
}
}
Expand Down