Almost there

This commit is contained in:
Alin
2024-02-29 16:44:44 -07:00
parent faa7ec9457
commit 96f7a1fb5b
26 changed files with 664 additions and 494 deletions
+4 -5
View File
@@ -18,7 +18,6 @@ class AppState: ObservableObject
@Published var sortedApps: (userApps: [AppInfo], systemApps: [AppInfo]) = ([], []) @Published var sortedApps: (userApps: [AppInfo], systemApps: [AppInfo]) = ([], [])
@Published var selectedItems = Set<URL>() @Published var selectedItems = Set<URL>()
@Published var selectedZombieItems = Set<URL>() @Published var selectedZombieItems = Set<URL>()
@Published var trashedFiles: [URL] = []
@Published var alertType = AlertType.off @Published var alertType = AlertType.off
@Published var currentView = CurrentDetailsView.empty @Published var currentView = CurrentDetailsView.empty
@Published var showAlert: Bool = false @Published var showAlert: Bool = false
@@ -107,16 +106,16 @@ struct ZombieFile: Identifiable, Equatable, Hashable {
enum CurrentTabView:Int enum CurrentTabView:Int
{ {
case general case general
case permissions // case permissions
case sentinel // case sentinel
case update case update
case about case about
var title: String { var title: String {
switch self { switch self {
case .general: return "General" case .general: return "General"
case .permissions: return "Permissions" // case .permissions: return "Permissions"
case .sentinel: return "Sentinel" // case .sentinel: return "Sentinel"
case .update: return "Update" case .update: return "Update"
case .about: return "About" case .about: return "About"
} }
+4 -4
View File
@@ -477,27 +477,27 @@ func showAppInFiles(appInfo: AppInfo, mini: Bool, appState: AppState, locations:
if let storedAppInfo = appState.appInfoStore.first(where: { $0.path == appInfo.path }) { if let storedAppInfo = appState.appInfoStore.first(where: { $0.path == appInfo.path }) {
appState.appInfo = storedAppInfo appState.appInfo = storedAppInfo
appState.selectedItems = Set(storedAppInfo.files) appState.selectedItems = Set(storedAppInfo.files)
// withAnimation(Animation.easeIn(duration: 0.3)) { withAnimation(Animation.easeIn(duration: 0.3)) {
if mini { if mini {
appState.currentView = .files appState.currentView = .files
showPopover.wrappedValue.toggle() showPopover.wrappedValue.toggle()
} else { } else {
appState.currentView = .files appState.currentView = .files
} }
// } }
} else { } else {
updateOnMain { updateOnMain {
appState.showProgress = true appState.showProgress = true
} }
// Handle the case where the appInfo is not found in the store // Handle the case where the appInfo is not found in the store
// withAnimation(Animation.easeIn(duration: 0.4)) { withAnimation(Animation.easeIn(duration: 0.4)) {
if mini { if mini {
appState.currentView = .files appState.currentView = .files
showPopover.wrappedValue.toggle() showPopover.wrappedValue.toggle()
} else { } else {
appState.currentView = .files appState.currentView = .files
} }
// } }
printOS("AppInfo not found in the cached store, searching again") printOS("AppInfo not found in the cached store, searching again")
appState.appInfo = .empty appState.appInfo = .empty
appState.appInfo = appInfo appState.appInfo = appInfo
+45 -12
View File
@@ -31,20 +31,12 @@ struct SimpleButtonStyle: ButtonStyle {
.foregroundColor(hovered ? color : color.opacity(0.5)) .foregroundColor(hovered ? color : color.opacity(0.5))
} }
.padding(5) .padding(5)
// .background {
// if hovered && !(shield ?? false) {
//// Circle()
//// .strokeBorder(Color("AccentColor"), lineWidth: 1)
// RoundedRectangle(cornerRadius: 8)
// .strokeBorder(Color("AccentColor"), lineWidth: 1)
// }
//
// }
.onHover { hovering in .onHover { hovering in
withAnimation() { withAnimation() {
hovered = hovering hovered = hovering
} }
} }
.scaleEffect(configuration.isPressed ? 0.95 : 1)
.help(help) .help(help)
} }
} }
@@ -117,18 +109,18 @@ struct LabeledDivider: View {
HStack(spacing: 0) { HStack(spacing: 0) {
Rectangle() Rectangle()
.frame(height: 1) .frame(height: 1)
.foregroundColor(Color("AccentColor").opacity(0.2)) .foregroundColor(.gray.opacity(0.2))
Text(label) Text(label)
.textCase(.uppercase) .textCase(.uppercase)
.font(.title2) .font(.title2)
.foregroundColor(Color("AccentColor").opacity(0.6)) .foregroundColor(.gray.opacity(0.6))
.padding(.horizontal, 10) .padding(.horizontal, 10)
.frame(minWidth: 80) .frame(minWidth: 80)
Rectangle() Rectangle()
.frame(height: 1) .frame(height: 1)
.foregroundColor(Color("AccentColor").opacity(0.2)) .foregroundColor(.gray.opacity(0.2))
} }
.frame(minHeight: 35) .frame(minHeight: 35)
} }
@@ -577,7 +569,48 @@ struct PillPicker: View {
struct PearDropView: View {
var body: some View {
VStack(alignment: .center, spacing: 0) {
HStack(spacing: 0) {
LinearGradient(gradient: Gradient(colors: [.pink, .orange]), startPoint: .leading, endPoint: .trailing)
.frame(width: 195)
LinearGradient(gradient: Gradient(colors: [.orange, .gray]), startPoint: .leading, endPoint: .trailing)
.frame(width: 10)
LinearGradient(gradient: Gradient(colors: [.gray, .gray]), startPoint: .leading, endPoint: .trailing)
.frame(width: 300)
}
.mask(
Image("logo_text_small")
.resizable()
.scaledToFit()
.frame(width: 500, height: 120)
.padding()
)
// LinearGradient(gradient: Gradient(colors: [.gray, .gray]), startPoint: .leading, endPoint: .trailing)
// .mask(
// Image("logo_text_small")
// .resizable()
// .scaledToFit()
// .frame(minWidth: 300, maxWidth: 350)
// .frame(height: 100)
// .padding()
// )
// LinearGradient(gradient: Gradient(colors: [.pink, .orange]), startPoint: .leading, endPoint: .trailing)
// .mask(
// Image(systemName: "plus.square.dashed")
// .resizable()
// .scaledToFit()
// .frame(width: 50, height: 50)
// .padding()
// )
}
.frame(height: 120)
}
}
+5 -5
View File
@@ -85,13 +85,15 @@ struct PearcleanerApp: App {
appState.sortedApps.userApps = sortedApps.userApps appState.sortedApps.userApps = sortedApps.userApps
appState.sortedApps.systemApps = sortedApps.systemApps appState.sortedApps.systemApps = sortedApps.systemApps
#if !DEBUG
Task { Task {
// Find all app paths on load // Find all app paths on load
loadAllPaths(allApps: sortedApps.userApps + sortedApps.systemApps, appState: appState, locations: locations) loadAllPaths(allApps: sortedApps.userApps + sortedApps.systemApps, appState: appState, locations: locations)
#if !DEBUG
// Make sure App Support folder exists in the future if needed for storage // Make sure App Support folder exists in the future if needed for storage
ensureApplicationSupportFolderExists(appState: appState) ensureApplicationSupportFolderExists(appState: appState)
@@ -116,12 +118,10 @@ struct PearcleanerApp: App {
loadGithubReleases(appState: appState) loadGithubReleases(appState: appState)
} }
} }
}
#endif #endif
}
} }
} }
.windowStyle(.hiddenTitleBar) .windowStyle(.hiddenTitleBar)
.windowResizability(.contentMinSize) .windowResizability(.contentMinSize)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 513 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "logo_text_small.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

+118 -109
View File
@@ -12,129 +12,138 @@ struct AboutSettingsTab: View {
var body: some View { var body: some View {
VStack { VStack(alignment: .center) {
HStack(alignment: .center) {
VStack(alignment: .center, spacing: 10){
VStack(alignment: .center, spacing: 10) {
Image(nsImage: NSApp.applicationIconImage)
.padding(.top, 30)
Text(Bundle.main.name)
.font(.title)
.bold()
HStack {
Text("Version \(Bundle.main.version)")
Text("(Build \(Bundle.main.buildVersion))").font(.footnote)
}
Divider()
.padding()
}
VStack(alignment: .leading) {
HStack() {
Text("Credits and Inspiration").font(.title2)
Spacer() Spacer()
}
.padding(.leading)
Image(nsImage: NSApp.applicationIconImage) HStack{
.padding() Image(systemName: "paintbrush.pointed")
// .padding(.bottom, 5) .resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
HStack(alignment: .center, spacing: 20) { VStack(alignment: .leading){
Button("") { Text("Microsoft Designer")
loadGithubReleases(appState: appState, manual: true) Text("Application icon resource")
} .font(.callout)
.buttonStyle(SimpleButtonStyle(icon: "cloud", help: "Update application", color: Color("AccentColor"))) .foregroundStyle(.gray)
Button("") {
NSWorkspace.shared.open(URL(string: "https://github.com/alienator88/Pearcleaner")!)
}
.buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View repository", color: Color("AccentColor")))
} }
Spacer() Spacer()
Button(""){
NSWorkspace.shared.open(URL(string: "https://designer.microsoft.com/image-creator")!)
}
.buttonStyle(SimpleButtonStyle(icon: "link", help: "View", color: Color("mode")))
} }
// .padding() .padding(5)
// .padding(.top, 10) .padding(.leading)
.frame(width: 250)
VStack(alignment: .center, spacing: 20) {
HStack(alignment: .firstTextBaseline) { HStack{
Text(Bundle.main.name) Image(systemName: "n.circle")
.font(.title) .resizable()
.bold() .scaledToFit()
Spacer() .frame(width: 20, height: 20)
HStack { .padding(.trailing)
Text("v\(Bundle.main.version)")
Text(" (build \(Bundle.main.buildVersion))") VStack(alignment: .leading){
} Text("Namelix")
Text("Logo and branding generation")
.font(.callout)
.foregroundStyle(.gray)
} }
Divider()
.padding(.top, -8)
VStack(alignment: .leading) {
HStack{
Image(systemName: "applescript.fill")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 16, height: 16)
VStack(alignment: .leading){
Text("Privacy Guides")
Text("Inspired by open-source appcleaner script from Sun Knudsen").font(.footnote).foregroundStyle(.gray)
}
Spacer()
Button("") {
NSWorkspace.shared.open(URL(string: "https://sunknudsen.com/privacy-guides/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative")!)
}
.buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View", color: Color("AccentColor")))
}
.padding()
.background(Color("mode").opacity(0.05))
.cornerRadius(8)
HStack{
Image(systemName: "trash.fill")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 16, height: 16)
VStack(alignment: .leading){
Text("AppCleaner")
Text("Inspired by AppCleaner from Freemacsoft").font(.footnote).foregroundStyle(.gray)
}
Spacer()
Button(""){
NSWorkspace.shared.open(URL(string: "https://freemacsoft.net/appcleaner/")!)
}
.buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View", color: Color("AccentColor")))
}
.padding()
.background(Color("mode").opacity(0.05))
.cornerRadius(8)
// HStack{
// Image(systemName: "paintbrush.fill")
// .resizable()
// .aspectRatio(contentMode: .fit)
// .frame(width: 16, height: 16)
// VStack(alignment: .leading){
// Text("Icon")
// Text("Created by Oviotti on DeviantArt").font(.footnote).foregroundStyle(.gray)
// }
// Spacer()
//
// Button("") {
// NSWorkspace.shared.open(URL(string: "https://www.deviantart.com/oviotti/art/AppCleaner-for-macOS-632260251")!)
// }
// .buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View", color: Color("AccentColor")))
//
// }
// .padding()
// .background(Color("mode").opacity(0.05))
// .cornerRadius(8)
}
Spacer() Spacer()
Button(""){
NSWorkspace.shared.open(URL(string: "https://namelix.com/")!)
}
.buttonStyle(SimpleButtonStyle(icon: "link", help: "View", color: Color("mode")))
} }
.padding(.trailing) .padding(5)
// .padding() .padding(.leading)
// .padding(.top, 30)
HStack{
Image(systemName: "applescript")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
VStack(alignment: .leading){
Text("Privacy Guides")
Text("Inspired by open-source appcleaner script from Sun Knudsen")
.font(.callout)
.foregroundStyle(.gray)
.lineLimit(2)
}
Spacer()
Button("") {
NSWorkspace.shared.open(URL(string: "https://sunknudsen.com/privacy-guides/how-to-clean-uninstall-macos-apps-using-appcleaner-open-source-alternative")!)
}
.buttonStyle(SimpleButtonStyle(icon: "link", help: "View", color: Color("mode")))
}
.padding(5)
.padding(.leading)
HStack{
Image(systemName: "trash")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
VStack(alignment: .leading){
Text("AppCleaner")
Text("Inspired by AppCleaner from Freemacsoft")
.font(.callout)
.foregroundStyle(.gray)
}
Spacer()
Button(""){
NSWorkspace.shared.open(URL(string: "https://freemacsoft.net/appcleaner/")!)
}
.buttonStyle(SimpleButtonStyle(icon: "link", help: "View", color: Color("mode")))
}
.padding(5)
.padding(.leading)
Spacer()
} }
Spacer() Spacer()
@@ -142,7 +151,7 @@ struct AboutSettingsTab: View {
Text("Made with ❤️ by Alin Lupascu (dev@itsalin.com)").font(.footnote).padding(.bottom) Text("Made with ❤️ by Alin Lupascu (dev@itsalin.com)").font(.footnote).padding(.bottom)
} }
.padding(20) .padding(20)
.frame(width: 750, height: 325) .frame(width: 500, height: 650)
} }
} }
+213 -64
View File
@@ -18,6 +18,9 @@ struct GeneralSettingsTab: View {
@AppStorage("settings.general.miniview") private var miniView: Bool = true @AppStorage("settings.general.miniview") private var miniView: Bool = true
@AppStorage("settings.general.sidebarWidth") private var sidebarWidth: Double = 280 @AppStorage("settings.general.sidebarWidth") private var sidebarWidth: Double = 280
@AppStorage("displayMode") var displayMode: DisplayMode = .system @AppStorage("displayMode") var displayMode: DisplayMode = .system
@AppStorage("settings.sentinel.enable") private var sentinel: Bool = false
@State private var diskStatus: Bool = false
@State private var accessStatus: Bool = false
@State private var selectedTheme = "Auto" @State private var selectedTheme = "Auto"
private let themes = ["Auto", "Dark", "Light"] private let themes = ["Auto", "Dark", "Light"]
@Binding var showPopover: Bool @Binding var showPopover: Bool
@@ -25,11 +28,23 @@ struct GeneralSettingsTab: View {
var body: some View { var body: some View {
Form { Form {
VStack { VStack {
HStack {
HStack() {
Text("Appearance").font(.title2)
Spacer()
}
.padding(.leading)
HStack(spacing: 0) {
Image(systemName: glass ? "cube.transparent" : "cube.transparent.fill")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(.gray)
VStack(alignment: .leading, spacing: 5) { VStack(alignment: .leading, spacing: 5) {
Text("Transparency").font(.title2) Text("\(glass ? "Transparent material enabled" : "Transparent material disabled")")
Text("Toggles transparent material") .font(.callout)
.font(.footnote)
.foregroundStyle(.gray) .foregroundStyle(.gray)
} }
Spacer() Spacer()
@@ -37,48 +52,55 @@ struct GeneralSettingsTab: View {
}) })
.toggleStyle(.switch) .toggleStyle(.switch)
} }
.padding() .padding(5)
.background( .padding(.leading)
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05))
)
HStack {
VStack(alignment: .leading, spacing: 5) { HStack(spacing: 0) {
Text("Sidebar").font(.title2) Image(systemName: "sidebar.left")
Text("Adjust sidebar width") .resizable()
.font(.footnote) .scaledToFit()
.foregroundStyle(.gray) .frame(width: 20, height: 20)
} .padding(.trailing)
.foregroundStyle(.gray)
Text("Adjust sidebar width")
.font(.callout)
.foregroundStyle(.gray)
Spacer() Spacer()
Slider(value: $sidebarWidth, in: 200...400) { Slider(value: $sidebarWidth, in: 200...360) {
Text("\(Int(sidebarWidth))") // Text("\(Int(sidebarWidth))")
} }
.padding(.horizontal) .padding(.horizontal)
.frame(width: 185)
Button("") {
sidebarWidth = 280
}
.buttonStyle(SimpleButtonStyle(icon: "arrow.uturn.left.circle", help: "Reset to default size", color: Color("mode")))
} }
.padding() .padding(5)
.background( .padding(.leading)
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05))
)
HStack {
HStack(spacing: 0) {
Image(systemName: displayMode.colorScheme == .dark ? "moon.fill" : "sun.max.fill")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(.gray)
VStack(alignment: .leading, spacing: 5) { VStack(alignment: .leading, spacing: 5) {
Text("Appearance").font(.title2) Text("Set color mode")
Text("Toggles color mode") .font(.callout)
.font(.footnote)
.foregroundStyle(.gray) .foregroundStyle(.gray)
} }
Spacer() Spacer()
Picker("", selection: $selectedTheme) { Picker("", selection: $selectedTheme) {
ForEach(themes, id: \.self) { theme in ForEach(themes, id: \.self) { theme in
Text(theme) Text(theme)
} }
} }
.pickerStyle(SegmentedPickerStyle()) .pickerStyle(SegmentedPickerStyle())
// .padding() .frame(width: 200)
.onChange(of: selectedTheme) { newTheme in .onChange(of: selectedTheme) { newTheme in
switch newTheme { switch newTheme {
case "Auto": case "Auto":
@@ -96,20 +118,33 @@ struct GeneralSettingsTab: View {
break break
} }
} }
} }
.padding() .padding(5)
.background( .padding(.leading)
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05)) // =========================================================================================================
)
Divider()
.padding()
HStack {
HStack() {
Text("Mini Configuration").font(.title2)
Spacer()
}
.padding(.leading)
HStack(spacing: 0) {
Image(systemName: mini ? "square.resize.up" : "square.resize.down")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(.gray)
VStack(alignment: .leading, spacing: 5) { VStack(alignment: .leading, spacing: 5) {
Text("Mini").font(.title2) Text("\(mini ? "Mini window mode" : "Full size window mode")")
Text("Toggles a smaller, unified view with hidden app list") .font(.callout)
.font(.footnote)
.foregroundStyle(.gray) .foregroundStyle(.gray)
} }
Spacer() Spacer()
@@ -131,18 +166,20 @@ struct GeneralSettingsTab: View {
} }
} }
} }
.padding() .padding(5)
.background( .padding(.leading)
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05))
)
HStack { HStack(spacing: 0) {
Image(systemName: miniView ? "square.grid.3x3.square" : "plus.square.dashed")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(.gray)
VStack(alignment: .leading, spacing: 5) { VStack(alignment: .leading, spacing: 5) {
Text("Mini - \(miniView ? "Apps List" : "Drop Target")").font(.title2) Text("\(miniView ? "Show apps list on startup" : "Show drop target on startup")")
Text("Toggles drop target or apps list view on launch") .font(.callout)
.font(.footnote)
.foregroundStyle(.gray) .foregroundStyle(.gray)
} }
Spacer() Spacer()
@@ -153,17 +190,20 @@ struct GeneralSettingsTab: View {
appState.currentView = newVal ? .apps : .empty appState.currentView = newVal ? .apps : .empty
} }
} }
.padding() .padding(5)
.background( .padding(.leading)
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05))
)
HStack {
HStack(spacing: 0) {
Image(systemName: popoverStay ? "pin" : "pin.slash")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(.gray)
VStack(alignment: .leading, spacing: 5) { VStack(alignment: .leading, spacing: 5) {
Text("Mini - \(popoverStay ? "Popover on Top" : "Popover not on Top")").font(.title2) Text("\(popoverStay ? "Popover window doesn't hide on outside click" : "Popover window hides on outside click")")
Text("Keeps file search popover on top in mini mode") .font(.callout)
.font(.footnote)
.foregroundStyle(.gray) .foregroundStyle(.gray)
} }
Spacer() Spacer()
@@ -171,21 +211,130 @@ struct GeneralSettingsTab: View {
}) })
.toggleStyle(.switch) .toggleStyle(.switch)
} }
.padding() .padding(5)
.background( .padding(.leading)
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05))
) // =========================================================================================================
Divider()
.padding()
HStack() {
Text("Permissions").font(.title2)
Spacer()
}
.padding(.leading)
HStack(spacing: 0) {
Image(systemName: diskStatus ? "externaldrive" : "externaldrive")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(diskStatus ? .green : .red)
.saturation(displayMode.colorScheme == .dark ? 0.5 : 1)
Text(diskStatus ? "Full Disk permission granted" : "Full Disk permission **NOT** granted")
.font(.callout)
.foregroundStyle(.gray)
Spacer()
Button("") {
if let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles") {
NSWorkspace.shared.open(url)
}
}
.buttonStyle(SimpleButtonStyle(icon: "folder", help: "View disk permissions pane", color: Color("mode")))
}
.padding(5)
.padding(.leading)
HStack(spacing: 0) {
Image(systemName: accessStatus ? "accessibility" : "accessibility")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(accessStatus ? .green : .red)
.saturation(displayMode.colorScheme == .dark ? 0.5 : 1)
Text(accessStatus ? "Accessibility permission granted" : "Accessibility permission **NOT** granted")
.font(.callout)
.foregroundStyle(.gray)
Spacer()
Button("") {
if let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility") {
NSWorkspace.shared.open(url)
}
}
.buttonStyle(SimpleButtonStyle(icon: "folder", help: "View accessibility permissions pane", color: Color("mode")))
}
.padding(5)
.padding(.leading)
// =========================================================================================================
Divider()
.padding()
HStack() {
Text("Sentinel Monitor").font(.title2)
Spacer()
}
.padding(.leading)
HStack(spacing: 0) {
Image(systemName: sentinel ? "eye.circle" : "eye.slash.circle")
.resizable()
.scaledToFit()
.frame(width: 20, height: 20)
.padding(.trailing)
.foregroundStyle(sentinel ? .green : .red)
.saturation(displayMode.colorScheme == .dark ? 0.5 : 1)
Text(sentinel ? "Detecting when apps are moved to Trash" : "**NOT** detecting when apps are moved to Trash")
.font(.callout)
.foregroundStyle(.gray)
Spacer()
Toggle(isOn: $sentinel, label: {
})
.toggleStyle(.switch)
.onChange(of: sentinel) { newValue in
if newValue {
launchctl(load: true)
} else {
launchctl(load: false)
}
}
}
.padding(5)
.padding(.leading)
Spacer() Spacer()
} }
.onAppear {
diskStatus = checkAndRequestFullDiskAccess(appState: appState, skipAlert: true)
accessStatus = checkAndRequestAccessibilityAccess(appState: appState)
}
} }
.padding(20) .padding(20)
.frame(width: 400, height: 500) .frame(width: 500, height: 650)
} }
+80 -34
View File
@@ -19,19 +19,16 @@ struct PermissionsSettingsTab: View {
Form { Form {
VStack(alignment: .leading, spacing: 10) { VStack(alignment: .leading, spacing: 10) {
HStack(spacing: 15) { HStack(spacing: 0) {
Image(systemName: "internaldrive") Image(systemName: diskStatus ? "externaldrive" : "externaldrive")
.resizable() .resizable()
.scaledToFit() .scaledToFit()
.frame(width: 20) .frame(width: 20, height: 20)
.padding(.trailing)
VStack(alignment: .leading, spacing: 5) { .foregroundStyle(diskStatus ? .green : .red)
Text("Full Disk") Text(diskStatus ? "Full Disk permission granted" : "Full Disk permission not granted")
Text(diskStatus ? "Permission granted" : "Permission not granted") .font(.callout)
.font(.footnote) .foregroundStyle(.gray)
.foregroundStyle(diskStatus ? .green : .red)
}
Spacer() Spacer()
Button("") { Button("") {
@@ -39,28 +36,22 @@ struct PermissionsSettingsTab: View {
NSWorkspace.shared.open(url) NSWorkspace.shared.open(url)
} }
} }
.buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View disk permission pane", color: Color("AccentColor"))) .buttonStyle(SimpleButtonStyle(icon: "gear", help: "View disk permissions pane", color: Color("mode")))
} }
.padding() .padding(5)
.background(
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05))
)
HStack(spacing: 15) { HStack(spacing: 0) {
Image(systemName: "accessibility") Image(systemName: accessStatus ? "accessibility" : "accessibility")
.resizable() .resizable()
.scaledToFit() .scaledToFit()
.frame(width: 20) .frame(width: 20, height: 20)
.padding(.trailing)
VStack(alignment: .leading, spacing: 5) { .foregroundStyle(accessStatus ? .green : .red)
Text("Accessibility") Text(accessStatus ? "Accessibility permission granted" : "Accessibility permission not granted")
Text(accessStatus ? "Permission granted" : "Permission not granted") .font(.callout)
.font(.footnote) .foregroundStyle(.gray)
.foregroundStyle(accessStatus ? .green : .red)
}
Spacer() Spacer()
Button("") { Button("") {
@@ -68,13 +59,68 @@ struct PermissionsSettingsTab: View {
NSWorkspace.shared.open(url) NSWorkspace.shared.open(url)
} }
} }
.buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View accessibility pane", color: Color("AccentColor"))) .buttonStyle(SimpleButtonStyle(icon: "gear", help: "View accessibility permissions pane", color: Color("mode")))
} }
.padding() .padding(5)
.background(
RoundedRectangle(cornerRadius: 8)
.fill(Color("mode").opacity(0.05)) // HStack(spacing: 15) {
) // Image(systemName: "internaldrive")
// .resizable()
// .scaledToFit()
// .frame(width: 20)
//
// VStack(alignment: .leading, spacing: 5) {
// Text("Full Disk")
// Text(diskStatus ? "Permission granted" : "Permission not granted")
// .font(.footnote)
// .foregroundStyle(diskStatus ? .green : .red)
// }
//
// Spacer()
//
// Button("") {
// if let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles") {
// NSWorkspace.shared.open(url)
// }
// }
// .buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View disk permission pane", color: Color("AccentColor")))
// }
// .padding()
// .background(
// RoundedRectangle(cornerRadius: 8)
// .fill(Color("mode").opacity(0.05))
// )
// HStack(spacing: 15) {
// Image(systemName: "accessibility")
// .resizable()
// .scaledToFit()
// .frame(width: 20)
//
// VStack(alignment: .leading, spacing: 5) {
// Text("Accessibility")
// Text(accessStatus ? "Permission granted" : "Permission not granted")
// .font(.footnote)
// .foregroundStyle(accessStatus ? .green : .red)
// }
//
// Spacer()
//
// Button("") {
// if let url = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility") {
// NSWorkspace.shared.open(url)
// }
// }
// .buttonStyle(SimpleButtonStyle(icon: "paperplane", help: "View accessibility pane", color: Color("AccentColor")))
// }
// .padding()
// .background(
// RoundedRectangle(cornerRadius: 8)
// .fill(Color("mode").opacity(0.05))
// )
+11 -11
View File
@@ -20,21 +20,21 @@ struct SettingsView: View {
} }
.tag(CurrentTabView.general) .tag(CurrentTabView.general)
PermissionsSettingsTab() // PermissionsSettingsTab()
.tabItem { // .tabItem {
Label(CurrentTabView.permissions.title, systemImage: "lock") // Label(CurrentTabView.permissions.title, systemImage: "lock")
} // }
.tag(CurrentTabView.permissions) // .tag(CurrentTabView.permissions)
SentinelSettingsTab() // SentinelSettingsTab()
.tabItem { // .tabItem {
Label(CurrentTabView.sentinel.title, systemImage: "eye.circle") // Label(CurrentTabView.sentinel.title, systemImage: "eye.circle")
} // }
.tag(CurrentTabView.sentinel) // .tag(CurrentTabView.sentinel)
UpdateSettingsTab() UpdateSettingsTab()
.tabItem { .tabItem {
Label(CurrentTabView.update.title, systemImage: "tray.and.arrow.down") Label(CurrentTabView.update.title, systemImage: "cloud")
} }
.tag(CurrentTabView.update) .tag(CurrentTabView.update)
+14 -7
View File
@@ -63,23 +63,30 @@ struct UpdateSettingsTab: View {
.frame(minWidth: 0, maxWidth: .infinity) .frame(minWidth: 0, maxWidth: .infinity)
.padding() .padding()
Text("Showing last 3").opacity(0.5).font(.footnote) Text("Showing last 3 releases")
.font(.callout)
.foregroundStyle(.gray)
HStack(alignment: .center, spacing: 5) { HStack(alignment: .center, spacing: 20) {
Spacer() Spacer()
Button("Check"){ Button("Update Notes"){
loadGithubReleases(appState: appState) loadGithubReleases(appState: appState)
}.buttonStyle(BorderedButtonStyle()) }
.buttonStyle(SimpleButtonStyle(icon: "list.bullet", help: "Check release notes", color: Color("mode")))
Button("Force Update"){ Button("Force Update"){
loadGithubReleases(appState: appState, manual: true) loadGithubReleases(appState: appState, manual: true)
}.buttonStyle(BorderedButtonStyle()) }
.buttonStyle(SimpleButtonStyle(icon: "arrow.down.square", help: "Check for updates", color: Color("mode")))
Button("GitHub"){ Button("GitHub"){
NSWorkspace.shared.open(URL(string: "https://github.com/alienator88/Pearcleaner/releases")!) NSWorkspace.shared.open(URL(string: "https://github.com/alienator88/Pearcleaner/releases")!)
}.buttonStyle(BorderedButtonStyle()) }
.buttonStyle(SimpleButtonStyle(icon: "link", help: "View releases on GitHub", color: Color("mode")))
Spacer() Spacer()
@@ -90,7 +97,7 @@ struct UpdateSettingsTab: View {
} }
.padding(20) .padding(20)
.frame(width: 500, height: 400) .frame(width: 500, height: 650)
} }
} }
+5 -60
View File
@@ -56,25 +56,9 @@ struct AppListView: View {
VStack(alignment: .center, spacing: 20) { VStack(alignment: .center, spacing: 20) {
HStack { HStack {
SearchBarMiniBottom(search: $search) SearchBarMiniBottom(search: $search)
// SearchBar(search: $search)
// Button("") {
// withAnimation(.easeInOut(duration: 0.5)) {
// // Refresh Apps list
// reload.toggle()
// let sortedApps = getSortedApps()
// DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
// appState.sortedApps.userApps = sortedApps.userApps
// appState.sortedApps.systemApps = sortedApps.systemApps
// reload.toggle()
// }
//
// }
// }
// .buttonStyle(SimpleButtonStyle(icon: "arrow.triangle.2.circlepath", help: "Refresh app list", color: Color("mode")))
} }
} }
// .padding(.horizontal)
.padding(.top, 20) .padding(.top, 20)
.padding(.bottom) .padding(.bottom)
@@ -120,7 +104,7 @@ struct AppListView: View {
} }
Divider() Divider().foregroundStyle(.red)
} }
} }
.background(glass ? GlassEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all) : nil) .background(glass ? GlassEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all) : nil)
@@ -145,36 +129,12 @@ struct AppListView: View {
.id(appState.appInfo.id) .id(appState.appInfo.id)
} }
} }
// .padding(.leading, appState.sidebar ? 0 : 10)
.transition(.move(edge: .leading)) .transition(.move(edge: .leading))
Spacer() Spacer()
} }
.frame(minWidth: 700, minHeight: 500) .frame(minWidth: 900, minHeight: 600)
.edgesIgnoringSafeArea(.all) .edgesIgnoringSafeArea(.all)
// .onOpenURL(perform: { url in
// let deeplinkManager = DeeplinkManager()
// deeplinkManager.manage(url: url, appState: appState)
// })
// .onDrop(of: ["public.file-url"], isTargeted: nil) { providers, _ in
// for provider in providers {
// provider.loadItem(forTypeIdentifier: "public.file-url") { data, error in
// if let data = data as? Data, let url = URL(dataRepresentation: data, relativeTo: nil) {
// let deeplinkManager = DeeplinkManager()
// deeplinkManager.manage(url: url, appState: appState)
// // // Check if the file URL has a ".app" extension
// // if url.pathExtension.lowercased() == "app" {
// // // Handle the dropped file URL here
// // printOS("Dropped .app file URL: \(url)")
// // } else {
// // // Print a message for non-.app files
// // printOS("Unsupported file type. Only .app files are accepted.")
// // }
// }
// }
// }
// return true
// }
// MARK: Background for whole app // MARK: Background for whole app
// .background(Color("bg").opacity(1)) // .background(Color("bg").opacity(1))
// .background(VisualEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all)) // .background(VisualEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all))
@@ -194,30 +154,15 @@ struct AppDetailsEmptyView: View {
@Binding var showPopover: Bool @Binding var showPopover: Bool
var body: some View { var body: some View {
VStack() { VStack(alignment: .center) {
Spacer() Spacer()
DropTarget(appState: appState, locations: locations, showPopover: $showPopover) PearDropView()
Spacer() Spacer()
// if appState.isReminderVisible { Text("Drop your app here or select one from the list")
// Text("􀆔 + Z to undo")
// .font(.title2)
// .foregroundStyle(Color("AccentColor").opacity(0.5))
// .fontWeight(.medium)
// .onAppear {
// DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
// withAnimation {
// appState.isReminderVisible = false
// }
// }
// }
// Spacer()
// }
Text("Drop an app above or select one from the list to begin")
.font(.title3) .font(.title3)
.padding(.bottom, 25) .padding(.bottom, 25)
.opacity(0.5) .opacity(0.5)
+1 -5
View File
@@ -227,16 +227,12 @@ struct FilesView: View {
if appFolderURL.path == "/Applications" || appFolderURL.path == "\(home)/Applications" { if appFolderURL.path == "/Applications" || appFolderURL.path == "\(home)/Applications" {
// Do nothing, skip insertion // Do nothing, skip insertion
} else if appFolderURL.pathComponents.count > 2 { } else if appFolderURL.pathComponents.count > 2 && appFolderURL.path.contains("Applications") {
// Insert into selectedItemsArray only if there is an intermediary folder // Insert into selectedItemsArray only if there is an intermediary folder
selectedItemsArray.insert(appFolderURL, at: 0) selectedItemsArray.insert(appFolderURL, at: 0)
} }
} }
// Save trashed files for undo operation
// updateOnMain {
// appState.trashedFiles = selectedItemsArray
// }
killApp(appId: appState.appInfo.bundleIdentifier) { killApp(appId: appState.appInfo.bundleIdentifier) {
moveFilesToTrash(at: selectedItemsArray) { moveFilesToTrash(at: selectedItemsArray) {
+21 -34
View File
@@ -28,13 +28,7 @@ struct MiniMode: View {
if appState.currentView == .empty { if appState.currentView == .empty {
TopBarMini(search: $search, showPopover: $showPopover) TopBarMini(search: $search, showPopover: $showPopover)
MiniEmptyView(showPopover: $showPopover) MiniEmptyView(showPopover: $showPopover)
} else if appState.currentView == .files { } else {
TopBarMini(search: $search, showPopover: $showPopover)
MiniAppView(search: $search, showPopover: $showPopover)
} else if appState.currentView == .zombie {
TopBarMini(search: $search, showPopover: $showPopover)
MiniAppView(search: $search, showPopover: $showPopover)
} else if appState.currentView == .apps {
TopBarMini(search: $search, showPopover: $showPopover) TopBarMini(search: $search, showPopover: $showPopover)
MiniAppView(search: $search, showPopover: $showPopover) MiniAppView(search: $search, showPopover: $showPopover)
} }
@@ -68,30 +62,6 @@ struct MiniMode: View {
.frame(minWidth: 300, minHeight: 335) .frame(minWidth: 300, minHeight: 335)
.edgesIgnoringSafeArea(.all) .edgesIgnoringSafeArea(.all)
.background(glass ? GlassEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all) : nil) .background(glass ? GlassEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all) : nil)
// .onOpenURL(perform: { url in
// let deeplinkManager = DeeplinkManager()
// deeplinkManager.manage(url: url, appState: appState)
// })
// .onDrop(of: ["public.file-url"], isTargeted: nil) { providers, _ in
// for provider in providers {
// provider.loadItem(forTypeIdentifier: "public.file-url") { data, error in
// if let data = data as? Data, let url = URL(dataRepresentation: data, relativeTo: nil) {
// let deeplinkManager = DeeplinkManager()
// deeplinkManager.manage(url: url, appState: appState)
//// // Check if the file URL has a ".app" extension
//// if url.pathExtension.lowercased() == "app" {
//// // Handle the dropped file URL here
//// printOS("Dropped .app file URL: \(url)")
//// } else {
//// // Print a message for non-.app files
//// printOS("Unsupported file type. Only .app files are accepted.")
//// }
// }
// }
// }
// return true
// }
// MARK: Background for whole app // MARK: Background for whole app
// .background(Color("bg").opacity(1)) // .background(Color("bg").opacity(1))
// .background(VisualEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all)) // .background(VisualEffect(material: .sidebar, blendingMode: .behindWindow).edgesIgnoringSafeArea(.all))
@@ -116,16 +86,31 @@ struct MiniEmptyView: View {
Spacer() Spacer()
DropTarget(appState: appState, locations: locations, showPopover: $showPopover) ZStack {
.frame(maxWidth: mini ? 300 : 500) LinearGradient(gradient: Gradient(colors: [.pink, .orange]), startPoint: .leading, endPoint: .trailing)
.mask(
Image(systemName: "plus.square.dashed")
.resizable()
.scaledToFit()
.frame(width: 150, height: 150)
.padding()
)
}
Text("Drop an app to begin")
// DropTarget(appState: appState, locations: locations, showPopover: $showPopover)
// .frame(maxWidth: mini ? 300 : 500)
Text("Drop your app here")
.font(.title3) .font(.title3)
.padding(.bottom, 25) .padding(.bottom, 25)
.opacity(0.5) .opacity(0.5)
Spacer() Spacer()
if appState.isReminderVisible { if appState.isReminderVisible {
Text("CMD + Z to undo") Text("CMD + Z to undo")
.font(.title2) .font(.title2)
@@ -143,6 +128,8 @@ struct MiniEmptyView: View {
Spacer() Spacer()
} }
Spacer()
} }
// .padding() // .padding()
+35 -41
View File
@@ -19,7 +19,7 @@ struct TopBar: View {
@EnvironmentObject var locations: Locations @EnvironmentObject var locations: Locations
var body: some View { var body: some View {
HStack(alignment: .center, spacing: 10) { HStack(alignment: .center, spacing: 0) {
Spacer() Spacer()
@@ -39,55 +39,49 @@ struct TopBar: View {
Spacer() Spacer()
if appState.currentView != .empty {//|| appState.currentView != .apps { HStack() {
Button("") { Spacer()
withAnimation(.easeInOut(duration: 0.5)) {
appState.currentView = .empty
appState.appInfo = AppInfo.empty
}
}
.buttonStyle(SimpleButtonStyle(icon: "plus.square.dashed", help: "Drop Target", color: Color("mode")))
} if appState.currentView != .zombie {
Button("") {
if appState.currentView != .zombie { withAnimation(.easeInOut(duration: 0.5)) {
Button("") { updateOnMain {
withAnimation(.easeInOut(duration: 0.5)) { if appState.zombieFile.fileSize.keys.count == 0 {
updateOnMain { appState.currentView = .zombie
if appState.zombieFile.fileSize.keys.count == 0 { appState.showProgress.toggle()
appState.currentView = .zombie showPopover.toggle()
appState.showProgress.toggle() reversePathsSearch(appState: appState, locations: locations)
showPopover.toggle() } else {
reversePathsSearch(appState: appState, locations: locations) appState.currentView = .zombie
} else { showPopover.toggle()
appState.currentView = .zombie }
showPopover.toggle()
} }
} }
} }
.buttonStyle(SimpleButtonStyle(icon: "clock.arrow.circlepath", help: "Leftover Files", color: Color("mode")))
} }
.buttonStyle(SimpleButtonStyle(icon: "clock.arrow.circlepath", help: "Leftover Files", color: Color("mode")))
// if appState.currentView != .empty || appState.currentView != .apps {
if appState.currentView == .files || appState.currentView == .zombie {
Button("") {
withAnimation(.easeInOut(duration: 0.5)) {
appState.currentView = .empty
appState.appInfo = AppInfo.empty
}
}
.buttonStyle(SimpleButtonStyle(icon: "plus.square.dashed", help: "Drop Target", color: Color("mode")))
}
} }
// Spacer()
// if sentinel {
// Button("") {
// //
// }
// .buttonStyle(SimpleButtonStyle(icon: "lock.shield", help: "Sentinel enabled", color: .green, shield: true))
// }
} }
.padding(.horizontal, 5) .padding(.horizontal, 10)
.padding(.top, 10) .padding(.top, 15)
} }
} }
+44 -60
View File
@@ -18,74 +18,15 @@ struct TopBarMini: View {
@EnvironmentObject var locations: Locations @EnvironmentObject var locations: Locations
var body: some View { var body: some View {
HStack(alignment: .center, spacing: 5) { HStack(alignment: .center, spacing: 0) {
Spacer() Spacer()
// if appState.currentView == .apps {
// Button("") {
// withAnimation(.easeInOut(duration: 0.5)) {
// // updateOnMain {
// appState.currentView = .empty
// appState.appInfo = AppInfo.empty
// showPopover = false
// // }
// }
// }
// .buttonStyle(SimpleButtonStyle(icon: "arrow.backward.square", help: "Back to Drop Zone", color: Color("mode")))
// } else
if appState.currentView == .empty { if appState.currentView == .empty {
Button("") {
withAnimation(.easeInOut(duration: 0.5)) {
// updateOnMain {
appState.currentView = .apps
// }
}
}
.buttonStyle(SimpleButtonStyle(icon: "list.dash", help: "Apps List", color: Color("mode")))
}
// else if appState.currentView == .files {
// Button("") {
// withAnimation(.easeInOut(duration: 0.5)) {
// // updateOnMain {
// appState.currentView = .empty
// appState.appInfo = AppInfo.empty
// // }
//
// }
// }
// .buttonStyle(SimpleButtonStyle(icon: "plus.square.dashed", help: "Drop Target", color: Color("mode")))
// Button("") {
// withAnimation(.easeInOut(duration: 0.5)) {
// // updateOnMain {
// appState.currentView = .apps
// // }
// }
// }
// .buttonStyle(SimpleButtonStyle(icon: "list.dash", help: "Apps List", color: Color("mode")))
// }
if appState.currentView != .empty {
HStack { HStack {
Spacer() Spacer()
// SearchBarMini(search: $search)
// .frame(width: 150)
// .offset(x: 20)
// .padding(.horizontal, 30)
// .padding(.top, 5)
Button("") {
withAnimation(.easeInOut(duration: 0.5)) {
// updateOnMain {
appState.currentView = .empty
appState.appInfo = AppInfo.empty
showPopover = false
// }
}
}
.buttonStyle(SimpleButtonStyle(icon: "plus.square.dashed", help: "Drop Target", color: Color("mode")))
Button("") { Button("") {
withAnimation(.easeInOut(duration: 0.5)) { withAnimation(.easeInOut(duration: 0.5)) {
showPopover = false showPopover = false
@@ -105,6 +46,49 @@ struct TopBarMini: View {
} }
.buttonStyle(SimpleButtonStyle(icon: "clock.arrow.circlepath", help: "Leftover Files", color: Color("mode"))) .buttonStyle(SimpleButtonStyle(icon: "clock.arrow.circlepath", help: "Leftover Files", color: Color("mode")))
Button("") {
withAnimation(.easeInOut(duration: 0.5)) {
appState.currentView = .apps
}
}
.buttonStyle(SimpleButtonStyle(icon: "square.grid.3x3.square", help: "Apps List", color: Color("mode")))
}
}
if appState.currentView != .empty {
HStack {
Spacer()
Button("") {
withAnimation(.easeInOut(duration: 0.5)) {
showPopover = false
updateOnMain {
if appState.zombieFile.fileSize.keys.count == 0 {
appState.currentView = .zombie
appState.showProgress.toggle()
showPopover.toggle()
reversePathsSearch(appState: appState, locations: locations)
} else {
appState.currentView = .zombie
showPopover.toggle()
}
}
}
}
.buttonStyle(SimpleButtonStyle(icon: "clock.arrow.circlepath", help: "Leftover Files", color: Color("mode")))
Button("") {
withAnimation(.easeInOut(duration: 0.5)) {
appState.currentView = .empty
appState.appInfo = AppInfo.empty
showPopover = false
}
}
.buttonStyle(SimpleButtonStyle(icon: "plus.square.dashed", help: "Drop Target", color: Color("mode")))
} }
} }