summaryrefslogtreecommitdiffhomepage
path: root/ui
AgeCommit message (Collapse)Author
2021-02-12tunnel: report git commit as wgVersionJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-01-23strings: sync translationsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-01-01ClipboardUtils: localize clipboard notification snackJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-12-21strings: sync with crowdinJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-16ui: show all apps with internet permission in exclusions listHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-11-10ui: test for any camera, not just rear oneJason A. Donenfeld
Some folks use chromebooks, which don't have rear cameras. Reported-by: Jay Tuley <jay.tuley@ekonbenefits.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-07strings: sync translationsHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-10-14build: add crowdin syncer script and use itJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-10-05build: update to mdc 1.3.0-alpha03Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-10-02DownloadsFileSaver: initialize callback in constructor, not on the flyJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-10-02build: upgrade AndroidX biometricJason A. Donenfeld
The BiometricConstants class was removed and these were folded into BiometricPrompt. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-30ui: use commit extension from fragment-ktxHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-30ui: account for binding disappearing on detail fragmentJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-27tv: hack gridlayoutmanager to fill columns before row if we're not scrollingJason A. Donenfeld
If we're horizontally scrolling, it makes sense to fill rows before columns. But if it all fits in one page and we don't need to scroll horizontally, it looks ridiculous. So, in this case, rearrange the tiles so that it appears to fill columns before rows. But we don't want things suddenly jumping around, so actually, keep the same ordering as rows-before-columns, but add invisible spaces after certain items, so that the fill area makes it look as though it's columns-before-rows. This winds up being much more visually pleasing. We do this by figuring out this kind of transformation: If we convert this matrix: 0 3 6 1 4 _ 2 5 _ To this one: 0 2 4 6 1 3 5 _ _ _ _ _ For a given index, how many spaces are under it? This changes depending on how many total are in a grid. Going from 3x3 to 4x3, for example, we have: count == 12, index = count == 11, index = 10 count == 10, index = 7,9 count == 9, index = 4,6,8 count == 8, index = 1,3,5,7 count == 7, index = 1,3,5,6! count == 6, index = 1,3,4!,5! count == 5, index = 1,2!,3!,4! count == 4, index = 0!,1!,2!,3! count == 3, index = 0!,1!,2! count == 2, index = 0!,1! count == 1, index = 0! count == 0, index = The '!' means two blanks below, no '!' means one blank below, and no mention means no blanks below. This commit adds code to compute such a table on the fly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-26ui: queue up tunnel mutating on activity scope instead of fragment scopeJason A. Donenfeld
Fragment scopes get cancelled when the fragment goes away, but we don't actually want to cancel an in-flight transition in that case. Also, before when the fragment would cancel, there'd be an exception, and the exception handler would call Fragment::getString, which in turn called requireContext, which caused an exception. Work around this by using the `activity ?: Application.get()` idiom to always have a context for strings and toasts. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-26ui: print proper exception trace from log viewerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-26ui: request intent permissions from hidden activityJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-24tv: handle going up directories betterJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-24tv: show volume descriptions for file pickerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-24ui: account for null data in callbackJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-23ui: cleanup code after churnJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-23tv: use system picker for API 29+Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-23tv: use our own file pickerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-23tv: escape deletion view with back buttonJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: select first item after toggling deletion modeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: hook up isFocused as observable propertyJason A. Donenfeld
This is kind of ridiculous, since the items own state should clearly be queryable, but it doesn't appear to be the case here, so just shuffle it around into kotlin and back. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: add text when there are no tunnelsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: make cards slightly smallerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: select the right thing on loadJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: tweak TV layout to fit 3 rows betterHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-22tv: set layout manager from XMLHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-22tv: make logo almost betterJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: anchor RV bottom to top of delete buttonHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-22tv: remove useless attributeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: use plus instead of text for importingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: do themingHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-22tv: account for broken TVs with no file pickerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: remove tiny words from tv bannerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: do not redisplay stats when deletingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: add tv bannerJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: use proper icon for buttonJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: hide deletion button when nothing to deleteJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: add ugly deletion modeJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: wire in statsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: wire up tunnel start/stopJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: begin to wire up databindingsJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: abstract out tunnel importingJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-22tv: initial draft of Android TV supportHarsh Shandilya
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-09-21TunnelManager: catch exception in intent receiverJason A. Donenfeld
java.lang.IllegalStateException: at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1720) at android.app.ContextImpl.startService (ContextImpl.java:1675) at android.content.ContextWrapper.startService (ContextWrapper.java:669) at com.wireguard.android.backend.GoBackend.startVpnService (GoBackend.java:4) at com.wireguard.android.backend.GoBackend.setStateInternal (GoBackend.java:4) at com.wireguard.android.backend.GoBackend.setState (GoBackend.java:2) at com.wireguard.android.model.TunnelManager$setTunnelState$2$1.invokeSuspend (TunnelManager.java:6) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:2) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:2) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:7) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:7) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:7) Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-09-20TunnelEditorFragment: do not assume a contextJason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>