Commit Graph

2154 Commits

Author SHA1 Message Date
Davide De Rosa 3e8a49c970 Remove store value when set value is nil
Fixes crash on removing active profile when current, due to setting
nil activeProfileId in UserDefaults.
2022-07-05 08:04:58 +02:00
Davide De Rosa ebe8ae3d29 Retain profiles order, no active on top 2022-07-04 00:32:06 +02:00
Davide De Rosa e8f65e9db0 Also show active profile as "Disabled" 2022-07-04 00:31:54 +02:00
Davide De Rosa 15dec59692 Comment on app path inferral from launcher 2022-06-26 08:53:10 +02:00
Davide De Rosa 0ff831f021 Fix target in test workflow 2022-06-25 20:27:24 +02:00
Davide De Rosa 1543eef3c1 Add convenient appId constant 2022-06-25 20:27:24 +02:00
Davide De Rosa b966826f19 Use main container path as launcher argument
Rather than "Contents/MacOS/Passepartout", raising a permission
error.

Also add .hides to prevent window from showing on launch.
2022-06-25 20:16:06 +02:00
Davide De Rosa df0d40c556 Add launcher target
- Launch main app in background then die

- Do not launch app if already running

- Launch app binary relative to launcher location
2022-06-25 16:53:38 +02:00
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