Commit Graph

2962 Commits

Author SHA1 Message Date
Davide
5e46eb2fe5
Fix "Connect to..." appearing in non-providers 2024-10-28 22:34:07 +01:00
Davide
acaaf13ceb
Bump version 2024-10-28 21:48:29 +01:00
Davide
c930225458
Move theme-related logic to UI target
Fixes 
2024-10-28 21:45:10 +01:00
Davide
6f64edc95b
Fix overflow in installed profile name 2024-10-28 21:31:48 +01:00
Davide
b574dd68f1
Bump version 2024-10-28 21:06:49 +01:00
Davide
5da84194a9
Hide paywall in beta 2024-10-28 21:02:45 +01:00
Davide
f8773cacf1
Filter countries by selected category ()
Countries are filtered through the latest servers list. If a country is
chosen, the countries picker only lists the currently selected country,
because there are no servers from other countries.

Update the library to prefetch the available countries per category.
2024-10-28 20:53:35 +01:00
Davide
7ede841346
Present error alert on missing provider () 2024-10-28 20:30:22 +01:00
Davide
11a0f95cdd
Wrap paywall into NavigationStack 2024-10-28 20:08:13 +01:00
Davide
0ec06c2c65
Import OpenVPN configuration ()
At module creation time, choose whether to use a provider or import a
configuration file. After the import, the provider picker is hidden for
mutual exclusion.

For clarity, refactor the configuration part of OpenVPNView into a
ConfigurationView subview.
2024-10-28 20:07:19 +01:00
Davide
ecb0348b90
Move providers paywall to picker ()
Paywall on module creation suggests that OpenVPN modules are a paid
feature.
2024-10-28 19:55:42 +01:00
Davide
639dee55ee
Replace 'lastUpdated' with 'lastUpdate' 2024-10-28 17:16:13 +01:00
Davide
0d383ec792
Store providers to Core Data ()
Also, improve filters by constraining related fields:

- Pick countries from the filtered category
- Pick presets from those available in the currently filtered servers

Closes 
2024-10-28 16:57:23 +01:00
Davide
cc119e18ce
Move Theme images to same file 2024-10-26 21:53:21 +02:00
Davide
ee3a40b597
Back up profiles to Core Data ()
Closes 
2024-10-26 21:41:07 +02:00
Davide
baff2c58ca
Rename favorites preference 2024-10-26 21:20:42 +02:00
Davide
b515041bd9
Add dots to Edit 2024-10-26 21:10:55 +02:00
Davide
d1b41a6615
Reconnect if necessary on profile save
Fixes 
2024-10-26 21:09:30 +02:00
Davide
b36189c5c9
Improve some providers UI on macOS
- Bigger profile modal
- Add star header to favorites column
- Tile favorites checkbox and clear filters
2024-10-26 21:02:33 +02:00
Davide
6d915f8985
Fix presets not filtered by configuration 2024-10-26 20:51:51 +02:00
Davide
61e8d8e2f7
Optimize redraws in provider servers views () 2024-10-26 20:28:02 +02:00
Davide
df4e3465f5
Save provider favorite servers ()
Fixes 
2024-10-26 13:29:26 +02:00
Davide
3abde3851a
Improve some things about providers ()
- iOS: Add category name to clarify servers context
- iOS: Show "No servers" when list is empty
- macOS: Show "Connect" in server selector when presenting from home
- Add last update to issue report
- Refactor provider strings
2024-10-25 11:38:27 +02:00
Davide
2c2b3f063a
Multi-configuration providers () 2024-10-25 10:54:28 +02:00
Davide
bbcd245bad
Fix compile error on iOS 2024-10-23 23:21:37 +02:00
Davide
5fcb710d5e
Allow creation of OpenVPN provider module ()
Behind paywall as per  

Fixes 
2024-10-23 23:19:53 +02:00
Davide
bf3c50c348
Do not force refresh infrastructure
Fixes 
2024-10-23 23:06:02 +02:00
Davide
1a82aea612
Optionally apply filters based on server selection ()
Restore passing selectedEntity, but add filtersWithSelection to decide
whether to filter servers based on selection.

Partially revert 91a3e42533
2024-10-23 22:57:30 +02:00
Davide
1e06c350ee
Fetch providers index on launch
Fixes 
2024-10-23 21:23:54 +02:00
Davide
91a3e42533
Start entity selector unfiltered
Do some renaming too.
2024-10-23 21:22:05 +02:00
Davide
8815e6fdf7
Use server checkmark rather than selection on macOS 2024-10-23 19:31:03 +02:00
Davide
99b9aeaa9c
Reconnect on provider server selection ()
Trigger reconnection on server selection, otherwise the installed
profile would display an outdated region. It's also more convenient.
2024-10-23 18:51:22 +02:00
Davide
12d3bd20f5
Highlight selected server ()
Use provider-aware ID.
2024-10-23 18:40:09 +02:00
Davide
48dc31a1f1
Attempt an iOS layout with DisclosureGroup
Also fix missing initial filters based on selection.

Fixes 
2024-10-23 18:31:24 +02:00
Davide
2455c5397e
Attach provider ID to issue report
Fixes 
2024-10-23 17:32:49 +02: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
07a751a237
Fix environment scope for .navigationPath on iOS
Broken in 
2024-10-23 15:46:00 +02:00
Davide
ee8ef34f06
Avoid nested module navigation ()
A NavigationLink in VPNProviderContentModifier raised a few questions
about the navigation approach in module views. It turned out that having
a Binding to a local ObservedObject (ProfileEditor) is a recipe for
disaster.

Therefore:

- We don't need a binding to the editor module (the draft), because by
doing so we end up _observing_ the same changes from two properties, the
binding and the editor. This seems to drive SwiftUI crazy and freezes
the app once we navigate from the module to another view (e.g. in
OpenVPN the credentials or the provider server). Use the module binding
as a shortcut, but do not assign the binding to the view to avoid
unnecessary observation.
- Keep .navigationDestination() in the module view, and pass a known
destination to VPNProviderContentModifier. This will save the modifier
from creating a nested NavigationLink destination. The
VPNProviderServerView is now openly instantiated by the module view when
such destination is triggered by the NavigationLink in the modifier.
- Do not implicitly dismiss VPNProviderServerView on selection, let the
presenter take care. In order to do so, we add a .navigationPath
environment key through which the module view can modify the current
navigation stack.
2024-10-23 15:42:54 +02:00
Davide
a94db35d01
Refactor a few things about provider flows ()
- Move disclosable menu from installed profile view to
ThemeDisclosableMenu
- Drop unnecessary configurationType modifier parameter
- Reorg view-related module extensions to separate files
- Reuse .flow fields instead of single blocks
- Show specific error on missing provider server selection
2024-10-22 15:06:13 +02:00
Davide
39bdf145e8
Resolve issues when toggling/switching profiles ()
- Drop logic behind connection button tasks, let the library handle
concurrency
- Drop AppContext observation of saved profiles for reconnection, let
save() actively decide
- NETunnelStrategy and NETunnelManagerRepository are now a single entity
- Avoid flickering when toggling same profile
2024-10-22 13:03:34 +02:00
Davide
696f076ac5
Add issue to FIXMEs 2024-10-20 13:00:27 +02:00
Davide
25470e61e5
Lazy-load tunnel logs in Diagnostics
Fixes 
2024-10-20 01:54:46 +02:00
Davide
ae9e200618
Omit provider in OpenVPN server configuration
Fixes 
2024-10-20 00:22:49 +02:00
Davide
2155fe1892
Optimize updates in NEProfileRepository ()
Currently, NEProfileRepository decodes profiles from ALL NE managers on
any update. This is undesirable considering that:

- Profiles are only _added_ by the app
- Externally, profiles can only be _removed_

Therefore:

- Observe the initial managers to decode the initial profiles from them
- Publish values manually on save/delete (to ProfileManager eventually)
- Observe the subsequent updates for when a profile is removed
externally, i.e. its ID doesn't appear in managers

Fixes 
2024-10-19 18:22:27 +02:00
Davide
5d2e24792c
Rewrite provider views ()
Resolve some flickering and state inconsistency due to overextended
observation of VPNProviderManager. Narrow down its scope to
VPNProviderServerView.

The downside of that, for now, is that servers are loaded "lazily late",
but this flow will make region selection from home easier.

Finally, show filters in popover on iPad.
2024-10-18 18:12:28 +02:00
Davide
0221aea6b6
Move some profile integrity checks to library ()
They really belong to Profile.Builder
2024-10-16 09:50:26 +02:00
Davide
3de75e476b
Prevent iPad dismiss when tapping outside ()
The user may tap outside accidentally while editing a profile, thus
losing all the edits. Avoid that.

Fixes 
2024-10-16 08:56:58 +02:00
Davide
acf066571a
Fix some key things about providers UI ()
Fixes 
2024-10-16 08:53:16 +02:00
Davide
9656e5ed29
Filter servers with category/country of selected server ()
And use Task for blocking actions in filters.
2024-10-15 23:48:27 +02:00
Davide
aeaf0a6eed
Some fixes
- Import remote profiles off the main thread
- Drop meaningless Published
- Add a FIXME to move Profile build logic to library
2024-10-15 23:37:50 +02:00