aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/main (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* ui: use ErrorMessages consistentlyJason A. Donenfeld2023-04-042-2/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: do not crash if tunnel preparation failsJason A. Donenfeld2023-04-042-6/+15
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: do not OOM when leaving log window open for a whileJason A. Donenfeld2023-04-041-14/+39
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: show bottom sheet sync to prevent double addJason A. Donenfeld2023-04-041-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: do not return to detail page when restoring stateJason A. Donenfeld2023-04-041-4/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: never access CREATOR directlyJason A. Donenfeld2023-04-041-4/+13
| | | | | | | | All of the parcelers have their own type prefix. So we have to actually use the legit methods. This is a bit annoying, as there's no fully compatible way across all API versions, so we have to branch. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: never throw on link clicksJason A. Donenfeld2023-04-042-4/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: don't play with status and navigation colors on old APIsJason A. Donenfeld2023-03-303-5/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: do not allow double clicking fab to show menu twiceJason A. Donenfeld2023-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | Exception java.lang.IllegalStateException: at androidx.fragment.app.FragmentStore.addFragment (FragmentStore.java:92) at androidx.fragment.app.FragmentManager.addFragment (FragmentManager.java:1481) at androidx.fragment.app.BackStackRecord.executeOps (BackStackRecord.java:387) at androidx.fragment.app.FragmentManager.executeOps (FragmentManager.java:1965) at androidx.fragment.app.FragmentManager.executeOpsTogether (FragmentManager.java:1873) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute (FragmentManager.java:1823) at androidx.fragment.app.FragmentManager.execPendingActions (FragmentManager.java:1760) at androidx.fragment.app.FragmentManager$5.run (FragmentManager.java:547) at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:268) at android.app.ActivityThread.main (ActivityThread.java:8101) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:627) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:997) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: remove unneeded @JvmStatic annotationsJason A. Donenfeld2023-03-303-8/+1
| | | | | | | These are only needed on methods called from databindings, since those compile to java. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: add list selection highlight color for tabletJason A. Donenfeld2023-03-301-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: the button is not always blue with Material YouJason A. Donenfeld2023-03-3028-28/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: use app resources instead of ctx for strings in callbackJason A. Donenfeld2023-03-301-1/+1
| | | | | | | | | | | | | | | | | Exception java.lang.IllegalStateException: at androidx.fragment.app.Fragment.requireContext (Fragment.java:967) at com.wireguard.android.fragment.TunnelListFragment$tunnelFileImportResultLauncher$1$1.invokeSuspend (TunnelListFragment.kt:64) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104) at android.os.Handler.handleCallback (Handler.java:761) at android.os.Handler.dispatchMessage (Handler.java:98) at android.os.Looper.loop (Looper.java:156) at android.app.ActivityThread.main (ActivityThread.java:6617) at java.lang.reflect.Method.invoke at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: use M3 theme for TV to prevent crashJason A. Donenfeld2023-03-302-3/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* strings: sync crowdinJason A. Donenfeld2023-03-282-2/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: add log items in buffered batchesJason A. Donenfeld2023-03-281-23/+34
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: color verbose logs the same as debug logsJason A. Donenfeld2023-03-281-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: don't call getColor on already resolved attributeJason A. Donenfeld2023-03-281-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: bring back dark log viewer colorsJason A. Donenfeld2023-03-283-6/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: fix inconsistent style namingHarsh Shandilya2023-03-281-2/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: adjust log viewer text sizesHarsh Shandilya2023-03-281-1/+0
| | | | | | 10sp is below the minimum 11sp recommended for readability Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: use M3 styles everywhereHarsh Shandilya2023-03-2814-52/+40
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: add possibility for themed iconJason A. Donenfeld2023-03-272-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: add list selection backgroundsJason A. Donenfeld2023-03-275-3/+4
| | | | | | | Harsh - feel free to replace this commit with something better. I'm sure it's the most terrible way to do it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: cancel actionmode when pressing back buttonJason A. Donenfeld2023-03-271-0/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: simplify actionmode castJason A. Donenfeld2023-03-271-3/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: introduce a fresh set of Material3 themes and migrate to themHarsh Shandilya2023-03-2715-111/+147
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: use AndroidX `BundleCompat` for extracting parcelableHarsh Shandilya2023-03-271-6/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: switch from SwitchMaterial to MaterialSwitchJason A. Donenfeld2023-03-253-6/+7
| | | | | | | | | | This required some weird changes to prevent clipping on the top, because apparently the new switch is a bit fatter. I think this actually looks a bit uglier than before, but it seems like that's what Material design wants. Maybe we can improve it? Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: bring back donation buttonJason A. Donenfeld2023-03-243-0/+43
| | | | | | | | | For Google Play Store builds, we'll display an alert box. This was inspired by the discussion around StreetComplete; hopefully we'll have a similar okay outcome. Link: https://github.com/streetcomplete/streetcomplete/issues/3768 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* strings: update from crowdinJason A. Donenfeld2023-03-2433-180/+1543
| | | | | | This is after doing a rebuild on the crowdin side. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: fix inconsistent toolbar colorHarsh Shandilya2023-03-241-0/+5
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: use Material switch componentHarsh Shandilya2023-03-241-2/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: migrate to OnBackPressedDispatcherJason A. Donenfeld2023-03-243-10/+28
| | | | | | | This is compatible with Android 13's prediction-based back gesture animation. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: set selected tunnel after creating fragmentsJason A. Donenfeld2023-03-241-8/+3
| | | | | | | | | | I'm not sure why that comment (Samuel's) was there saying it was necessary. Given it's been async for a long while, this wasn't guaranteed anyway. So let's get rid of it and see what happens. Screen rotation seems fine thus far. Cc: Samuel Holland <samuel@sholland.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: switch from using launchWhenCreated to using repeatOnLifecycleJason A. Donenfeld2023-03-241-1/+8
| | | | | | Apparently the former is deprecated. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: simplify IME displaying in ConfigNamingDialogFragmentJason A. Donenfeld2023-03-242-45/+8
| | | | | | Also cleanup some event listener flow. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui: migrate to MenuProviderHarsh Shandilya2023-03-222-13/+26
| | | | | | | AndroidX Activity 1.4.0 introduced the new lifecycle-dependent MenuProvider APIs that supersede existing onCreateOptionsMenu-style menus. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: address Parcelable API deprecationsHarsh Shandilya2023-03-222-2/+8
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: address PackageManager API deprecationsHarsh Shandilya2023-03-221-1/+14
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: set button text after loading app list in AppListDialogFragmentJason A. Donenfeld2023-03-221-0/+1
| | | | | | | Otherwise, for lots of apps, the dialog shows before they're enumerated, and the button text never gets set. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* strings: sync with crowdinJason A. Donenfeld2023-03-2125-89/+95
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyright dateJason A. Donenfeld2023-03-2158-58/+58
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* gradle: adjust for and raise compileSdk to 33SlipkHunter2023-01-201-6/+13
| | | | | Signed-off-by: SlipkHunter <abrito025@gmail.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* gradle: migrate to namespace attributeHarsh Shandilya2023-01-201-1/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: add barrier to fix detail fragment overlapSlipkHunter2022-07-071-7/+10
| | | | | | | When listen port and MTU are hidden, we need a barrier here. Signed-off-by: SlipkHunter <abrito025@gmail.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: reorder constraints to fix detail fragment overlapHarsh Shandilya2022-05-261-3/+7
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: move default style to Material3 with Dynamic ColorsHarsh Shandilya2022-05-265-22/+23
| | | | | | | The TV theme has been kept as-is since Material You guidance around this is a bit scarce at the moment. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: normalise icon tints and remove unused drawableHarsh Shandilya2022-05-2613-23/+25
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ui: remove unnecessary boolean checkHarsh Shandilya2022-05-261-3/+1
| | | | | | | | | This check was added in 3c31c340d86f when the kernel module loader was introduced into the app lifecycle, to avoid attempting to start a root shell twice. When the module loader was removed in a03ad51622d338d1c, this flag was accidentally left in when it should have been deleted. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>