Commit Graph

39 Commits (1a822a27bd85e3a8415dbc07ed2b48e75af82e8f)

Author SHA1 Message Date
Jonathan Nobels 1a822a27bd android/ui: handle NeedsMachineAuth state
Fixes tailscale/corp#19119

Adds a variation on the ConnectView to render a header and explainer
text for the NeedsMachineAuth state.  A button to take you directly
to the admin page is presented if you are an admin.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Andrea Gottardo 164a243b77
ui: reintroduce dark mode theme (#315) 2 months ago
Percy Wegmann d396fdab27 android/ui: more UI tweaks
1. Add title to internal debug options

Updates tailscale/corp#19045

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
kari-ts c8d1b30918
ui: show 'No results' when search returns empty (#309)
Updates tailscale/corp#18202

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Jonathan Nobels 32e407d06b
android/tv: reduce layout width and fix navigation (#295)
fixes tailscale/corp#18956
fixes tailscale/corp#18964

Adds a letterboxing effect as a temporary measure to make the UI a bit more usable on AndroidTV.
Fixes a few navigation peculiarities specific to TV (notably, there some padding on the user avatar so you can see when it's highlighted)
Pops a QR code on AndroidTV where we have no browser to complete the flow.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Percy Wegmann c0ffd5016b android/ui: DNS and other styling tweaks
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann c3dac5954e android/ui: permissions styling feedback
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Jonathan Nobels 31939cc855
android/ui: change exit node disable string to 'stop' (#281)
Updates tailscale/corp#18202

Updates the exit node stop button to 'stop' instead of 'disable' pending the required back end changes to remember the preferred exit node.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Jonathan Nobels 3b21a06c8b
android/ui: add key expiry banner (#276)
fixes ENG-2912

copies and adds the a key expiry banner identical to the one on iOS.

fixes a couple of small layout issues with the search bar

fixes a potential json issue where ComputedName is optional in goland but it was not marked as so in Kotlin.  Switched to node.displayName everywhere, which uses ComputedName otherwise, Name.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Percy Wegmann 1719d5d558 android/ui: auto-resize tailnet name to fit space
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann d332ce049e android/ui: more styling tweaks
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann 91c1a8d0f3 android/ui: distinguish Tailnet domains in user view
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Jonathan Nobels e9465988dd
android/ui: restyle the search bar (#272)
Updates tailscale/corp#18202

restyles the search bar to look a little more iOS like.  switch to a normal text field which gives us much more flexibility over the look and all of the flexbiility of SearchBar.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Percy Wegmann 6e503f29a9 android/ui: implement design feedback
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann e024c896c1 android/ui: display correct flag on exit node picker
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
kari-ts af2e33d130
MainView, strings: show toggle when logged out (#257)
Fix logged out strings

Updates tailscale/corp#18202

Signed-off-by: kari-ts <kari@tailscale.com>
2 months ago
Jonathan Nobels e59112a8fb
android/ui: implement outgoing taildrop support (#242)
* android/ui: implement outgoing taildrop support

Updates tailscale/corp#18202

Adds share activity to handle outgoing taildrop requests.

This unbreaks the WaitingFiles notification for incoming files, but does not yet properly handle them.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android/ui: add transfer ID to outgoing file transfers (#245)

Helps track status of transfers.

Updates #ENG-2868

Signed-off-by: Percy Wegmann <percy@tailscale.com>

* android/ui: taildrop string change

Updates tailscale/corp#18202

Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
Signed-off-by: Jonathan Nobels <jnobels@gmail.com>

* android: bumping oss to pick up new taildrop support

Updates tailscale/corp#18202

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: remove write storage permission check

Updates tailscale/corp#18202

This is not required and the jni callback does't actually do what we need in the new client.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Signed-off-by: Percy Wegmann <percy@tailscale.com>
Signed-off-by: Jonathan Nobels <jnobels@gmail.com>
Co-authored-by: Percy Wegmann <percy@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
2 months ago
Percy Wegmann 44ba20a24e android/ui: prompt for permissions and show list of permissions with statuses
Updates #ENG-2948

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann 9f3e871637 android/ui: prompt for write external storage permission and show error if necessary
Updates #ENG-2948

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann cf6a203f7a android/ui: change click target for exit node picker
This makes sure only the relevant UI control flashes on click

Updates #cleanup

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann fb5635b8a5 android: style exit node picker per Material UI and add disable button
Updates #ENG-2911

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Andrea Gottardo 3fea68ef2e
android/ui: add game of life to show progress when connecting (ENG-2860) (#244)
Fixes ENG-2860

Adds a game of life animation with the Tailscale logo when launching the app and waiting for the VPN tunnel to be established.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Andrea Gottardo bf74edd551
android: add ExitNodeAllowLANAccess toggle in exit node picker (#241)
Updates ENG-3011

Just like on iOS, we should show a switch to toggle the ExitNodeAllowLANAccess preference.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Percy Wegmann a15fdd44bf android: show login button when state == Ipn.State.NeedsLogin
Closes #ENG-2988

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Andrea Gottardo f96e9b923f
android: add Tailnet lock setup UI (#231)
Updates ENG-2981

Adds a view to see the Tailnet lock settings and copy node key and public key, resembling the iOS and macOS ones.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
Jonathan Nobels e953b19189
android/ui: address preliminary design feedback
Updates tailscale/corp#18202

Adds back navigation to all of the headers.
Corrects all padding and some colours
Adds separators to the device list
Adds the Compat theme so we don't have the black top and bottom bars.
Removes all of the chevrons.
Other minor tweaks

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
James Tucker 5454b34dd1 Revert "[568eb59] android/ui: address preliminary design feedback (#227)"
This reverts commit 910511d838.

Signed-off-by: James Tucker <james@tailscale.com>
2 months ago
Jonathan Nobels 910511d838
[568eb59] android/ui: address preliminary design feedback (#227)
Updates tailscale/corp#18202

Adds back navigation to all of the headers.
Corrects all padding and some colours
Adds separators to the device list
Adds the Compat theme so we don't have the black top and bottom bars.
Removes all of the chevrons.
Other minor tweaks

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: James Tucker <james@tailscale.com>
2 months ago
Jonathan Nobels 113a7c6f9d
android: use ktfmt formatting and use scaffold consistently across all views (#217)
* android: use scaffold consistently across all views

Updates tailscale/corp#18202

Updates all the main view to remove the surface containers and replaces them with a Scaffold.  All view now use a common Header element (a TopAppBar with common styling).

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: run ktfmt over all kt, java and xml source files

Updates tailscale/corp#18202

Standardize code formatting using ktfmt default settings.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: update readme for new code formatting guidelines

Updates tailscale/corp#18202

Mandate the use of ktfmt in the default configuration.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Jonathan Nobels e4b0e1f8cd
android: implement fast user switching (#209)
Updates tailscale/corp#18202
Updates ENG-2875
Fixes ENG-2863

Adds everything we need to do fast user switching and support multiple accounts.

Some work here to make the settings rows and a few other composables common and reusable.

Correct the focus and clear behavior on the search bar and corrected the connected in state of SelfNode.

Quick fix for requesting VPN permissions on newer Android phones.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2 months ago
Percy Wegmann a1e67ff1e9 android: ViewModel cleanup
- Replace IpnManager, IpnModel and PrefsEditor with IpnViewModel
- Use lazy StateFlows in Notifier
- Manage view model lifecycles using viewModel() function
- Stop watching IPN bus when MainActivity stops
- Pass IPN notifications as ByteArray instead of string

Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Percy Wegmann 9a6aecb454 android: implement exit node picker
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
3 months ago
Andrea Gottardo 06e850bbd5
ui: assorted UI tweaks + disconnected view (#203) 3 months ago
Jonathan Nobels 4df18951a6
android/ui: fix time formatting strings and main view states (#204)
* android: fix time display localizations and show magic dns name

Updates tailscale/corp#18202

Localizations and some simplifications of the "in x time" conversion strings for node expiry.

We'll also now render the magicDNS name in the list of addresses.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: move the composablestringformatter to it's own file

Updates tailscale/corp#18202

This class deserves it's own file and some documentation

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: show selfNode as connected only when it is connected

Updates tailscale/corp#18202

The selfNode connected state is now properly shown in the nodes list now that we're showing the nodes even when you're not connected to your tailnet.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Jonathan Nobels 2c694b7159 android: optimize peer search
Updates tailscale/corp#18202

Switch to LazyColumn so we're not redrawing the entire list.

Modify the search logic so we're searching progressively and doing all of the sorting and categorization up front on netmap changes.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Jonathan Nobels 16ec19757d
android: adds support for user avatars and some general cleanup (#202)
* android: show user avatars and styling fixes

Updates tailscale/corp#18202
fixes ENG-2852

Load and show the user avatar in the right places.  There's a universal Avatar composable for this that should work everywhere we need it.  This  uses the coil-compose lib which seems to be standard practice and will handle caching for us.

Restyles a few headers to match the about screen and corrects some layout issues with the height of columns.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: add localizations and view model cleanup to match IPNManager

Updates tailscale/corp#18202

Simplifies the view models a bit for readability and localizes a few things that weren't previously localized

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: fix peer categorization

Updates tailscale/corp#18202

Fixes a null predicate issue for searching and removes the self nodes if there are no matches.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

* android: rename avatar loader to avatar and add header

Updates tailscale/corp#18202

Rename the AvatarLoader class to Avatar and move it to views.  Add the proper headers.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
3 months ago
Jonathan Nobels 94a4f55eb2
android: implement the bug reporting and about screen and localize (#198)
updates tailscale/corp#18202
fixes ENG-2876

Adds the bug reporting view.  Functional, but not properly styled.

Moves the various link URLs to a constants file and corrects link-opening in both but reporting and the settings screen.

Adds an AboutView with app icon and same content as the iOS version.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
3 months ago
Jonathan Nobels bf0e56469f
android: Add settings screen (#196)
updates tailscale/corp#18202
updates ENG-2854

Adds a basic settings screen.  This isn't correctly localized, but that's on the way.

Adds the required hooks to edit prefs via localAPI.

Adds basic but incomplete login/logout flow.

Fixes the sorting of nodes on the main screen and fixes the proper display of your current node details.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago
Jonathan Nobels 3926cf4b56
android: add main screen device details and basic nav (#191)
updates tailscale/corp#18202
updates ENG-2835
updates ENG-2859

Adds the peer details view and some supporting utilities. Eliminates all of the singletons.

None of this is styled correctly, but the layouts match iOS.

Signed-off-by: Jonathan Nobels jonathan@tailscale.com

---------

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
3 months ago