Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Every Open Peel Settings opens the tab it speaks of

Țugui Dragoșf1657f432cb6
diff --git a/Peel/Views/AppDetailView.swift b/Peel/Views/AppDetailView.swift
index 25915851..f035ecdf 100644
--- a/Peel/Views/AppDetailView.swift
+++ b/Peel/Views/AppDetailView.swift
@@ -20,6 +20,7 @@ struct AppDetailView: View {
@State private var upgrade: Upgrade?
@State private var upgradeOutput: HomebrewLibrary.CommandResult?
@Environment(\.notifications) private var notifications
+ @Environment(\.openSettings) private var openSettings
@State private var isShowingReset = false
@State private var resetChangedFiles = false
@@ -127,9 +128,7 @@ struct AppDetailView: View {
detail: Text("Peel leaves it and its files alone. Change that in Settings."),
kind: .note
) {
- SettingsLink {
- Text("Open Peel Settings")
- }
+ Button("Open Peel Settings") { SettingsPane.exclusions.open(with: openSettings) }
}
.listRowSeparator(.hidden)
}
@@ -139,9 +138,7 @@ struct AppDetailView: View {
detail: Text("Remove Peel, in Settings > General, removes its helper and login item as well. Moved from here, Peel would leave them behind."),
kind: .note
) {
- SettingsLink {
- Text("Open Peel Settings")
- }
+ Button("Open Peel Settings") { SettingsPane.general.open(with: openSettings) }
}
.listRowSeparator(.hidden)
}
diff --git a/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift b/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift
index 739f3715..11bf2748 100644
--- a/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift
+++ b/Peel/Views/BackgroundItems/BackgroundItemDetailView.swift
@@ -92,7 +92,7 @@ struct BackgroundItemDetailView: View {
kind: .note
) {
Button("Open Peel Settings") {
- openSettings()
+ SettingsPane.helper.open(with: openSettings)
}
}
.padding(.vertical, 6)
diff --git a/Peel/Views/HelperRequiredBanner.swift b/Peel/Views/HelperRequiredBanner.swift
index ad0df7d9..0c43a456 100644
--- a/Peel/Views/HelperRequiredBanner.swift
+++ b/Peel/Views/HelperRequiredBanner.swift
@@ -14,7 +14,7 @@ struct HelperRequiredBanner: View {
if helper.standing == .waitingForApproval {
PrivilegedHelper.openLoginItemsSettings()
} else {
- openSettings()
+ SettingsPane.helper.open(with: openSettings)
}
}
}
diff --git a/Peel/Views/RemovalFailureAlert.swift b/Peel/Views/RemovalFailureAlert.swift
index 7a444dfb..6b145020 100644
--- a/Peel/Views/RemovalFailureAlert.swift
+++ b/Peel/Views/RemovalFailureAlert.swift
@@ -18,7 +18,7 @@ struct RemovalFailureAlert: ViewModifier {
Button("Open System Settings") { NSWorkspace.shared.open(AppManagement.settingsURL) }
}
if needsHelper {
- Button("Open Peel Settings") { openSettings() }
+ Button("Open Peel Settings") { SettingsPane.helper.open(with: openSettings) }
}
if !outcome.failures.isEmpty {
Button("Copy Details") { copyDetails() }