ui: display latest handshake time

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2023-04-24 18:07:03 +02:00
parent 20480992c4
commit b1b08ce716
4 changed files with 94 additions and 8 deletions
+29 -1
View File
@@ -171,7 +171,7 @@
android:id="@+id/transfer_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/endpoint_text"
android:layout_below="@+id/persistent_keepalive_text"
android:layout_marginTop="8dp"
android:labelFor="@+id/transfer_text"
android:text="@string/transfer"
@@ -194,6 +194,34 @@
app:layout_constraintTop_toBottomOf="@+id/transfer_label"
tools:text="1024 MB"
tools:visibility="visible" />
<TextView
android:id="@+id/latest_handshake_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/transfer_text"
android:layout_marginTop="8dp"
android:labelFor="@+id/latest_handshake_text"
android:text="@string/latest_handshake"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/transfer_text"
tools:visibility="visible" />
<TextView
android:id="@+id/latest_handshake_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/latest_handshake_label"
android:contentDescription="@string/latest_handshake"
android:nextFocusUp="@id/transfer_text"
android:onClick="@{ClipboardUtils::copyTextView}"
android:textAppearance="?attr/textAppearanceBodyLarge"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/latest_handshake_label"
tools:text="4 minutes, 27 seconds ago"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</layout>
+2
View File
@@ -140,6 +140,8 @@
<string name="key_length_explanation_base64">: WireGuard base64 keys must be 44 characters (32 bytes)</string>
<string name="key_length_explanation_binary">: WireGuard keys must be 32 bytes</string>
<string name="key_length_explanation_hex">: WireGuard hex keys must be 64 characters (32 bytes)</string>
<string name="latest_handshake">Latest handshake</string>
<string name="latest_handshake_ago">%s ago</string>
<string name="listen_port">Listen port</string>
<string name="log_export_error">Unable to export log: %s</string>
<string name="log_export_subject">WireGuard Android Log File</string>