Commit Graph

677 Commits

Author SHA1 Message Date
Davide
070b661c43
Refactor library targets ()
Renames:

- AppUI → UILibrary
- AppUIPlatform → AppUI (conditional umbrella) + AppUI[Main|TV]
- APILibrary/CommonLibrary/UtilsLibrary → Common[API|Library|Utils]

Dependencies:

- AppUI → UILibrary
- UILibrary → AppLibrary, CommonAPI
- AppLibrary → CommonLibrary, CommonUtils
2024-11-02 10:11:59 +01:00
Davide
590b2790fa
Revisit overuse of EnvironmentObject ()
The biggest issue is the hidden and scattered use of both Tunnel and
ConnectionObserver. Only use the latter, and rename it to ExtendedTunnel
for being now a full wrapper around Tunnel (e.g. for .connectionStatus).

In general, restrict the use of EnvironmentObject to:

- Theme
- IAPManager
- ProfileProcessor
- ProviderManager

Always be explicit about:

- ProfileManager
- ExtendedTunnel

Contextually, move some UI entities to the base AppUI target.
2024-11-01 09:47:50 +01:00
Davide
e7666e6097
Fix previout commit on macOS 2024-10-31 12:23:00 +01:00
Davide
9f22053fa9
Fix lifecycle of environment objects ()
 was happening because environment objects were set on contentView,
which is not the _outmost_ root view. This clarifies why the Theme
object was not being found in ThemeLockScreenModifier.

Also, do not hardcode LogoView as lock view.
2024-10-31 11:14:39 +01:00
Davide
237277d4db
Do some refactoring in AppUI targets ()
- Refactor AppUI initialization in all platforms (sort of template
method pattern)
- Make AppMenu specific to macOS by wrapping it into a folder for
consistency
- Add SizeClassProviding for repeated checks on hsClass/vsClass

Fixes 
2024-10-31 10:02:21 +01:00
Davide
dcdb03a735
Improve country flags ()
Leverage the convenience of FlagKit. Update credits too.
2024-10-30 19:11:58 +01:00
Davide
7f3d897818
Improve macOS window lifecycle ()
- Let the user close the window, the app will just remain alive in the
status bar
- Accordingly, replace "Confirm quit" preference with the option to stay
alive in the status bar
- Add "About..." item
2024-10-30 10:37:45 +01:00
Davide
9d6dfe6a76
Fix crash on lock screen ()
Missing environment Theme in LogoView.

Probably broken in 
2024-10-30 10:18:39 +01:00
Davide
7e2bd01c36
Omit lock screen on macOS 2024-10-29 14:44:00 +01:00
Davide
944d6f8c28
Refactor AppUI for TV target ()
Split AppUI into AppUI and AppUIMain to allow for a new, simplified
AppUITV target tailored for the Apple TV.

As a PoC, present a view with a list of the shared profiles.
2024-10-29 14:30:41 +01:00
Davide
41de48789e
Show in Mac status bar plus Login Item ()
Add a status menu via SwiftUI MenuBarExtra where to:

- Show/hide app
- Launch on login via "Login Item" target
- Toggle profiles on/off

Only weird that the login item is not added to the list of "Open at
Login", but to "Allow in the Background", see
https://github.com/pilotmoon/Scroll-Reverser/issues/165

Requires some refactoring to bring AppContext initialization to the
AppDelegate.

Fixes 
Fixes  
Fixes  
Fixes 
2024-10-29 11:40:11 +01:00
Davide
92cf1985e2
Fix iOS app not reacting to open URL ()
Resort to SwiftUI .onOpenURL(), seems to do fine for single URL on iOS
(not on macOS).
2024-10-28 23:38:01 +01:00
Davide
295ba4d662
Quick selection of provider server ()
First of all, add country flags assets. Then, present provider server
selector:

- From installed profile view, specifically from a button with the flag
of the current country
- From profile context menu
- On toggle profile when no server is selected

Closes 
2024-10-23 17:17:20 +02:00
Davide
f2a141a189
Purge stale NetworkExtension/keychain data ()
- [x] NE managers were not deleted when unable to be decoded to a
profile
- [x] Keychain items were not deleted on profile removal
- [x] Perform clean-up on app launch
- [x] Perform clean-up on app active

Prematurely merged as  then reverted, this is the complete PR.
2024-10-11 17:48:37 +02:00
Davide
8f6192c2b6
Fix extra team prefix in keychain group ()
Team ID already included in .xcconfig

Fixes 
2024-10-11 03:45:20 +02:00
Davide
5c91eb4bf1
Review Constants
- Move container names out of Bundle
- Add API web services timeout
2024-10-10 19:29:38 +02:00
Davide
d589f1162d
Reorganize shared objects ()
Mainly:

- Aggregate shared/mock entities in less scattered files
- Review package dependencies

Also:

- Decouple ProfileRepository from Core Data Repository in UtilsLibrary
(filters done by ProfileManager)
2024-10-10 16:20:36 +02:00
Davide
5fb6f4f4d2
Refactor static functions/entities in Library ()
Reduce the impact of hidden dependencies on BundleConfiguration and
Constants.shared

Fixes 
2024-10-04 09:58:42 +02:00
Davide
211b3b83d3
Erase iCloud store from Settings ()
Also, fix SwiftUI not refreshing when remote profiles are updated. There
was no objectWillChange nor Published around
ProfileManager.allRemoteProfiles, and ProfileRowView was not treating it
as ObservedObject.

Closes 
2024-10-03 23:25:51 +02:00
Davide
1491766102
Per-profile iCloud syncing ()
Keep two separate stores to accomplish per-profile sharing:

- Local store, where to push updates manually (save/remove/search)
- Remote iCloud store, where to pull updates from

A profile can be added/removed to/from the iCloud store so that other
devices can push/pull updates to it.

Consequently, updates to the iCloud store will NEVER cause a profile
deletion. Once removed, the profile will stay locally.

Fixes  
Fixes 
2024-10-03 18:41:27 +02:00
Davide
51dbc3f246
Add App Intents extension stub ()
Just the Xcode metadata, no actual content.
2024-10-01 10:17:20 +02:00
Davide De Rosa
3f60dee9a2
Add missing Info.plist document key 2024-09-30 19:00:09 +02:00
Davide De Rosa
cf3fe7449e
Fix missing CFBundleTypeName 2024-09-30 18:08:29 +02:00
Davide
aead866275
Open app with multiple files ()
onOpenURL cannot handle multiple URLs on macOS, whereas
NSApplicationDelegate can.

Fixes 
2024-09-30 17:22:16 +02:00
Davide
a29495a69c
Decouple Constants from BundleConfiguration ()
Fixes 
2024-09-28 19:05:47 +02:00
Davide
28a2017da2
Confirm quit on macOS ()
To do so, must prevent window from closing.

Fixes 
2024-09-28 17:58:48 +02:00
Davide
5deb8ec763
Prepare for macOS settings () 2024-09-28 12:47:33 +02:00
Davide De Rosa
c0234b07a8
Fix missing Window on iOS
Broken by 9e6e59276b
2024-09-28 11:56:35 +02:00
Davide
9e6e59276b
Associate and handle imported files () 2024-09-28 11:43:57 +02:00
Davide
fbc6ece59d
Reorganize library into AppUI ()
Closes 
2024-09-26 23:13:55 +02:00
Davide
4124ff5cae
Lock app with FaceID ()
Restore feature as-is from v2.

Closes 
2024-09-25 19:32:07 +02:00
Davide
752dc6229f
Associate with ovpn/conf/zip files ()
Closes 
2024-09-25 18:14:26 +02:00
Davide
6cc86e8668
Import v3 code ()
Closes 
2024-09-23 15:02:26 +02:00
Davide De Rosa
6bfda3487b
Attempt release 2024-09-22 16:29:08 +02:00
Davide De Rosa
ea4028d33c
Attempt release 2024-09-22 16:20:20 +02:00
Davide De Rosa
d1d66dcbb3
Attempt release 2024-09-22 16:16:26 +02:00
Davide De Rosa
a98cedfd7d
Attempt release 2024-09-22 16:02:40 +02:00
Davide De Rosa
1a6c5fd303
Attempt release 2024-09-22 15:58:52 +02:00
Davide De Rosa
10cfc8e54a
Attempt release 2024-09-22 15:55:50 +02:00
Davide De Rosa
9e2b757ec5
Attempt release 2024-09-22 15:43:34 +02:00
Davide De Rosa
5587b9902a
Allow deletion of TV profiles
Fixes 
2024-09-22 15:41:53 +02:00
Davide De Rosa
18b933d36e
Respect global macOS accent () 2024-02-03 11:52:29 +01:00
Davide De Rosa
7f5b84c72b
Override profile list selection color ()
Both List and Toggle use accent color for their tint. Instead:

- Set grayish .tint on List to customize selection color
- Retain global accent in VPNToggle

Fixes 
2024-01-27 15:59:40 +01:00
Davide De Rosa
7b30d48ea4
Bump version 2024-01-20 00:21:14 +01:00
Davide De Rosa
24b08c4b50
Update restricted profile except expiration ()
TV profiles were not updated until expiration.
2024-01-19 08:39:38 +01:00
Davide De Rosa
e3f4443cc0
Attempt release 2024-01-19 00:07:12 +01:00
Davide De Rosa
5fe9d7405f
Attempt release 2024-01-14 15:14:42 +01:00
Davide De Rosa
64d1131fdd
Update copyright
Closes 
2024-01-14 14:36:55 +01:00
Davide De Rosa
cdd33c881d
Attempt release 2024-01-14 14:04:39 +01:00
Davide De Rosa
0299466a8f
Unintended sensitive data in issue reports () 2024-01-14 14:01:54 +01:00