Commit Graph

34 Commits

Author SHA1 Message Date
Davide De Rosa 98e5e4cdde
Share common protocols across localized strings (#324) 2023-07-05 17:18:33 +02:00
Davide De Rosa bd6340ce77
Split reusable views into extensions (#322)
Like in #321
2023-07-03 17:37:16 +02:00
Davide De Rosa 7198150f00
Refactor alerts to use latest API (#320) 2023-07-03 16:41:49 +02:00
Davide De Rosa 278efaf347
Refactor domain errors (#310) 2023-07-02 12:51:50 +02:00
Davide De Rosa ddab76326d
Replace deprecated .windows with .connectedScenes (#316) 2023-06-17 21:40:09 +02:00
Davide De Rosa 36cad41529
Fix IPv4/6 address validation (#308) 2023-05-27 21:34:31 +02:00
Davide De Rosa 7ccb10febc
Rethink library architecture (#301) 2023-05-24 18:19:47 +02:00
Davide De Rosa b4ad8dea0d Do some code clean up
- Use guard in validators

- Rename URL.openURL() to URL.open()

- Sort imports (SwiftLint)

- Drop unused VPNProtocolType.allTypes

- Drop unused imports
2023-05-21 11:48:03 +02:00
Davide De Rosa 1051a8dc52
Revisit domain name validators (#297)
- Allow TLDs longer than 6 characters

- Allow wildcards in proxy bypass domains
2023-05-01 11:44:41 +02:00
Davide De Rosa e3cfdadf97
Cover screen on .inactive (#282)
* Make unlock block actor-safe

* Cover views on .inactive, lock on .background
2023-04-05 16:31:17 +02:00
Davide De Rosa 33e0ceec04
Lock in background (#275)
There are plenty of situations where the app kind of stays in the
foreground, but goes to .inactive state. Lock screen could be
annoying in those cases.
2023-03-31 23:47:29 +02:00
Davide De Rosa 1e0d522010
Drop #available condition on iOS 15 (#274) 2023-03-25 17:05:53 +01:00
Davide De Rosa 6af4bb7e0f
Resolve issues with lock screen (#273)
* Make lock screen a View extension

- Reuse in global theme (apply to all modals)

- Use a ZStack rather than replace (retain content/navigation)

- Share lock state across all LockableView
2023-03-25 16:47:08 +01:00
Davide De Rosa 5f991d9cc2
Unlock app with biometrics (#271)
* Prevent app lock completely in macOS

* Add missing Face ID metadata for biometrics auth

* Ensure MainActor

* Reword option

* Fix lock logic on launch
2023-03-20 14:12:42 +01:00
Davide De Rosa 325e10845d
Option to lock app when entering background (#270) 2023-03-20 11:00:01 +01:00
Davide De Rosa 513b38584d
Upgrade SwiftLint to CI version (#266) 2023-03-19 16:10:40 +01:00
Davide De Rosa fbd32d8b26
Fine-tune SwiftLint (#265) 2023-03-19 14:41:53 +01:00
Davide De Rosa f06f097f27
Add SwiftLint phase (#262) 2023-03-17 21:55:47 +01:00
Davide De Rosa 37354d1b87 Update copyright 2023-03-17 16:56:19 +01:00
Davide De Rosa 5627e6c4a9
Address UI race conditions (#229)
* Make some managers concurrency-safe

- IntentsManager: @MainActor, non-shared, continuation

- SSIDReader: @MainActor, continuation

- Reviewer: main queue, non-shared

* Review wrong use of Concurrency framework

There were background thread calls e.g. in VPNToggle, because
ProfileManager was used inside a VPNManager async call.

Annotate @MainActor wherever a Task involves UI.

* Make main managers MainActor

* Apply MainActor to Mac menus

* [ci skip] Update CHANGELOG

* Set MainActor consistently on Mac menu view models
2022-10-13 08:53:50 +02:00
Davide De Rosa 092d4f5de2 Drop return in one-line functions 2022-09-04 20:30:55 +02:00
Davide De Rosa 9a8477225e Refactor library into domain + impl 2022-06-23 23:31:01 +02:00
Davide De Rosa 8504998bbb Reorganize app-specific shared code into AppShared 2022-06-19 14:41:26 +02:00
Davide De Rosa c88dfc28c4 Simplify a few things of CopySavingButton
- Make saving handler more readable

- Drop unnecessary protocol
2022-05-18 14:10:11 +02:00
Davide De Rosa ddce671c62 Move theme extensions to non-reusable 2022-05-18 11:33:29 +02:00
Davide De Rosa 0047d095fb Adjust navigation style to all devices
- Mac
    - Drop all styles
    - Tweak hide title bar
    - Hide navigation bar

- Restore single section for all profiles
    - Allows using NavigationLink safely
    - Indirectly fixes multitasking
    - Retains selection on profile activation
    - Clean up presentActiveProfile

- Leave active profile in its position
    - Fixes Mac flashing row selection on profile activation

- Unify profile row appearance
    - Use fixed .headline font
    - Add subtitles to inactive profiles
    - Use padding rather than fixed row height

CAVEATS:

- Do not preselect active profile on iPad launch, as doing so
seems to present two ProfileView on top of each other, one from
MainView and one from the NavigationLink.

- Do not touch .listStyle() of master view, as it seems to break
navigation esp. in iPad multitasking.
2022-04-29 19:29:47 +02:00
Davide De Rosa 4b8cff1bb3 Disable padding around LongContentView
It should actually be an inset. Do it later.
2022-04-26 21:39:21 +02:00
Davide De Rosa 5c0e053e7d Review requirements of DNS over TLS (DoT)
- Make DNS servers optional in TunnelKit

- Allow IP address as DoT server name
2022-04-25 22:40:09 +02:00
Davide De Rosa 6434008ebd Make destructive buttons standalone
- Uninstall VPN

- Remove profile (add to ProfileView)

Create DestructiveButton with iOS 15 .role when available.
2022-04-25 16:34:22 +02:00
Davide De Rosa 6aee88e69a Refactor theme styles
- Hide colors behind styles

- Add "Style" suffix
2022-04-23 11:48:43 +02:00
Davide De Rosa d1c98006d3 Replace ReloadingContent with implicit animations
Infinite loop on init(), but horrible practice in general.

- DonateView
- PaywallView+Purchase

Also show a ProgressView while rows are loading.

DO NOT animate on .products value because animation won't work
if products are empty and stay empty after refresh. Instead,
observe .isRefreshingProducts.

Lastly, to avoid annoying animation when products are actually
available, do not refresh products if non-empty. They certainly
do not change during the application lifecycle.
2022-04-21 11:22:07 +02:00
Davide De Rosa 96b199425f Add ProgressView as overlay when possible
Instead of replacing view entirely (GenericCreditsView).

Make replacement explicit in DebugLogView.

Basically drop View extension.
2022-04-21 11:19:04 +02:00
Davide De Rosa 17a383bc9c Redo ReloadingContent with @ObservedObject
Proper way to listen to changes in elements is observing their
parent.
2022-04-19 21:22:13 +02:00
Davide De Rosa bf65f76401 Merge project into iOS + macOS
Share views with both platforms initially. Will split specific
views step by step.
2022-04-19 16:14:23 +02:00