diff options
author | Arne Schwabe <arne@rfc2549.org> | 2021-10-04 17:49:17 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2021-10-04 17:49:17 +0200 |
commit | bb0c82f28b2a25718fb711d1f77caa7cce2d3ade (patch) | |
tree | 46684f65b1d56d0db4adae617b2d260d2ff87374 /main/src | |
parent | e171dca738a8a46ae29d82512e9ff9b17d50b63f (diff) |
Hide autologin checkbox when importing from URL
Diffstat (limited to 'main/src')
-rwxr-xr-x | main/src/main/res/values/strings.xml | 2 | ||||
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/fragments/ImportRemoteConfig.kt | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/main/src/main/res/values/strings.xml b/main/src/main/res/values/strings.xml index dd2589c6..4ae7a804 100755 --- a/main/src/main/res/values/strings.xml +++ b/main/src/main/res/values/strings.xml @@ -509,7 +509,7 @@ <string name="trigger_pending_auth_dialog">Press here open a window to enter additional required authentication</string> <string name="import_from_access_server">OpenVPN Access Server</string> <string name="import_from_URL">URL</string> - <string name="compatmode">Compatiblity Mode</string> + <string name="compatmode">Compatibility Mode</string> <string name="compat_mode_label">Compatibility mode</string> <string name="need_fingerprint_or_ca">An OpenVPN profile needs a CA certificate or peer fingerprint</string> diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/ImportRemoteConfig.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/ImportRemoteConfig.kt index 15806d15..fe23ea98 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/ImportRemoteConfig.kt +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/ImportRemoteConfig.kt @@ -20,6 +20,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.* +import androidx.core.view.isInvisible import androidx.fragment.app.DialogFragment import androidx.lifecycle.lifecycleScope import de.blinkt.openvpn.R @@ -247,10 +248,14 @@ class ImportRemoteConfig : DialogFragment() { importChoiceAS = dialogView.findViewById(R.id.import_choice_as) importChoiceGroup.setOnCheckedChangeListener { group, checkedId -> - if (checkedId == R.id.import_choice_as) + if (checkedId == R.id.import_choice_as) { asServername.setHint(R.string.as_servername) - else + asUseAutologin.visibility = View.VISIBLE + } + else { asServername.setHint(R.string.server_url) + asUseAutologin.visibility = View.GONE + } } builder.setPositiveButton(R.string.import_config, null) |