Skip to content

Commit fae3abd

Browse files
authored
Merge pull request #332 from Ryanmello07/feat/reliability-checkpoint-upstream
reliability port: developer screen, exit attribution, site pin rules
2 parents 9cf8d5b + 068d852 commit fae3abd

9 files changed

Lines changed: 1857 additions & 31 deletions

File tree

app/network/Main/Account/AccountNavStackView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ struct AccountNavStackView: View {
215215
.navigationTitle("Provider Identities")
216216
.background(themeManager.currentTheme.backgroundColor)
217217

218+
case .developer:
219+
220+
DeveloperView()
221+
.navigationTitle("Developer")
222+
.background(themeManager.currentTheme.backgroundColor)
223+
218224
}
219225

220226
}

app/network/Main/Account/AccountNavStackViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ enum AccountNavigationPath: Hashable {
1818
case transferBalanceCodes
1919
case providerContracts
2020
case providerIdentities
21+
case developer
2122
}
2223

2324
extension AccountNavStackView {

app/network/Main/Account/Settings/Developer/DeveloperView.swift

Lines changed: 791 additions & 0 deletions
Large diffs are not rendered by default.

app/network/Main/Account/Settings/SettingsForm-iOS.swift

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,22 @@ struct SettingsForm_iOS: View {
429429
.foregroundColor(themeManager.currentTheme.textMutedColor)
430430
}
431431
}
432-
433-
432+
433+
Section("Developer") {
434+
HStack {
435+
Text("Open developer tools")
436+
.font(themeManager.currentTheme.bodyFont)
437+
Spacer()
438+
Image(systemName: "chevron.right")
439+
.foregroundColor(themeManager.currentTheme.textMutedColor)
440+
}
441+
.contentShape(Rectangle())
442+
.onTapGesture {
443+
navigate(.developer)
444+
}
445+
}
446+
447+
434448
Section("Danger") {
435449
Button(role: .destructive, action: {
436450
presentDeleteAccountConfirmation()

app/network/Main/Account/Settings/SettingsForm-macOS.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,33 @@ struct SettingsForm_macOS: View {
574574

575575
Spacer().frame(height: 32)
576576

577+
/**
578+
* Developer
579+
*/
580+
HStack {
581+
UrLabel(text: "Developer")
582+
583+
Spacer()
584+
}
585+
586+
HStack {
587+
Text("Open developer tools")
588+
.font(themeManager.currentTheme.bodyFont)
589+
.foregroundColor(themeManager.currentTheme.textColor)
590+
Spacer()
591+
Image(systemName: "chevron.right")
592+
.foregroundColor(themeManager.currentTheme.textMutedColor)
593+
}
594+
.contentShape(Rectangle())
595+
.onTapGesture {
596+
navigate(.developer)
597+
}
598+
.padding()
599+
.background(themeManager.currentTheme.tintedBackgroundBase)
600+
.clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous))
601+
602+
Spacer().frame(height: 32)
603+
577604
HStack {
578605
UrLabel(text: "Version and Build info")
579606

app/network/NetworkApp.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ struct NetworkApp: App {
8989
@StateObject var blockActionsStore = BlockActionsStore()
9090
@StateObject var dnsSettingsStore = DnsSettingsStore()
9191
@StateObject var networkPeersStore = NetworkPeersStore()
92+
@StateObject var reliabilityStore = ReliabilityStore()
9293

9394
init() {
9495
let deviceManager = DeviceManager()
@@ -143,13 +144,15 @@ struct NetworkApp: App {
143144
blockActionsStore.setup(device)
144145
dnsSettingsStore.setup(device)
145146
networkPeersStore.setup(device)
147+
reliabilityStore.setup(device)
146148
}
147149

148150
private func resetDeviceStores() {
149151
throughputStore.reset()
150152
blockActionsStore.reset()
151153
dnsSettingsStore.reset()
152154
networkPeersStore.reset()
155+
reliabilityStore.reset()
153156
}
154157

155158
// Cold launch already gets a fresh JWT (the SDK's token manager refreshes
@@ -244,6 +247,7 @@ struct NetworkApp: App {
244247
.environmentObject(blockActionsStore)
245248
.environmentObject(dnsSettingsStore)
246249
.environmentObject(networkPeersStore)
250+
.environmentObject(reliabilityStore)
247251
.environment(\.presentationActive, presentationLifecycle.isActive)
248252
.onOpenURL { url in
249253
GIDSignIn.sharedInstance.handle(url)
@@ -287,6 +291,7 @@ struct NetworkApp: App {
287291
.environmentObject(blockActionsStore)
288292
.environmentObject(dnsSettingsStore)
289293
.environmentObject(networkPeersStore)
294+
.environmentObject(reliabilityStore)
290295
.environment(\.presentationActive, presentationLifecycle.isActive)
291296
.onOpenURL { url in
292297
GIDSignIn.sharedInstance.handle(url)

0 commit comments

Comments
 (0)