ui: show excluded/included apps in details view
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
e4192ea172
commit
830d0992a7
@ -219,6 +219,30 @@
|
|||||||
app:layout_constraintStart_toStartOf="@+id/mtu_label"
|
app:layout_constraintStart_toStartOf="@+id/mtu_label"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/mtu_label"
|
app:layout_constraintTop_toBottomOf="@+id/mtu_label"
|
||||||
tools:text="1500" />
|
tools:text="1500" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/applications_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:labelFor="@+id/applications_text"
|
||||||
|
android:text="@string/applications"
|
||||||
|
android:visibility="@{config.interface.includedApplications.isEmpty() && config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/listen_port_text" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/applications_text"
|
||||||
|
style="@style/DetailText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@string/dns_servers"
|
||||||
|
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||||
|
android:text="@{config.interface.includedApplications.isEmpty() ? @plurals/n_excluded_applications(config.interface.excludedApplications.size(), config.interface.excludedApplications.size()) : @plurals/n_included_applications(config.interface.includedApplications.size(), config.interface.includedApplications.size())}"
|
||||||
|
android:visibility="@{config.interface.includedApplications.isEmpty() && config.interface.excludedApplications.isEmpty() ? android.view.View.GONE : android.view.View.VISIBLE}"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/applications_label"
|
||||||
|
tools:text="8 excluded" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
@ -28,6 +28,14 @@
|
|||||||
<item quantity="one">%d Included Application</item>
|
<item quantity="one">%d Included Application</item>
|
||||||
<item quantity="other">%d Included Applications</item>
|
<item quantity="other">%d Included Applications</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<plurals name="n_excluded_applications">
|
||||||
|
<item quantity="one">%d excluded</item>
|
||||||
|
<item quantity="other">%d excluded</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="n_included_applications">
|
||||||
|
<item quantity="one">%d included</item>
|
||||||
|
<item quantity="other">%d included</item>
|
||||||
|
</plurals>
|
||||||
<string name="all_applications">All Applications</string>
|
<string name="all_applications">All Applications</string>
|
||||||
<string name="exclude_from_tunnel">Exclude</string>
|
<string name="exclude_from_tunnel">Exclude</string>
|
||||||
<string name="include_in_tunnel">Include only</string>
|
<string name="include_in_tunnel">Include only</string>
|
||||||
@ -50,6 +58,7 @@
|
|||||||
<string name="use_all_applications">Use all apps</string>
|
<string name="use_all_applications">Use all apps</string>
|
||||||
<string name="add_peer">Add peer</string>
|
<string name="add_peer">Add peer</string>
|
||||||
<string name="addresses">Addresses</string>
|
<string name="addresses">Addresses</string>
|
||||||
|
<string name="applications">Applications</string>
|
||||||
<string name="allow_remote_control_intents_summary_off">External apps may not toggle tunnels (recommended)</string>
|
<string name="allow_remote_control_intents_summary_off">External apps may not toggle tunnels (recommended)</string>
|
||||||
<string name="allow_remote_control_intents_summary_on">External apps may toggle tunnels (advanced)</string>
|
<string name="allow_remote_control_intents_summary_on">External apps may toggle tunnels (advanced)</string>
|
||||||
<string name="allow_remote_control_intents_title">Allow remote control apps</string>
|
<string name="allow_remote_control_intents_title">Allow remote control apps</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user