Commit graph

204 commits

Author SHA1 Message Date
Caleb Jasik
8a3f628bd7
dart format lib/ 2025-02-26 12:30:07 -06:00
Caleb Jasik
9d530a4529
Add CI for dart linting 2025-02-26 12:30:07 -06:00
Caleb Jasik
694176fe7a
dart fix --apply --code=annotate_overrides 2025-02-26 12:30:07 -06:00
Caleb Jasik
a065314b43
dart fix --apply --code=avoid_function_literals_in_foreach_calls 2025-02-26 12:30:07 -06:00
Caleb Jasik
f70c1902dc
dart fix --apply --code=curly_braces_in_flow_control_structures 2025-02-26 12:30:06 -06:00
Caleb Jasik
6d67a1b31d
dart fix --apply --code=no_leading_underscores_for_local_identifiers 2025-02-26 12:30:06 -06:00
Caleb Jasik
28eeaaf589
dart fix --apply --code=prefer_collection_literals 2025-02-26 12:30:06 -06:00
Caleb Jasik
cfa6c6c78e
dart fix --apply --code=prefer_const_constructors_in_immutables 2025-02-26 12:30:06 -06:00
Caleb Jasik
a0242f62fb
dart fix --apply --code=prefer_final_fields 2025-02-26 12:30:05 -06:00
Caleb Jasik
2db9bf2e14
dart fix --apply --code=prefer_interpolation_to_compose_strings 2025-02-26 12:30:05 -06:00
Caleb Jasik
de61b7f1bc
dart fix --apply --code=prefer_is_empty 2025-02-26 12:30:05 -06:00
Caleb Jasik
f38cda5ebf
dart fix --apply --code=prefer_typing_uninitialized_variables 2025-02-26 12:30:05 -06:00
Caleb Jasik
23b8bcef47
dart fix --apply --code=sized_box_for_whitespace 2025-02-26 12:30:05 -06:00
Caleb Jasik
6bca911429
dart fix --apply --code=sort_child_properties_last 2025-02-26 12:30:04 -06:00
Caleb Jasik
727340b2d5
dart fix --apply --code=unnecessary_new 2025-02-26 12:30:04 -06:00
Caleb Jasik
24b73b2c30
dart fix --apply --code=unnecessary_null_in_if_null_operators 2025-02-26 12:30:04 -06:00
Caleb Jasik
ed736cfca7
dart fix --apply --code=unnecessary_this 2025-02-26 12:30:04 -06:00
Caleb Jasik
be8370978d
dart fix --apply --code=use_full_hex_values_for_flutter_colors 2025-02-26 12:30:04 -06:00
Caleb Jasik
c88014caa2
dart fix --apply --code=use_function_type_syntax_for_parameters 2025-02-26 12:30:03 -06:00
Caleb Jasik
ca4f55ca93
dart fix --apply --code=use_key_in_widget_constructors 2025-02-26 12:30:03 -06:00
Caleb Jasik
7b0441aeeb
dart fix --apply --code=use_super_parameters 2025-02-26 12:30:03 -06:00
Caleb Jasik
903066436d
Fix unmarked deps, we aren't on web so we don't need a URL strategy 2025-02-26 12:30:03 -06:00
Caleb Jasik
95f217ece2
Enable flutter_lints linting 2025-02-26 12:30:02 -06:00
Ian VanSchooten
bcfcadec8e
Use material 3 page transitions [android] (#267)
The latest version of flutter (3.29, which we're already using) finally added a decent page transition matching up with the native material 3 transition. (main-api.flutter.dev/flutter/material/FadeForwardsPageTransitionsBuilder-class.html)

To test, fire up the app in android, and navigate around.
2025-02-25 11:42:58 -05:00
Caleb Jasik
330c8348fb
Enable Swift 6 feature flags (#258)
* Specify Swift Language Version 5

* Enable `GlobalConcurrency` swift feature flag

<945d93776c/proposals/0412-strict-concurrency-for-global-variables.md>

* Enable `InferSendableFromCaptures` swift feature flag 
<945d93776c/proposals/0418-inferring-sendable-for-methods.md (L4)>

* Enable `IsolatedDefaultValues` swift feature

<945d93776c/proposals/0411-isolated-default-values.md>

* Enable `ImplicitOpenExistentials` swift feature flag

<https://github.com/swiftlang/swift-evolution/blob/main/proposals/0352-implicit-open-existentials.md>

* Enable `DeprecateApplicationMain` swift feature flag

<945d93776c/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md>

* Enable `ForwardTrailingClosures` swift feature flag

<945d93776c/proposals/0286-forward-scan-trailing-closures.md>

* Enable `ConciseMagicFile` swift feature flag

<945d93776c/proposals/0274-magic-file.md>

* Enable `ImportOBJCForwardDeclarations` swift feature flag

<945d93776c/proposals/0384-importing-forward-declared-objc-interfaces-and-protocols.md>

* Enable `DisableOutwardActorInference` swift feature flag

<https://github.com/swiftlang/swift-evolution/blob/main/proposals/0401-remove-property-wrapper-isolation.md>

* Enable `ExistentialAny` swift feature flag

<945d93776c/proposals/0335-existential-any.md (L4)>

* Annotate existentials with `any` prefix keyword

<https://github.com/swiftlang/swift-evolution/blob/main/proposals/0335-existential-any.md>

* Enable `RegionBasedIsolation` swift feature flag

This adds two warnings to the build complaining about a sending closure.

<945d93776c/proposals/0414-region-based-isolation.md>
2025-02-25 10:35:12 -06:00
Ian VanSchooten
69b0a4dafa
Add safety to unbindService (#266) 2025-02-25 10:11:47 -05:00
Caleb Jasik
f6016f5da8
Git blame ignore PR 263 (#264) 2025-02-21 09:55:35 -06:00
Caleb Jasik
4621cbc000
Enable CI checking for Swift code formatting and format all swift code (#263) 2025-02-21 09:34:17 -06:00
Caleb Jasik
4d34083572
Use swift-format for Swift file formatting (#261) 2025-02-20 16:09:05 -06:00
Caleb Jasik
e128658599
Add formatting PR to .git-blame-ignore-revs (#255) 2025-02-13 15:54:20 -06:00
Caleb Jasik
ed348ab126
Flutter formatting changes (#252)
* `flutter fmt lib/`

* Re-enable formatting in CI
2025-02-13 15:37:44 -06:00
Caleb Jasik
b2ebe0289a
Upgrade to Flutter 3.29.0 (#251)
* Upgrade to Flutter 3.29.0

* Update cocoapods lock file

* Update .gitignore

* Add analysis_options.yaml to set line length default

* Bump required Dart to 3.7.0 as well

Restrict the dart version to max 3.6.0

* Disable formatting to allow merging with formatting that needs to happen
2025-02-13 14:48:44 -06:00
Caleb Jasik
f2c4b07154
Don't pop an error when there is no logs file (#245) 2025-02-05 13:05:50 -06:00
Caleb Jasik
d3e5291944
Fix padding for placeholder in ConfigTextItem (#243) 2025-02-05 10:03:47 -06:00
Caleb Jasik
961312a20a
Adjust vertical padding for config items (#244) 2025-01-31 14:17:09 -06:00
Caleb Jasik
f69f7cc9a3
Clean up SiteTunnelsScreen & Fix padding for the Checkbox config item (#239)
* Clean up SiteTunnelsScreen

* Adding padding to the checkmark in ConfigCheckboxItem
2025-01-29 16:08:08 -06:00
Caleb Jasik
af1c582984
Update the bottom app bar for the logs screen (#236) 2025-01-29 10:12:24 -06:00
Caleb Jasik
f3d22a83cf
Add padding to the ConfigItem children to prevent text from touching the edge (#237) 2025-01-29 10:11:48 -06:00
Caleb Jasik
126ed2f4b0
Add text wrap toggle to logs screen (#235)
* Add text wrap toggle to logs screen

* Use CupertinoButton.tinted on iOS instead of IconButton
2025-01-27 10:14:29 -06:00
Caleb Jasik
5afc1ef692
Add licenses page (#227)
* Add licenses page

* Use PlatformListTile

* Use platform-specific icons

* More style fixes

* Switch back to using SimplePage

* Make title widget const

* Remove unused imports
2025-01-24 13:37:28 -06:00
Ian VanSchooten
21d8265f42
Clean up enrollment screen (#234)
## Android

Blank form:
|Before|After|
|--|--|
|<img width="395" alt="image" src="https://github.com/user-attachments/assets/5c8a8e26-d030-4b14-b91a-9cbf5e1b2e50" />|<img width="393" alt="Android Studio 2025-01-24 11 34 32" src="https://github.com/user-attachments/assets/408c8003-9bc0-4e09-af58-44f5728dcb59" />|

Text entered:
|Before|After|
|--|--|
|<img width="397" alt="Arc 2025-01-24 11 47 19" src="https://github.com/user-attachments/assets/d5e8bc70-1786-488c-aa1c-c45ddf9a92de" />|<img width="393" alt="image" src="https://github.com/user-attachments/assets/5765e9c3-cf50-4913-b4d1-78780918f35d" />|

Submitted empty:
|Before|After|
|--|--|
|<img width="395" alt="image" src="https://github.com/user-attachments/assets/37b8b9c8-760f-479e-b39f-3502367567ec" />|<img width="397" alt="Android Studio 2025-01-24 11 34 47" src="https://github.com/user-attachments/assets/c381725e-f449-43de-961f-768205b60028" />|

Submitted invalid:
|Before|After|
|--|--|
|<img width="388" alt="image" src="https://github.com/user-attachments/assets/3a3859e1-eff7-4111-9dd0-15edbd3bb998" />|<img width="389" alt="image" src="https://github.com/user-attachments/assets/1ab811df-e3ff-4a1f-9d3d-a2869cbc1877" />|


Unchanged:
<img width="388" alt="image" src="https://github.com/user-attachments/assets/f2719677-a73f-435d-b3c6-a0a4fd64759b" />


## iOS


Blank form:
|Before|After|
|--|--|
|<img width="454" alt="image" src="https://github.com/user-attachments/assets/9afed9d1-c63b-4fcf-80a8-c2a9d2c18e76" />|<img width="454" alt="image" src="https://github.com/user-attachments/assets/c185b7f1-a2b3-4e9b-a49f-fb9790214c3a" />|

Text entered:
|Before|After|
|--|--|
|<img width="452" alt="image" src="https://github.com/user-attachments/assets/d3be265d-9076-4a19-865b-413dfad79ed4" />|<img width="466" alt="image" src="https://github.com/user-attachments/assets/c23e99eb-1001-4f80-b88f-62ffa8c8f7dd" />|


Submitted empty:
(note it says invalid before)
|Before|After|
|--|--|
|<img width="463" alt="image" src="https://github.com/user-attachments/assets/e26c0642-e6cc-4e97-885d-b0309e58ace6" />|<img width="455" alt="image" src="https://github.com/user-attachments/assets/95b8f975-41b5-48a0-b75a-9cb6a9acc50e" />|

Submitted invalid:
|Before|After|
|--|--|
|<img width="484" alt="image" src="https://github.com/user-attachments/assets/1daf3c2e-5fbb-477c-b0c7-66689170d97a" />|<img width="463" alt="image" src="https://github.com/user-attachments/assets/8bef248f-a607-4373-9e9e-6ff08f402b4a" />|
2025-01-24 14:22:40 -05:00
Caleb Jasik
382e2bbbf7
Add vertical padding to ConfigPageItem in case children wrap (#233) 2025-01-24 10:48:00 -06:00
Caleb Jasik
b41054920a
Migrate from colorScheme.background to colorScheme.surface (#229) 2025-01-24 09:51:21 -06:00
Ian VanSchooten
ad45cc1d78
Fix screen titles on iOS (#230)
TODO:
- [x] Address Android, which this probably breaks.

Previously the back button was taking up all the room in the title bar, this fixes it so that we can see titles again.  It also truncates site names so they stay to one line.

|Before|After|
|---|---|
|![image](https://github.com/user-attachments/assets/3e07a50d-fb40-40da-87f8-4d623019b26d)|![Simulator 2025-01-23 16 32 34](https://github.com/user-attachments/assets/ea668973-e67d-4fc5-8731-578e5f3fdd27)|


|Before|After|
|---|---|
|![image](https://github.com/user-attachments/assets/d95e1a9d-f431-42aa-a9f2-357b20c37abb)|![Simulator 2025-01-23 16 11 15](https://github.com/user-attachments/assets/ff3f664b-1983-4514-a492-cf585153e294)|

|Before|After|
|---|---|
|![image](https://github.com/user-attachments/assets/0ea3aa0d-340a-44db-8a0a-e0c8032c2450)|![image](https://github.com/user-attachments/assets/fb7e26c5-5c67-4dd7-808c-d471ca1e913e)|

|Before|After|
|---|---|
|![image](https://github.com/user-attachments/assets/bffec7e3-561d-4a43-ab8a-3bd1cc95003c)|![Simulator 2025-01-23 16 13 23](https://github.com/user-attachments/assets/288c1f7f-4d79-4b59-b693-0cbcdd2024db)|


A few other "After" screenshots:

|Logs|DN enrollment|
|---|---|
|![Simulator 2025-01-23 16 30 48](https://github.com/user-attachments/assets/4698939e-c4ad-4929-bd0b-1b72fc21c439)|![image](https://github.com/user-attachments/assets/4c738c41-af3c-4465-9907-76fce34ecdd9)|
2025-01-24 07:51:37 -05:00
Caleb Jasik
ae412cc407
Fix SimplePage background color variable (#232) 2025-01-23 16:55:28 -06:00
Caleb Jasik
91e6a4f6a2
Use platform-specific canvas color for SimplePage + platform-specific icons (#231)
* Use platform-specific canvas color for SimplePage

* Use platform-specific icon for MainScreen appbar
2025-01-23 16:25:59 -06:00
Caleb Jasik
fc120053f2
Upgrade Gradle and Android Gradle Plugin (#225) 2025-01-23 14:57:07 -06:00
Ian VanSchooten
5a641be96f
Switch to Material 3 for Android (#224)
This exploration updates the Android app to use Google's Material 3 design, and changes up the colors a bit in the process.  
I used a source color of #5D23DD in https://material-foundation.github.io/material-theme-builder/, which generates a full set of material colors that I imported into `lib/services/theme.dart`.  It should be easy to tweak any of the colors that we want, vs previously it was somewhat more difficult because they were being generated "behind the scenes".

This doesn't necessarily need to be done now, but it does align better with more modern Android design patterns and Flutter has said at some point they will stop supporting Material 2.  

Note: this should not have any impact on iOS, since we use the default `CupertinoThemeData` there, without any custom theming.

Here are some before/after comparisons of interesting screens:

Adding a new site:
|Dark Before|Dark After|Light Before|Light After|
|---|---|---|---
|<img width="390" alt="Android Studio 2025-01-22 10 43 55" src="https://github.com/user-attachments/assets/c7954b7f-a8eb-48a5-bd47-237877f078fd" />|<img width="405" alt="Android Studio 2025-01-22 11 16 48" src="https://github.com/user-attachments/assets/b69c1e6f-3464-44af-9f9c-f6377b5ce1d1" />|<img width="389" alt="image" src="https://github.com/user-attachments/assets/40f1e40f-a1f5-42e4-909c-c07b3f82df2b" />|<img width="393" alt="image" src="https://github.com/user-attachments/assets/09f8f8ce-668e-4e69-a4a9-233fb970655f" />|


Confirmation dialog:
|Before|After|
|---|---|
|<img width="264" alt="image" src="https://github.com/user-attachments/assets/7cae1abc-621d-4c59-bf36-0ce3be0af88c" />|<img width="278" alt="Android Studio 2025-01-22 11 43 19" src="https://github.com/user-attachments/assets/d461a97f-d252-494f-8b30-49d33a5a9cda" />|

Settings page:
|Dark Before|Dark After|Light Before|Light After|
|---|---|---|---|
|<img width="394" alt="Android Studio 2025-01-22 11 46 01" src="https://github.com/user-attachments/assets/edfc6c40-ee72-4a7c-b9b7-7c3025f0cdfe" />|<img width="393" alt="Android Studio 2025-01-22 11 46 35" src="https://github.com/user-attachments/assets/d1445041-bbc0-4994-98d5-3eb149afceea" />|<img width="391" alt="Android Studio 2025-01-22 11 46 09" src="https://github.com/user-attachments/assets/295e5cc4-74e2-422a-b478-a3e0bd577b60" />|<img width="391" alt="Android Studio 2025-01-22 11 46 28" src="https://github.com/user-attachments/assets/098339de-f2df-4269-84cf-e3ae2c09a51d" />|

Site with errors:
|Dark Before|Dark After|Light Before|Light After|
|---|---|---|---|
|<img width="395" alt="Android Studio 2025-01-22 11 48 50" src="https://github.com/user-attachments/assets/4f8dd05d-ccc7-44eb-96e0-ffec63975085" />|<img width="390" alt="Android Studio 2025-01-22 11 48 06" src="https://github.com/user-attachments/assets/751f35e2-b801-4ddf-9655-15f0097e05ca" />|<img width="395" alt="image" src="https://github.com/user-attachments/assets/15ac20c9-4d40-4e51-aed6-fd69a001588b" />|<img width="388" alt="Android Studio 2025-01-22 11 48 20" src="https://github.com/user-attachments/assets/780bf849-9add-4f91-bac8-3cdd5fd89337" />|

Main page / site list:
|Light Before|Light After|Light Scrolled Before|Light Scrolled After|
|---|---|---|---|
|<img width="387" alt="Android Studio 2025-01-22 11 53 07" src="https://github.com/user-attachments/assets/ca426470-00c2-4dc3-bd22-4a336c4ec8cf" />|<img width="403" alt="Android Studio 2025-01-22 11 53 41" src="https://github.com/user-attachments/assets/abf755e3-df10-453b-a439-0aa3b21b7ef9" />|<img width="389" alt="Android Studio 2025-01-22 11 53 22" src="https://github.com/user-attachments/assets/a6cdfabf-5288-49fe-ac29-e73678d34ccb" />|<img width="396" alt="Android Studio 2025-01-22 11 53 51" src="https://github.com/user-attachments/assets/11eda1f4-cf2f-4848-9690-6093223a9e7e" />|

Certificate:
|Dark Before|Dark After|Light Before|Light After|
|---|---|---|---|
|<img width="388" alt="Android Studio 2025-01-22 11 57 25" src="https://github.com/user-attachments/assets/5a1db1ba-a560-4aa6-8649-9b41d9ba25b6" />|<img width="390" alt="Android Studio 2025-01-22 11 56 44" src="https://github.com/user-attachments/assets/5e1b9200-ea13-42e5-a55d-51a1fda4522f" />|<img width="397" alt="Android Studio 2025-01-22 11 57 01" src="https://github.com/user-attachments/assets/65c52218-3f90-40c7-bb21-e499c2e0b08c" />|<img width="392" alt="Android Studio 2025-01-22 11 56 21" src="https://github.com/user-attachments/assets/554847cd-e825-4691-ac21-1549ab5e7d21" />|
2025-01-23 10:49:32 -05:00
Caleb Jasik
f290a71b94
Remove unused imports (#223) 2025-01-22 13:50:50 -06:00
Ian VanSchooten
87c16ea95c
Fix iOS 16 support (#222)
In older versions of iOS, it's not possible to call `NETunnelProviderManager.loadAllFromPreferences()` from inside the network extension process.  We were seeing `NETunnelProviderManager objects cannot be instantiated from NEProvider processes` errors in iOS 16.  It's unclear exactly when the change happened to allow it, but as far as we can tell it was in iOS 17. 

To Test:
1. On a real device running iOS 16, ensure that enrolling as a Managed Nebula host works correctly.
2. Start the site.
3. Update the host in the admin panel and wait at least 15 minutes for a `checkForUpdate` from the mobile client.  You should get a `Host renewed` audit log for the host.  
4. Verify that there's a log for "Reloading Nebula" in the mobile host, and that it has an up-to-date config.
2025-01-17 12:31:13 -05:00