mirror of
https://github.com/exituser/Pearcleaner.git
synced 2026-09-17 09:38:51 +00:00
v2.0
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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()
|
||||||
|
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
|
||||||
|
appState.reload.toggle()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
Text("Refresh Apps")
|
Text("Refresh Apps")
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)) {
|
||||||
|
|||||||
@@ -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,12 +135,17 @@ struct AnimatedSearchStyle: TextFieldStyle {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
Image(systemName: "magnifyingglass")
|
Image(systemName: "magnifyingglass")
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.frame(width: 18, height: 18)
|
.frame(width: 18, height: 18)
|
||||||
.foregroundColor(isHovered ? Color("mode") : Color("mode").opacity(0.5))
|
.foregroundColor(isHovered ? Color("mode") : Color("mode").opacity(0.5))
|
||||||
}
|
}
|
||||||
|
.frame(width: 150)
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.padding(8)
|
.padding(8)
|
||||||
.overlay(
|
.overlay(
|
||||||
@@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user