TunnelEditor: move hint to label and add discouraged optional

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-03-28 14:45:28 -06:00
parent 1da714852f
commit 75252cf9d5
3 changed files with 9 additions and 8 deletions

View File

@ -72,6 +72,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:hint="@string/name"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/interface_title">
@ -80,7 +81,6 @@
android:id="@+id/interface_name_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/name"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={name}"
app:filter="@{NameInputFilter.newInstance()}" />
@ -92,6 +92,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:hint="@string/private_key"
app:layout_constraintEnd_toStartOf="@id/generate_private_key_button"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_weight="0.7"
@ -102,7 +103,6 @@
android:id="@+id/private_key_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/private_key"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={config.interface.privateKey}"
app:filter="@{KeyInputFilter.newInstance()}" />
@ -153,6 +153,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:hint="@string/addresses"
app:layout_constraintEnd_toStartOf="@id/listen_port_label_layout"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_weight="0.7"
@ -163,7 +164,6 @@
android:id="@+id/addresses_label_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/addresses"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={config.interface.addresses}" />
</com.google.android.material.textfield.TextInputLayout>
@ -196,6 +196,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:hint="@string/dns_servers"
app:layout_constraintEnd_toStartOf="@id/mtu_label_layout"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintHorizontal_weight="0.7"
@ -206,7 +207,6 @@
android:id="@+id/dns_servers_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/dns_servers"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={config.interface.dnsServers}" />
</com.google.android.material.textfield.TextInputLayout>

View File

@ -62,6 +62,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:hint="@string/public_key"
app:layout_constraintBottom_toTopOf="@+id/pre_shared_key_label_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -71,7 +72,6 @@
android:id="@+id/public_key_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/public_key"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.publicKey}"
app:filter="@{KeyInputFilter.newInstance()}" />
@ -112,7 +112,7 @@
android:id="@+id/persistent_keepalive_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_optional"
android:hint="@string/hint_optional_discouraged"
android:inputType="number"
android:text="@={item.persistentKeepalive}" />
</com.google.android.material.textfield.TextInputLayout>
@ -123,6 +123,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:hint="@string/endpoint"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/persistent_keepalive_label_layout">
@ -131,7 +132,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:hint="@string/endpoint"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.endpoint}" />
</com.google.android.material.textfield.TextInputLayout>
@ -144,6 +144,7 @@
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:hint="@string/allowed_ips"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/endpoint_label_layout">
@ -152,7 +153,6 @@
android:id="@+id/allowed_ips_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/allowed_ips"
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.allowedIps}" />
</com.google.android.material.textfield.TextInputLayout>

View File

@ -82,6 +82,7 @@
<string name="hint_automatic">(auto)</string>
<string name="hint_generated">(generated)</string>
<string name="hint_optional">(optional)</string>
<string name="hint_optional_discouraged">(optional, not recommended)</string>
<string name="hint_random">(random)</string>
<string name="illegal_filename_error">Illegal file name “%s”</string>
<string name="import_error">Unable to import tunnel: %s</string>