Commit Graph

13 Commits (be6364ca95bb20ee4e7895486e392c1d1cf036b0)

Author SHA1 Message Date
Jonathan Nobels be6364ca95
android/ui: handle NeedsMachineAuth state (#317)
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
Percy Wegmann 9054264363 android/ui: sort self peer first in list of peers
Closes tailscale/corp#19111

Signed-off-by: Percy Wegmann <percy@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 6e503f29a9 android/ui: implement design feedback
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
2 months ago
Jonathan Nobels 67a9320d26
android/ui: hide mullvad exit nodes in peer list (#263)
Updates tailscale/corp#18202

hides the mullvad nodes (basesd on their Name) in the peers list.  This differs slightly from the iOS logic where we use the Location property, but it feels like a better approach since Location is optional in the HostInfo and may not always be present.

Signed-off-by: Jonathan Nobels <jonathan@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
Percy Wegmann e568741081 android: make ExitNodePickerViewModel reactive
Updates tailscale/corp#18202

Signed-off-by: Percy Wegmann <percy@tailscale.com>
3 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
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
James Tucker 87a8003d39 *: add a CI check for license headers and fix all files
Updates tailscale/tailscale#10992

Signed-off-by: James Tucker <james@tailscale.com>
3 months ago
Jonathan Nobels 4f46c38c99
Jonathan/notifier (#179)
android: add notifier support a data model and compose dependencies

fixes ENG-2084
fixes ENG-2086

Adds support for the ipnBusWatcher directly via a JNI API rather than HTTP via LocalAPIClient

Adds a rudimentary controller class and a model from which we can construct ViewModels

Cleans up some of the JNI bindings.  Adds hooks for ensuring the JNI setup is complete before attempting to do LocalAPIClient things.

Cleans up some wildcard imports.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
Signed-off-by: Percy Wegmann <percy@tailscale.com>
Co-authored-by: Percy Wegmann <percy@tailscale.com>
3 months ago
Jonathan Nobels bb7ea7cf9f
android: add kotlin dependencies build the kotlin->go localAPIClient (#173)
updates ENG-2805

Adds all of the kotlin build dependencies and a partial implementation of a LocalAPIClient in the front end, wired up via JNI.  The general idea here is to mimic the architecture used on other Tailscale clients, where the front ends largely interact with the backend via "localapi".

The LocalAPIClient in go has been renamed to LocalAPIService to avoid confusion with the implementation on the future client side in Kotlin.  Some mild refactoring was done to make the localAPI invocations methods on the api service instead of App.

Streaming notifier endpoints like watch-ipn-bus are not supported.  We will build out a separate set of JNI methods for dealing with those.

The jni package is moved under cmd where it is used.

This constains mostly-complete implementation of the required localAPI data classes based on the pieces that are used by the iOS and macOS clients.  The LocalAPIClient itself does not implement all of the endpoints, but is ready to do so when those APIs are needed by a UI component.

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