Commit Graph

2496 Commits

Author SHA1 Message Date
Davide De Rosa
3cc82cc807 Fix case in Info keys related to launch screen 2022-06-25 16:53:38 +02:00
Davide De Rosa
7ba9879c8c Revisit constants structure
Move some stuff back to App:

- Constants, and split library-dependent

- InApp entities and constants

Flatten global constants hierarchy.
2022-06-25 14:36:28 +02:00
Davide De Rosa
3c9511cd0c Only support Catalyst where required
- App
- Tunnels
2022-06-25 13:28:28 +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
85129f17af Prefix store keys with "Passepartout." domain
Also remove stale preferences from early betas after migrating
relevant ones.

Extend KeyValueStore with removeValue() for this purpose.
2022-06-19 13:33:49 +02:00
Davide De Rosa
02a9db057f Update TunnelKit
- Set explicit tunnel log path

- OpenSSL 1.1.1o
2022-06-19 13:33:49 +02:00
Davide De Rosa
bb1a35acea Set full log path relative to App Group container
Also rename from Debug.log to App.log
2022-06-19 13:33:49 +02:00
Davide De Rosa
10b4c321c8 Separate context responsibilities
- Split Core and App context

- Move .shared instantiation to extension

Context may differ by target.
2022-06-16 13:42:53 +02:00
Davide De Rosa
14b42fbea5 Persist managers state to generic key-value store
Move all persisted state out of AppManager to where it really
belongs. To do that, inject a shared KeyValueStore object into
managers that need to persist part of their state in a strongly
typed manner.

Below are persisted states:

- PersistenceManager
    - persistenceAuthor

- ProfileManager
    - activeProfileId

- UpgradeManager (formerly AppManager)
    - didMigrateToV2 (migrate former value)

- VPNManager
    - tunnelLogFormat
    - masksPrivateData

A similar approach is used for app-specific preferences, by using
a strongly typed enum (AppPreference) together with SwiftUI
@AppStorage property wrapper.

Worth moving logging logic into a specific LogManager.

Finally, drop any former view dependency on AppManager, as states
are now accessed through specific managers.
2022-06-16 13:42:37 +02:00
Davide De Rosa
127ba28a8c Run SwiftGen manually
Build phase may raise concerns in CI.
2022-06-16 13:42:21 +02:00
Davide De Rosa
77ff910adc Update and extend copyright notices 2022-06-16 13:42:21 +02:00
Davide De Rosa
b873e5e279 Strip VPNManager initialization 2022-06-02 20:52:51 +02:00
Davide De Rosa
1fd4fd4689 Fix required capabilities 2022-06-01 21:14:21 +02:00
Davide De Rosa
eac6e27b30 Add .conf for WireGuard to README 2022-06-01 21:14:21 +02:00
Davide De Rosa
b768284197 Enforce .sidebar on Mac
Drops annoying side inset.
2022-05-24 09:15:27 +02:00
Davide De Rosa
f752594d3c Refactor no autocorrection into raw text style 2022-05-24 08:25:34 +02:00
Davide De Rosa
02213a7c50 Drop truncation hack 2022-05-23 10:10:02 +02:00
Davide De Rosa
83cdd460e4 Attempt beta release 2022-05-21 19:15:48 +02:00
Davide De Rosa
930ff65193 Revert "Enable macOS in "Public Beta" job"
This reverts commit 6bb46ef8b4.
2022-05-21 19:15:37 +02:00
Davide De Rosa
a2d4ed370e Revisit sidebar with per-profile VPN toggles 2022-05-21 19:15:37 +02:00
Davide De Rosa
f700993a52 Refactor global theme consistently
- Return values rather than apply modifiers

- Use .insetGrouped by default

- Reuse .insetGrouped in StyledPicker

- Enforce .sidebar on iPad
2022-05-21 19:04:35 +02:00
Davide De Rosa
f0c5ecd84f Handle configuration errors out of VPN status
On configuration error, retain information about the profile that
triggered the error. For now, present an alert, but with this
information the UI can be easily changed later.
2022-05-21 19:01:49 +02:00
Davide De Rosa
ae748dd1b3 Fix logo name 2022-05-21 18:55:40 +02:00
Davide De Rosa
46a8fb8a74 Delay presentation of imported file modal
Fixes navigation bug on iOS 14 preventing modal from dismissing
via close button.
2022-05-20 16:35:45 +02:00
Davide De Rosa
59b3c320c8 Only activate profile after valid configuration 2022-05-20 11:58:28 +02:00
Davide De Rosa
d6866e8e95 Fix iPad multitasking condition 2022-05-20 11:58:25 +02:00
Davide De Rosa
fe4ca51820 Clear lastError in VPNManager.reconnect() 2022-05-19 11:30:22 +02:00
Davide De Rosa
9735b9ab14 Use consistent case in assets 2022-05-19 10:33:36 +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
b1d77cccbc Attempt beta release 2022-05-18 11:18:57 +02:00
Davide De Rosa
6bb46ef8b4 Enable macOS in "Public Beta" job 2022-05-18 11:17:39 +02:00
Davide De Rosa
4455f66d10 Detect TestFlight on macOS
Move function to Utils.
2022-05-18 11:16:31 +02:00
Davide De Rosa
cdf4010f09 Pass GITHUB_TOKEN to workflows env
Workflows failing to push changes. Could this fix it?
2022-05-17 23:16:52 +02:00
Davide De Rosa
160338e62a Add credits in Mac about 2022-05-17 19:57:19 +02:00
Davide De Rosa
ec1b167e41 Restore Mac in private beta 2022-05-17 19:36:23 +02:00
Davide De Rosa
4c2a471b9f Attempt beta release 2022-05-17 19:34:13 +02:00
Davide De Rosa
4edecf123b Fix missing accent color in CI
Finally? Basically Xcode build settings were referring to new
color name "AccentColor", while color set in repository was
still "accentColor".

Went unnoticed because Mac filesystem is case-insensitive, which
is why Git never committed the name change in the first place.
2022-05-17 19:34:00 +02:00
Davide De Rosa
0113695daa Attempt beta release 2022-05-17 16:55:00 +02:00
Davide De Rosa
6c798c8b19 Bump build 2022-05-17 16:43:14 +02:00
Davide De Rosa
115f54edbd Bump CI to macOS 12
Features Xcode 13.3.1, consistent with local development.

Maybe works around accent color bug.
2022-05-17 16:42:37 +02:00
Davide De Rosa
05f3457249 Fix some Mac specific code in Core
- Improve network conditionals in on-demand rules

- Restore native version of DebugLog

- Restore correct code to fetch current SSID
2022-05-17 12:24:28 +02:00
Davide De Rosa
7196aeab0d Trust Ethernet on Mac 2022-05-16 11:19:33 +02:00
Davide De Rosa
f5e01f9768 Wrap/refine a few OS conditionals 2022-05-16 11:19:18 +02:00
Davide De Rosa
16d618df0e Show info menu in ProfileView on iPad/Mac
Use .navigationBarTrailing to avoid artifact on Catalyst (item
relocates when first clicked).

Rename menu files too.
2022-05-16 11:18:58 +02:00
Davide De Rosa
6fddbb8bfc Decouple menus from OrganizerView
Could move .sheet() from parent View to Menu, but no luck with
.fileImporter()
2022-05-16 11:18:58 +02:00
Davide De Rosa
d89130bc3a Reorganize profile menu into computed properties 2022-05-16 11:18:58 +02:00
Davide De Rosa
e87ad06c5d Drop old observables from profiles list
List was being reloaded e.g. on ProductManager receipt updates,
but profile in-app eligibility is not a thing anymore.
2022-05-16 10:59:12 +02:00
Davide De Rosa
137bacb542 Add contextual profile delete
Without confirmation alert though.
2022-05-15 22:24:36 +02:00