This commit is contained in:
Alin
2023-12-15 15:12:17 -07:00
parent 3422e7750c
commit abd36709f2
14 changed files with 64 additions and 54 deletions
+11 -5
View File
@@ -286,7 +286,7 @@
attributes = { attributes = {
BuildIndependentTargetsInParallel = 1; BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1500; LastSwiftUpdateCheck = 1500;
LastUpgradeCheck = 1500; LastUpgradeCheck = 1510;
TargetAttributes = { TargetAttributes = {
C728930E2AFD51EA00C8C1CD = { C728930E2AFD51EA00C8C1CD = {
CreatedOnToolsVersion = 15.0.1; CreatedOnToolsVersion = 15.0.1;
@@ -380,6 +380,7 @@
CODE_SIGN_ENTITLEMENTS = PearcleanerSentinel/PearcleanerSentinel.entitlements; CODE_SIGN_ENTITLEMENTS = PearcleanerSentinel/PearcleanerSentinel.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = BK8443AXLU; DEVELOPMENT_TEAM = BK8443AXLU;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
@@ -396,6 +397,7 @@
CODE_SIGN_ENTITLEMENTS = PearcleanerSentinel/PearcleanerSentinel.entitlements; CODE_SIGN_ENTITLEMENTS = PearcleanerSentinel/PearcleanerSentinel.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = BK8443AXLU; DEVELOPMENT_TEAM = BK8443AXLU;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
@@ -441,6 +443,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_ENTITLEMENTS = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES; ENABLE_TESTABILITY = YES;
@@ -505,6 +508,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_ENTITLEMENTS = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO; ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -535,7 +539,8 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 11;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BK8443AXLU; DEVELOPMENT_TEAM = BK8443AXLU;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
@@ -552,7 +557,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.9; MARKETING_VERSION = 2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Pearcleaner; PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Pearcleaner;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
@@ -569,7 +574,8 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES; COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 10; CURRENT_PROJECT_VERSION = 11;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BK8443AXLU; DEVELOPMENT_TEAM = BK8443AXLU;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
@@ -586,7 +592,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.9; MARKETING_VERSION = 2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Pearcleaner; PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Pearcleaner;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1500" LastUpgradeVersion = "1510"
version = "1.7"> version = "1.7">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1500" LastUpgradeVersion = "1510"
version = "1.7"> version = "1.7">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
+8 -4
View File
@@ -10,11 +10,11 @@ import SwiftUI
struct AppCommands: Commands { struct AppCommands: Commands {
let appState: AppState let appState: AppState
init(appState: AppState) { init(appState: AppState) {
self.appState = appState self.appState = appState
} }
var body: some Commands { var body: some Commands {
// Pearcleaner Menu // Pearcleaner Menu
@@ -30,9 +30,13 @@ struct AppCommands: Commands {
Button { Button {
withAnimation(.easeInOut(duration: 0.5)) { withAnimation(.easeInOut(duration: 0.5)) {
// Refresh Apps list // Refresh Apps list
appState.reload.toggle()
let sortedApps = getSortedApps() let sortedApps = getSortedApps()
appState.sortedApps.userApps = sortedApps.userApps DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
appState.sortedApps.systemApps = sortedApps.systemApps appState.sortedApps.userApps = sortedApps.userApps
appState.sortedApps.systemApps = sortedApps.systemApps
appState.reload.toggle()
}
} }
} label: { } label: {
Text("Refresh Apps") Text("Refresh Apps")
+1
View File
@@ -26,6 +26,7 @@ class AppState: ObservableObject
@Published var isReminderVisible: Bool = false @Published var isReminderVisible: Bool = false
@Published var releases = [Release]() @Published var releases = [Release]()
@Published var progressBar: (String, Double) = ("Ready", 0.0) @Published var progressBar: (String, Double) = ("Ready", 0.0)
@Published var reload: Bool = false
//Window //Window
+9 -8
View File
@@ -269,13 +269,13 @@ func findPathsForApp(appState: AppState, appInfo: AppInfo) {
let dispatchGroup = DispatchGroup() let dispatchGroup = DispatchGroup()
let bundleComponents = appInfo.bundleIdentifier.components(separatedBy: ".") let bundleComponents = appInfo.bundleIdentifier.components(separatedBy: ".")
var bundle: String = "" var bundle: String = ""
var weirdFormatBundle: Bool = false // var weirdFormatBundle: Bool = false
if bundleComponents.count >= 3 { // get last 2 or middle 2 components if bundleComponents.count >= 3 { // get last 2 or middle 2 components
bundle = bundleComponents[1...2].joined(separator: "").lowercased() bundle = bundleComponents[1...2].joined(separator: "").lowercased()
} }
if bundleComponents[0] != "com" { // if bundleComponents[0] != "com" {
weirdFormatBundle = true // weirdFormatBundle = true
} // }
let nameL = appInfo.appName.pearFormat() let nameL = appInfo.appName.pearFormat()
let bundleIdentifierL = appInfo.bundleIdentifier.pearFormat() let bundleIdentifierL = appInfo.bundleIdentifier.pearFormat()
let locations = Locations() let locations = Locations()
@@ -319,11 +319,12 @@ func findPathsForApp(appState: AppState, appInfo: AppInfo) {
if itemL.contains(bundle) || itemL.contains(bundleIdentifierL) || (nameL.count > 4 && itemL.contains(nameL)) { if itemL.contains(bundle) || itemL.contains(bundleIdentifierL) || (nameL.count > 4 && itemL.contains(nameL)) {
collection.append(itemURL) collection.append(itemURL)
} }
// This causes too many issues, disabling this filter for now /////////////////////////////////
// Catch Logitech files since Logi is part of word login and can return random files // Catch Logitech files since Logi is part of word login and can return random files
} else if itemL.contains("logi") && !itemL.contains("login") { // } else if itemL.contains("logi") && !itemL.contains("login") {
if itemL.contains(bundleComponents[weirdFormatBundle ? 0 : 1]) || itemL.contains(bundle) || itemL.contains(bundleIdentifierL) || (nameL.count > 3 && itemL.contains(nameL)) { // if itemL.contains(bundleComponents[weirdFormatBundle ? 0 : 1]) || itemL.contains(bundle) || itemL.contains(bundleIdentifierL) || (nameL.count > 3 && itemL.contains(nameL)) {
collection.append(itemURL) // collection.append(itemURL)
} // }
// Catch MS Office files since they have many random folder names and very short names // Catch MS Office files since they have many random folder names and very short names
} else if itemL.contains("office") || itemL.contains("oneauth") || itemL.suffix(2).contains("ms") || itemL.contains("onenote") { } else if itemL.contains("office") || itemL.contains("oneauth") || itemL.suffix(2).contains("ms") || itemL.contains("onenote") {
if itemL.contains(bundle) || itemL.contains(bundleIdentifierL) || (nameL.count > 4 && itemL.contains(nameL)) { if itemL.contains(bundle) || itemL.contains(bundleIdentifierL) || (nameL.count > 4 && itemL.contains(nameL)) {
+17 -11
View File
@@ -78,8 +78,8 @@ struct LabeledDivider: View {
struct AnimatedSearchStyle: TextFieldStyle { struct AnimatedSearchStyle: TextFieldStyle {
@State private var isHovered = false @State private var isHovered = false
@FocusState private var isFocused: Bool
@Binding var text: String @Binding var text: String
@Binding var reload: Bool
@EnvironmentObject var appState: AppState @EnvironmentObject var appState: AppState
func _body(configuration: TextField<Self._Label>) -> some View { func _body(configuration: TextField<Self._Label>) -> some View {
@@ -105,12 +105,12 @@ struct AnimatedSearchStyle: TextFieldStyle {
.onTapGesture { .onTapGesture {
withAnimation { withAnimation {
// Refresh Apps list // Refresh Apps list
reload.toggle() appState.reload.toggle()
let sortedApps = getSortedApps() let sortedApps = getSortedApps()
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
appState.sortedApps.userApps = sortedApps.userApps appState.sortedApps.userApps = sortedApps.userApps
appState.sortedApps.systemApps = sortedApps.systemApps appState.sortedApps.systemApps = sortedApps.systemApps
reload.toggle() appState.reload.toggle()
} }
} }
@@ -135,11 +135,16 @@ struct AnimatedSearchStyle: TextFieldStyle {
} else { } else {
Image(systemName: "magnifyingglass") HStack {
.resizable() Spacer()
.scaledToFit() Image(systemName: "magnifyingglass")
.frame(width: 18, height: 18) .resizable()
.foregroundColor(isHovered ? Color("mode") : Color("mode").opacity(0.5)) .scaledToFit()
.frame(width: 18, height: 18)
.foregroundColor(isHovered ? Color("mode") : Color("mode").opacity(0.5))
}
.frame(width: 150)
} }
} }
.padding(8) .padding(8)
@@ -156,8 +161,10 @@ struct AnimatedSearchStyle: TextFieldStyle {
.onHover { hovering in .onHover { hovering in
withAnimation(Animation.easeInOut(duration: 0.4)) { withAnimation(Animation.easeInOut(duration: 0.4)) {
self.isHovered = hovering self.isHovered = hovering
self.isFocused = hovering
} }
} }
.focused($isFocused)
} }
} }
@@ -168,7 +175,6 @@ struct SimpleSearchStyle: TextFieldStyle {
@State private var isHovered = false @State private var isHovered = false
@State var icon: Image? @State var icon: Image?
@State var trash: Bool = false @State var trash: Bool = false
@Binding var reload: Bool
@Binding var text: String @Binding var text: String
@EnvironmentObject var appState: AppState @EnvironmentObject var appState: AppState
@AppStorage("settings.general.mini") private var mini: Bool = false @AppStorage("settings.general.mini") private var mini: Bool = false
@@ -198,12 +204,12 @@ struct SimpleSearchStyle: TextFieldStyle {
.onTapGesture { .onTapGesture {
withAnimation { withAnimation {
// Refresh Apps list // Refresh Apps list
reload.toggle() appState.reload.toggle()
let sortedApps = getSortedApps() let sortedApps = getSortedApps()
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
appState.sortedApps.userApps = sortedApps.userApps appState.sortedApps.userApps = sortedApps.userApps
appState.sortedApps.systemApps = sortedApps.systemApps appState.sortedApps.systemApps = sortedApps.systemApps
reload.toggle() appState.reload.toggle()
} }
} }
+1 -1
View File
@@ -20,7 +20,7 @@ struct PearcleanerApp: App {
@AppStorage("settings.general.mini") private var mini: Bool = false @AppStorage("settings.general.mini") private var mini: Bool = false
@State private var search = "" @State private var search = ""
@State private var showPopover: Bool = false @State private var showPopover: Bool = false
var body: some Scene { var body: some Scene {
WindowGroup { WindowGroup {
+1 -1
View File
@@ -99,7 +99,7 @@ struct GeneralSettingsTab: View {
.onChange(of: mini) { newVal in .onChange(of: mini) { newVal in
resizeWindow(width: 300, height: 300) resizeWindow(width: 300, height: 300)
if mini { if mini {
appState.currentView = .apps appState.currentView = .empty
} else { } else {
if appState.appInfo.appName.isEmpty { if appState.appInfo.appName.isEmpty {
appState.currentView = .empty appState.currentView = .empty
+1 -2
View File
@@ -10,7 +10,6 @@ import SwiftUI
struct AppListItems: View { struct AppListItems: View {
@EnvironmentObject var appState: AppState @EnvironmentObject var appState: AppState
// @Binding var reload: Bool
@Binding var search: String @Binding var search: String
@State private var isHovered = false @State private var isHovered = false
@Environment(\.colorScheme) var colorScheme @Environment(\.colorScheme) var colorScheme
@@ -67,7 +66,7 @@ struct AppListItems: View {
if isHovered || isSelected { if isHovered || isSelected {
RoundedRectangle(cornerRadius: 50) RoundedRectangle(cornerRadius: 50)
.fill(isSelected ? Color("AccentColor") : Color("mode").opacity(0.5)) .fill(isSelected ? Color("AccentColor") : Color("mode").opacity(0.5))
.frame(width: isSelected ? 4 : 2, height: 35) .frame(width: isSelected ? 4 : 2, height: 30)
.padding(.leading, 5) .padding(.leading, 5)
.offset(x: 20) .offset(x: 20)
} }
+5 -7
View File
@@ -15,7 +15,6 @@ struct AppListView: View {
@State private var showSys: Bool = true @State private var showSys: Bool = true
@State private var showUsr: Bool = true @State private var showUsr: Bool = true
// @State private var sidebar: Bool = true // @State private var sidebar: Bool = true
@State private var reload: Bool = false
@Binding var showPopover: Bool @Binding var showPopover: Bool
var filteredUserApps: [AppInfo] { var filteredUserApps: [AppInfo] {
@@ -42,7 +41,7 @@ struct AppListView: View {
ZStack { ZStack {
HStack(spacing: 0){ HStack(spacing: 0){
if reload { if appState.reload {
VStack { VStack {
Spacer() Spacer()
ProgressView("Refreshing applications") ProgressView("Refreshing applications")
@@ -55,7 +54,7 @@ struct AppListView: View {
VStack(alignment: .center, spacing: 20) { VStack(alignment: .center, spacing: 20) {
HStack { HStack {
SearchBar(search: $search, reload: $reload) SearchBar(search: $search)
// Button("") { // Button("") {
// withAnimation(.easeInOut(duration: 0.5)) { // withAnimation(.easeInOut(duration: 0.5)) {
@@ -132,10 +131,10 @@ struct AppListView: View {
// Details View // Details View
VStack(spacing: 0) { VStack(spacing: 0) {
if appState.currentView == .empty { if appState.currentView == .empty {
TopBar(reload: $reload) TopBar()
AppDetailsEmptyView(showPopover: $showPopover) AppDetailsEmptyView(showPopover: $showPopover)
} else if appState.currentView == .files { } else if appState.currentView == .files {
TopBar(reload: $reload) TopBar()
FilesView(showPopover: $showPopover, search: $search) FilesView(showPopover: $showPopover, search: $search)
.id(appState.appInfo.id) .id(appState.appInfo.id)
} }
@@ -221,12 +220,11 @@ struct AppDetailsEmptyView: View {
struct SearchBar: View { struct SearchBar: View {
@Binding var search: String @Binding var search: String
@Binding var reload: Bool
var body: some View { var body: some View {
HStack { HStack {
TextField("Search", text: $search) TextField("Search", text: $search)
.textFieldStyle(SimpleSearchStyle(icon: Image(systemName: "magnifyingglass"),trash: true, reload: $reload, text: $search)) .textFieldStyle(SimpleSearchStyle(icon: Image(systemName: "magnifyingglass"),trash: true, text: $search))
} }
.frame(height: 30) .frame(height: 30)
} }
+5 -7
View File
@@ -14,7 +14,6 @@ struct MiniMode: View {
@Binding var search: String @Binding var search: String
@State private var showSys: Bool = true @State private var showSys: Bool = true
@State private var showUsr: Bool = true @State private var showUsr: Bool = true
@State private var reload: Bool = false
@AppStorage("settings.general.glass") private var glass: Bool = false @AppStorage("settings.general.glass") private var glass: Bool = false
@Binding var showPopover: Bool @Binding var showPopover: Bool
@@ -26,15 +25,15 @@ struct MiniMode: View {
// Main Mini View // Main Mini View
VStack(spacing: 0) { VStack(spacing: 0) {
if appState.currentView == .empty { if appState.currentView == .empty {
TopBarMini(reload: $reload, search: $search) TopBarMini(search: $search)
MiniEmptyView(showPopover: $showPopover) MiniEmptyView(showPopover: $showPopover)
} else if appState.currentView == .files { } else if appState.currentView == .files {
TopBarMini(reload: $reload, search: $search) TopBarMini(search: $search)
FilesView(showPopover: $showPopover, search: $search) FilesView(showPopover: $showPopover, search: $search)
.id(appState.appInfo.id) .id(appState.appInfo.id)
} else if appState.currentView == .apps { } else if appState.currentView == .apps {
TopBarMini(reload: $reload, search: $search) TopBarMini(search: $search)
MiniAppView(search: $search, reload: $reload, showPopover: $showPopover) MiniAppView(search: $search, showPopover: $showPopover)
} }
} }
// .padding(.leading, appState.sidebar ? 0 : 10) // .padding(.leading, appState.sidebar ? 0 : 10)
@@ -149,7 +148,6 @@ struct MiniAppView: View {
@Binding var search: String @Binding var search: String
@State private var showSys: Bool = true @State private var showSys: Bool = true
@State private var showUsr: Bool = true @State private var showUsr: Bool = true
@Binding var reload: Bool
@AppStorage("settings.general.mini") private var mini: Bool = false @AppStorage("settings.general.mini") private var mini: Bool = false
@Binding var showPopover: Bool @Binding var showPopover: Bool
@@ -174,7 +172,7 @@ struct MiniAppView: View {
ZStack { ZStack {
HStack(spacing: 0){ HStack(spacing: 0){
if reload { if appState.reload {
VStack { VStack {
Spacer() Spacer()
ProgressView("Refreshing applications") ProgressView("Refreshing applications")
-1
View File
@@ -10,7 +10,6 @@ import SwiftUI
struct TopBar: View { struct TopBar: View {
// @Binding var sidebar: Bool // @Binding var sidebar: Bool
@Binding var reload: Bool
@AppStorage("displayMode") var displayMode: DisplayMode = .system @AppStorage("displayMode") var displayMode: DisplayMode = .system
@AppStorage("settings.general.glass") private var glass: Bool = false @AppStorage("settings.general.glass") private var glass: Bool = false
@AppStorage("settings.sentinel.enable") private var sentinel: Bool = false @AppStorage("settings.sentinel.enable") private var sentinel: Bool = false
+3 -5
View File
@@ -9,7 +9,6 @@ import Foundation
import SwiftUI import SwiftUI
struct TopBarMini: View { struct TopBarMini: View {
@Binding var reload: Bool
@AppStorage("displayMode") var displayMode: DisplayMode = .system @AppStorage("displayMode") var displayMode: DisplayMode = .system
@AppStorage("settings.sentinel.enable") private var sentinel: Bool = false @AppStorage("settings.sentinel.enable") private var sentinel: Bool = false
@AppStorage("settings.general.mini") private var mini: Bool = false @AppStorage("settings.general.mini") private var mini: Bool = false
@@ -25,7 +24,7 @@ struct TopBarMini: View {
// HStack { // HStack {
// Spacer() // Spacer()
SearchBarMini(search: $search, reload: $reload) SearchBarMini(search: $search)
// .frame(width: 150) // .frame(width: 150)
// .offset(x: 20) // .offset(x: 20)
// .padding(.horizontal, 30) // .padding(.horizontal, 30)
@@ -102,12 +101,11 @@ struct TopBarMini: View {
struct SearchBarMini: View { struct SearchBarMini: View {
@Binding var search: String @Binding var search: String
@Binding var reload: Bool
var body: some View { var body: some View {
HStack { HStack {
TextField("Search", text: $search) TextField("Search", text: $search)
.textFieldStyle(AnimatedSearchStyle(text: $search, reload: $reload)) .textFieldStyle(AnimatedSearchStyle(text: $search))
// .textFieldStyle(SimpleSearchStyle(trash: true, reload: $reload, text: $search)) // .textFieldStyle(SimpleSearchStyle(trash: true, reload: $reload, text: $search))
} }
// .frame(height: 20) // .frame(height: 20)