Skip to content

Commit 064da32

Browse files
committed
Revert to 3.4.1
1 parent ce95df0 commit 064da32

File tree

97 files changed

+1198
-2132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1198
-2132
lines changed

.github/workflows/manual_release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ jobs:
5252
git_push_gpgsign: false
5353
- name: Tag release
5454
run: |
55-
tag="v$APP_VERSION"
56-
git tag -as "$tag" -m "$tag"
57-
git push origin "$tag"
55+
git tag -as "v$APP_VERSION" -m "v$APP_VERSION"
56+
git push --tags
5857
- name: Publish release
5958
uses: softprops/action-gh-release@v2
6059
with:

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,8 @@ jobs:
214214
git_push_gpgsign: false
215215
- name: Tag release
216216
run: |
217-
tag="v$APP_VERSION"
218-
git tag -as "$tag" -m "$tag"
219-
git push origin "$tag"
217+
git tag -as "v$APP_VERSION" -m "v$APP_VERSION"
218+
git push --tags
220219
- name: Publish release
221220
uses: softprops/action-gh-release@v2
222221
with:

CHANGELOG.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
* Revert "Send to TV" and TV QR
1+
* Auto-delete stale keychain entries
2+
* Restore auto-deletion of migrated v2 profiles
3+
* Extend the eligibility for the "Forever" product (#1377)

Packages/App/Sources/AppUIMain/Domain/HTTPAddressPort.swift

Lines changed: 0 additions & 71 deletions
This file was deleted.

Packages/App/Sources/AppUIMain/Views/App/AppCoordinator.swift

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public struct AppCoordinator: View, AppCoordinatorConforming, SizeClassProviding
6060
private var paywallReason: PaywallReason?
6161

6262
@State
63-
private var paywallContinuation: (() -> Void)?
63+
private var onCancelPaywall: (() -> Void)?
6464

6565
@State
6666
private var modalRoute: ModalRoute?
@@ -102,9 +102,14 @@ public struct AppCoordinator: View, AppCoordinatorConforming, SizeClassProviding
102102
))
103103
.modifier(PaywallModifier(
104104
reason: $paywallReason,
105-
onAction: { _, _ in
106-
paywallContinuation?()
107-
}
105+
otherTitle: Strings.Views.Paywall.Alerts.Confirmation.editProfile,
106+
onOtherAction: { profile in
107+
guard let profile else {
108+
return
109+
}
110+
onEditProfile(profile.localizedPreview)
111+
},
112+
onCancel: onCancelPaywall
108113
))
109114
.themeModal(
110115
item: $modalRoute,
@@ -296,7 +301,7 @@ extension AppCoordinator {
296301
public func onPurchaseRequired(
297302
for profile: Profile,
298303
features: Set<AppFeature>,
299-
continuation: (() -> Void)?
304+
onCancel: (() -> Void)?
300305
) {
301306
pp_log_g(.app, .info, "Purchase required for features: \(features)")
302307
guard !iapManager.isLoadingReceipt else {
@@ -310,12 +315,12 @@ extension AppCoordinator {
310315
"\n\n",
311316
V.Connect._2(iapManager.verificationDelayMinutes)
312317
].joined(separator: " "),
313-
onDismiss: continuation
318+
onDismiss: onCancel
314319
)
315320
return
316321
}
317322
pp_log_g(.app, .info, "Present paywall")
318-
paywallContinuation = continuation
323+
onCancelPaywall = onCancel
319324

320325
setLater(.init(profile, requiredFeatures: features, action: .connect)) {
321326
paywallReason = $0

Packages/App/Sources/UILibrary/Views/UI/ProfileSharingView.swift renamed to Packages/App/Sources/AppUIMain/Views/App/ProfileAttributesView.swift

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// ProfileSharingView.swift
2+
// ProfileAttributesView.swift
33
// Passepartout
44
//
55
// Created by Davide De Rosa on 11/10/24.
@@ -23,28 +23,21 @@
2323
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
2424
//
2525

26-
import CommonLibrary
2726
import SwiftUI
2827

29-
public struct ProfileSharingView: View {
30-
private let flags: [ProfileSharingFlag]
28+
struct ProfileAttributesView: View {
29+
enum Attribute {
30+
case shared
3131

32-
private let isRemoteImportingEnabled: Bool
33-
34-
public init(flags: [ProfileSharingFlag], isRemoteImportingEnabled: Bool) {
35-
self.flags = flags
36-
self.isRemoteImportingEnabled = isRemoteImportingEnabled
32+
case tv
3733
}
3834

39-
public init(profileManager: ProfileManager, profileId: Profile.ID) {
40-
self.init(
41-
flags: profileManager.sharingFlags(for: profileId),
42-
isRemoteImportingEnabled: profileManager.isRemoteImportingEnabled
43-
)
44-
}
35+
let attributes: [Attribute]
36+
37+
let isRemoteImportingEnabled: Bool
4538

46-
public var body: some View {
47-
if !flags.isEmpty {
39+
var body: some View {
40+
if !attributes.isEmpty {
4841
ZStack(alignment: .centerFirstTextBaseline) {
4942
Group {
5043
ThemeImage(.cloudOn)
@@ -64,11 +57,9 @@ public struct ProfileSharingView: View {
6457
.foregroundStyle(.secondary)
6558
}
6659
}
67-
}
6860

69-
private extension ProfileSharingView {
7061
var imageModels: [(name: Theme.ImageName, help: String)] {
71-
flags.map {
62+
attributes.map {
7263
switch $0 {
7364
case .shared:
7465
return (
@@ -96,8 +87,8 @@ private extension ProfileSharingView {
9687
.autoconnect()
9788

9889
var body: some View {
99-
ProfileSharingView(
100-
flags: [.shared, .tv],
90+
ProfileAttributesView(
91+
attributes: [.shared, .tv],
10192
isRemoteImportingEnabled: isRemoteImportingEnabled
10293
)
10394
.onReceive(timer) { _ in
@@ -117,7 +108,7 @@ private extension ProfileSharingView {
117108
.withMockEnvironment()
118109
}
119110

120-
private struct IconsPreview: View {
111+
struct IconsPreview: View {
121112
var body: some View {
122113
Form {
123114
HStack(alignment: .firstTextBaseline) {

Packages/App/Sources/AppUIMain/Views/App/ProfileRowView.swift

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct ProfileRowView: View, Routable, SizeClassProviding {
5555
HStack {
5656
cardView
5757
Spacer()
58-
sharingView
58+
attributesView
5959
tunnelToggle
6060
}
6161
.unanimated()
@@ -74,10 +74,10 @@ private extension ProfileRowView {
7474
.foregroundStyle(.primary)
7575
}
7676

77-
var sharingView: some View {
78-
ProfileSharingView(
79-
profileManager: profileManager,
80-
profileId: preview.id
77+
var attributesView: some View {
78+
ProfileAttributesView(
79+
attributes: attributes,
80+
isRemoteImportingEnabled: profileManager.isRemoteImportingEnabled
8181
)
8282
.imageScale(isBigDevice ? .large : .medium)
8383
}
@@ -99,9 +99,26 @@ private extension ProfileRowView {
9999
profileManager.profile(withId: preview.id)
100100
}
101101

102+
var attributes: [ProfileAttributesView.Attribute] {
103+
if isTV {
104+
return [.tv]
105+
} else if isShared {
106+
return [.shared]
107+
}
108+
return []
109+
}
110+
102111
var requiredFeatures: Set<AppFeature>? {
103112
profileManager.requiredFeatures(forProfileWithId: preview.id)
104113
}
114+
115+
var isShared: Bool {
116+
profileManager.isRemotelyShared(profileWithId: preview.id)
117+
}
118+
119+
var isTV: Bool {
120+
isShared && profileManager.isAvailableForTV(profileWithId: preview.id)
121+
}
105122
}
106123

107124
// MARK: - Previews

Packages/App/Sources/AppUIMain/Views/Modules/DNSView.swift

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,18 @@ private extension DNSView {
9090
}
9191

9292
var routingSection: some View {
93-
Picker(Strings.Modules.Dns.routeThroughVpn, selection: $draft.module.routesThroughVPN) {
94-
Text(Strings.Global.Nouns.default)
95-
.tag(nil as Bool?)
96-
Text(Strings.Global.Nouns.yes)
97-
.tag(true as Bool?)
98-
Text(Strings.Global.Nouns.no)
99-
.tag(false as Bool?)
93+
Group {
94+
Picker(Strings.Modules.Dns.routeThroughVpn, selection: $draft.module.routesThroughVPN) {
95+
Text(Strings.Global.Nouns.default)
96+
.tag(nil as Bool?)
97+
Text(Strings.Global.Nouns.yes)
98+
.tag(true as Bool?)
99+
Text(Strings.Global.Nouns.no)
100+
.tag(false as Bool?)
101+
}
102+
.themeRowWithSubtitle(Strings.Modules.Dns.RouteThroughVpn.footer)
100103
}
101-
.themeContainerWithSingleEntry(
102-
footer: Strings.Modules.Dns.RouteThroughVpn.footer)
104+
.themeSection(footer: Strings.Modules.Dns.RouteThroughVpn.footer)
103105
}
104106

105107
var domainSection: some View {

Packages/App/Sources/AppUIMain/Views/Modules/IPView.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,15 @@ private extension IPView {
9494

9595
@ViewBuilder
9696
func ipSections(for ip: Binding<IPSettings>, family: Address.Family) -> some View {
97-
ThemeTextField(
98-
Strings.Global.Nouns.address,
99-
text: $subnets[family] ?? "",
100-
placeholder: Strings.Unlocalized.Placeholders.ipDestination(forFamily: family)
101-
)
102-
.themeContainerWithSingleEntry(
97+
Group {
98+
ThemeTextField(
99+
Strings.Global.Nouns.address,
100+
text: $subnets[family] ?? "",
101+
placeholder: Strings.Unlocalized.Placeholders.ipDestination(forFamily: family)
102+
)
103+
.themeRowWithSubtitle(Strings.Modules.Ip.Address.footer)
104+
}
105+
.themeSection(
103106
header: family.localizedDescription,
104107
footer: Strings.Modules.Ip.Address.footer
105108
)

Packages/App/Sources/AppUIMain/Views/Modules/OnDemandView.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private extension OnDemandView {
9393
)
9494
}
9595
}
96-
.themeContainerWithSingleEntry(footer: policyFooterDescription)
96+
.themeSectionWithSingleRow(footer: policyFooterDescription)
9797
}
9898

9999
var policyFooterDescription: String {
@@ -122,7 +122,8 @@ private extension OnDemandView {
122122
}
123123
.themeSection(
124124
header: Strings.Global.Nouns.networks,
125-
footer: Strings.Modules.OnDemand.Networks.footer
125+
footer: Strings.Modules.OnDemand.Networks.footer,
126+
forcesFooter: true
126127
)
127128
}
128129

@@ -232,18 +233,17 @@ private extension OnDemandView {
232233
"Two": false,
233234
"Three": false
234235
]
235-
return module.preview()
236-
// return module.preview {
237-
// OnDemandView(
238-
// draft: $1[$0],
239-
// parameters: .init(
240-
// registry: Registry(),
241-
// editor: $1,
242-
// impl: nil
243-
// ),
244-
// observer: MockWifi()
245-
// )
246-
// }
236+
return module.preview {
237+
OnDemandView(
238+
draft: $1[$0],
239+
parameters: .init(
240+
registry: Registry(),
241+
editor: $1,
242+
impl: nil
243+
),
244+
observer: MockWifi()
245+
)
246+
}
247247
}
248248

249249
private class MockWifi: WifiObserver {

0 commit comments

Comments
 (0)