Commit 31c7fd53 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Add a dialog to the query log explaining the icons

Implements #253
parent 8d727b4a
......@@ -12,6 +12,7 @@ import com.frostnerd.smokescreen.R
import com.frostnerd.smokescreen.database.entities.DnsQuery
import com.frostnerd.smokescreen.fragment.querylogfragment.QueryLogDetailFragment
import com.frostnerd.smokescreen.fragment.querylogfragment.QueryLogListFragment
import com.frostnerd.smokescreen.showInfoTextDialogWithClose
import kotlinx.android.synthetic.main.fragment_querylog_main.*
/*
......@@ -68,6 +69,14 @@ class QueryLogFragment : Fragment(), BackpressFragment {
searchView.setSearchableInfo(searchManager.getSearchableInfo(requireActivity().componentName))
searchView.queryHint = getString(R.string.windows_querylogging_search_hint)
searchView.setOnQueryTextListener(listFragment)
menu.findItem(R.id.info)!!.setOnMenuItemClickListener {
showInfoTextDialogWithClose(
requireContext(),
getString(R.string.dialog_querylog_information_title),
getString(R.string.dialog_querylog_information_message)
)
true
}
}
fun displayQueryDetailed(query:DnsQuery, switchToDetailView:Boolean = true) {
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="?attr/navDrawableColor"
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z" />
</vector>
......@@ -8,4 +8,10 @@
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="collapseActionView|ifRoom" />
<item
android:id="@+id/info"
android:icon="@drawable/ic_info_24dp"
android:title="@string/window_querylog_information"
app:showAsAction="ifRoom" />
</menu>
\ No newline at end of file
......@@ -210,4 +210,6 @@
<string name="dialog_latency_sidebar_title">Information about latency</string>
<string name="dialog_latency_sidebar_message">The latency shown here is not your ping or how fast your network is.\n It shows how long it takes for Nebulo to send a request and get an answer from the DNS server. The displayed value is not always the most current one and fluctuations can be possible.\n This can cause the value to be displayed higher than it is because it has become lower since it was measured.</string>
<string name="dialog_querylog_information_title">Information about query log</string>
<string name="dialog_querylog_information_message">This list shows you all past queries Nebulo logged while it was active. The list updates close to realtime when Nebulo is currently active.\n\nIcons at the start of the row indicate what happened with the query.\n\nFlag: The host was resolved from the DNS rules, or was blocked by the DNS server\nArrow: Nebulo forwarded the query to the DNS server\nDatabase: Nebulo retrieved the DNS response from the cache</string>
</resources>
......@@ -104,4 +104,6 @@
<string name="iptables_not_supported">Your device does not support iptables</string>
<string name="window_dnsrules_refresh_sources">Refresh to import rules from source</string>
<string name="window_querylog_information">Information</string>
</resources>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment