Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Forget a refusal on the Shell and SSH tabs when the page goes away
Țugui Dragoșf18e0807fe29
diff --git a/Peel/Model/SSHLibrary.swift b/Peel/Model/SSHLibrary.swiftindex 4b7921ee..1bd07785 100644--- a/Peel/Model/SSHLibrary.swift+++ b/Peel/Model/SSHLibrary.swift@@ -63,6 +63,10 @@ final class SSHLibrary {write([])}+ func forgetRefusal() {+ wasRefused = false+ }+private func write(_ settings: Set<SSHSetting>) {wasRefused = !SSHFile.write(settings, to: file)state?.settings = SSHFile.read(file)diff --git a/Peel/Model/ShellLibrary.swift b/Peel/Model/ShellLibrary.swiftindex a37bdbe6..62ef032d 100644--- a/Peel/Model/ShellLibrary.swift+++ b/Peel/Model/ShellLibrary.swift@@ -106,6 +106,10 @@ final class ShellLibrary {write(ShellFile.Choices())}+ func forgetRefusal() {+ wasRefused = false+ }+private func write(_ choices: ShellFile.Choices) {wasRefused = !ShellFile.write(choices, to: file)state?.choices = ShellFile.read(file)diff --git a/Peel/Views/Terminal/TerminalPage.swift b/Peel/Views/Terminal/TerminalPage.swiftindex cfee94c6..24ce5d37 100644--- a/Peel/Views/Terminal/TerminalPage.swift+++ b/Peel/Views/Terminal/TerminalPage.swift@@ -50,6 +50,8 @@ struct TerminalPage: View {.onDisappear {tweaks.forgetNotices()terminal.forgetRefusal()+ shell.forgetRefusal()+ ssh.forgetRefusal()}.onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ inTask { await refresh() }