mirror of
https://github.com/outbackdingo/amnezia-client.git
synced 2026-01-27 02:18:09 +00:00
fix: fixed switcher behavior (#1801)
This commit is contained in:
@@ -155,7 +155,7 @@ Switch {
|
||||
function handleSwitch(event) {
|
||||
if (!event.isAutoRepeat) {
|
||||
root.checked = !root.checked
|
||||
root.checkedChanged()
|
||||
root.toggled()
|
||||
}
|
||||
event.accepted = true
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ PageType {
|
||||
text: qsTr("Auto-negotiate encryption")
|
||||
checked: autoNegotiateEncryprion
|
||||
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== autoNegotiateEncryprion) {
|
||||
autoNegotiateEncryprion = checked
|
||||
}
|
||||
@@ -320,7 +320,7 @@ PageType {
|
||||
|
||||
text: qsTr("Additional client configuration commands")
|
||||
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (!checked) {
|
||||
additionalClientCommands = ""
|
||||
}
|
||||
@@ -357,7 +357,7 @@ PageType {
|
||||
|
||||
text: qsTr("Additional server configuration commands")
|
||||
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (!checked) {
|
||||
additionalServerCommands = ""
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ PageType {
|
||||
text: qsTr("Allow application screenshots")
|
||||
|
||||
checked: SettingsController.isScreenshotsEnabled()
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== SettingsController.isScreenshotsEnabled()) {
|
||||
SettingsController.toggleScreenshotsEnabled(checked)
|
||||
}
|
||||
@@ -109,7 +109,7 @@ PageType {
|
||||
descriptionText: qsTr("Launch the application every time the device is starts")
|
||||
|
||||
checked: SettingsController.isAutoStartEnabled()
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== SettingsController.isAutoStartEnabled()) {
|
||||
SettingsController.toggleAutoStart(checked)
|
||||
}
|
||||
@@ -132,7 +132,7 @@ PageType {
|
||||
descriptionText: qsTr("Connect to VPN on app start")
|
||||
|
||||
checked: SettingsController.isAutoConnectEnabled()
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== SettingsController.isAutoConnectEnabled()) {
|
||||
SettingsController.toggleAutoConnect(checked)
|
||||
}
|
||||
@@ -158,7 +158,7 @@ PageType {
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
|
||||
checked: SettingsController.isStartMinimizedEnabled()
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== SettingsController.isStartMinimizedEnabled()) {
|
||||
SettingsController.toggleStartMinimized(checked)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ PageType {
|
||||
descriptionText: qsTr("If AmneziaDNS is installed on the server")
|
||||
|
||||
checked: SettingsController.isAmneziaDnsEnabled()
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== SettingsController.isAmneziaDnsEnabled()) {
|
||||
SettingsController.toggleAmneziaDns(checked)
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ PageType {
|
||||
|
||||
checked: SettingsController.isLoggingEnabled
|
||||
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== SettingsController.isLoggingEnabled) {
|
||||
SettingsController.isLoggingEnabled = checked
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ PageType {
|
||||
|
||||
visible: PageController.isStartPageVisible()
|
||||
checked: SettingsController.isLoggingEnabled
|
||||
onCheckedChanged: {
|
||||
onToggled: function() {
|
||||
if (checked !== SettingsController.isLoggingEnabled) {
|
||||
SettingsController.isLoggingEnabled = checked
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user