Commit Graph

33 Commits

Author SHA1 Message Date
Davide c930225458
Move theme-related logic to UI target
Fixes #719
2024-10-28 21:45:10 +01:00
Davide 0ec06c2c65
Import OpenVPN configuration (#765)
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 (#764)
Paywall on module creation suggests that OpenVPN modules are a paid
feature.
2024-10-28 19:55:42 +01:00
Davide df4e3465f5
Save provider favorite servers (#758)
Fixes #706
2024-10-26 13:29:26 +02:00
Davide 3abde3851a
Improve some things about providers (#757)
- 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 (#756) 2024-10-25 10:54:28 +02:00
Davide 5fcb710d5e
Allow creation of OpenVPN provider module (#755)
Behind paywall as per #712 

Fixes #712
2024-10-23 23:19:53 +02:00
Davide 1a82aea612
Optionally apply filters based on server selection (#754)
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 91a3e42533
Start entity selector unfiltered
Do some renaming too.
2024-10-23 21:22:05 +02:00
Davide 48dc31a1f1
Attempt an iOS layout with DisclosureGroup
Also fix missing initial filters based on selection.

Fixes #746
2024-10-23 18:31:24 +02:00
Davide 295ba4d662
Quick selection of provider server (#750)
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 #711
2024-10-23 17:17:20 +02:00
Davide ee8ef34f06
Avoid nested module navigation (#749)
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 (#748)
- 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 ae9e200618
Omit provider in OpenVPN server configuration
Fixes #744
2024-10-20 00:22:49 +02:00
Davide 8cdd20dfb4
Fix animation in OpenVPNView 2024-10-15 21:39:47 +02:00
Davide ed28126cf7
Rework OpenVPN view with provider modifiers (#733)
Improve rendering and work around some SwiftUI bugs, e.g. with .menu
Picker on iOS (use .navigationLink instead).

Here goes the hierarchy bottom-up:

- ProviderPicker: a Picker wrapper built around ProviderManager
- ProviderContentModifier: adds a ProviderPicker on top and replaces the
content with a set of provider selectors when a provider is selected
- VPNProviderContentModifier: wrapper for ProviderContentModifier that
adds a VPN server selector
- OpenVPNView: provides a view of specific OpenVPN settings, and adds a
credentials selector to the provider/server selectors provided by
VPNProviderContentModifier
2024-10-15 21:34:02 +02:00
Davide 87c7d63678
Redo provider managers lifecycle (#732)
Update library with more efficient choices for interacting with the
providers API.

Fixes #731
2024-10-13 11:36:34 +02:00
Davide 208198c3f8
Create OpenVPN module without a configuration (#729)
Update library to allow optional VPN configurations. This in turn allows
a module to be used with a provider, where the configuration is
generated on the fly.
2024-10-11 19:11:42 +02:00
Davide f2a141a189
Purge stale NetworkExtension/keychain data (#728)
- [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 #727 then reverted, this is the complete PR.
2024-10-11 17:48:37 +02:00
Davide da87ca698a
Add initial support for providers (#723)
Initial integration of providers via API:

- Generic views and modifiers for provider/server selection
- Add in OpenVPNView
- Prepare in WireGuardView

Also:

- Introduce ProfileProcessor, move IAP processing there
- Move .asModuleView() to ModuleViewModifier for proper animation
- Use .themeModal() rather than .sheet()
2024-10-11 00:24:06 +02:00
Davide df2fc54044
Render profile UUID as quartets (#700)
Easier to read.
2024-10-09 21:40:56 +02:00
Davide De Rosa 635700c195
Revisit OpenVPN view
- Move pull section below
- Add IPv6 to preview
2024-10-06 19:22:45 +02:00
Davide De Rosa 7078e5c435
Unrestrict previews 2024-10-06 19:22:44 +02:00
Davide 504bcbdbd2
Refactor and move entities around (#698)
Do some housekeeping in AppLibrary/AppUI.
2024-10-06 19:19:16 +02:00
Davide De Rosa 8b5096ab69
Make copiable text multiline by default 2024-10-05 00:17:08 +02:00
Davide De Rosa e75c264258
Go multiline rather than truncate copiable
Fixes #682
2024-10-04 10:40:18 +02:00
Davide De Rosa 07703fda9c
Fix some things about IP module
- Reword module description to "Routing"
- Make route modal title .inline
2024-10-04 00:44:31 +02:00
Davide De Rosa fc834ab367
Replace Section with .themeSection
Closes #676
2024-10-03 23:32:31 +02:00
Davide De Rosa 429e79cd3a
Refactor theme section and some phrases 2024-10-03 17:35:57 +02:00
Davide e8d5f2477b
Prepare interactive login for paywall (#663)
See #662
2024-10-02 16:05:40 +02:00
Davide De Rosa f602655568
Link TODOs to issues 2024-10-01 15:50:12 +02:00
Davide 4877c2bd20
Restrict paywall to on-demand rules (#639)
Rather than whole module.

Closes #638
2024-09-30 15:56:32 +02:00
Davide fbc6ece59d
Reorganize library into AppUI (#621)
Closes #611
2024-09-26 23:13:55 +02:00