Commit Graph

11 Commits

Author SHA1 Message Date
Davide De Rosa 2432f0d97a Rewrite ProfileView as a view of currentProfile
Do not load profile in View, instead:

- Load active profile on app launch

- Load selected profile on organizer selection
2022-04-23 10:25:31 +02:00
Davide De Rosa d8e47cb7c0 Refactor strings and add new ones
- Move Localizable.strings above to share *.lproj folders

- Reorg menus into contextual/system

- Shorten titles of contextual menus

- Update sharing message with WireGuard

- Drop AlternativeTo

7 phrases left to translate into 9 languages.
2022-04-22 13:12:42 +02:00
Davide De Rosa c9dfed676e Move VPN status below active profile
Rather than on the side. Similar to old subtitle table view cell.

Restore data count as well (when available).
2022-04-22 09:52:10 +02:00
Davide De Rosa ed16617288 Fix iOS 14 not preselecting created profile
When starting from empty profiles.
2022-04-21 14:59:17 +02:00
Davide De Rosa 759b740d62 Simplify ProfilesList with implicit animations
By A LOT.
2022-04-21 14:59:17 +02:00
Davide De Rosa e7803fb894 Reuse logic to set Organizer headers
Refine headers sync on profile removal.
2022-04-20 11:50:10 +02:00
Davide De Rosa 3c2480d3b7 Rewrite ProfilesList without ReloadingContent
Make sure to update localHeaders contextually with
removeProfiles() to avoid a second update in onChange(). The
equality check in onChange() guards against setting localHeaders
twice.

Not doing so may break animation in swipe-to-delete due to the
overlapping animations (it certainly does break on iOS 14).
2022-04-19 22:47:06 +02:00
Davide De Rosa 17a383bc9c Redo ReloadingContent with @ObservedObject
Proper way to listen to changes in elements is observing their
parent.
2022-04-19 21:22:13 +02:00
Davide De Rosa 923ea923ab Fix active profile not preselected on launch
Function called multiple times sets isFirstLaunch to true even if
not active profile.
2022-04-19 21:19:43 +02:00
Davide De Rosa 18e9f7cbb5 Clear profile selection if current profile removed
Do it before ForEach rearranges NavigationLink elements, because
it may trigger undesired navigation to a deleted profile.

Restore related assertion.
2022-04-19 21:19:43 +02:00
Davide De Rosa bf65f76401 Merge project into iOS + macOS
Share views with both platforms initially. Will split specific
views step by step.
2022-04-19 16:14:23 +02:00