diff --git a/Pearcleaner/Settings/Interface.swift b/Pearcleaner/Settings/Interface.swift index 46cd947..bf9f980 100644 --- a/Pearcleaner/Settings/Interface.swift +++ b/Pearcleaner/Settings/Interface.swift @@ -158,7 +158,7 @@ struct InterfaceSettingsTab: View { }) .toggleStyle(.switch) .disabled(menubarEnabled) - .help(menubarEnabled ? String(localized: "Disabled when menubar icon is enabled") : String(localized: "")) + .help(menubarEnabled ? String(localized: "Disabled when menubar icon is enabled") : "") .onChange(of: mini) { newVal in if mini { appState.currentView = miniView ? .apps : .empty diff --git a/Pearcleaner/Settings/SettingsWindow.swift b/Pearcleaner/Settings/SettingsWindow.swift index 1baae02..aca9e7c 100644 --- a/Pearcleaner/Settings/SettingsWindow.swift +++ b/Pearcleaner/Settings/SettingsWindow.swift @@ -28,7 +28,7 @@ struct SettingsView: View { detailView } } - .navigationTitle("") + .navigationTitle(Text(verbatim: "")) .frame(width: 750, height: 620) } diff --git a/Pearcleaner/Views/AppsListView.swift b/Pearcleaner/Views/AppsListView.swift index 853d363..f97cd28 100644 --- a/Pearcleaner/Views/AppsListView.swift +++ b/Pearcleaner/Views/AppsListView.swift @@ -82,9 +82,9 @@ struct Header: View { var body: some View { HStack { - Text("\(title)").foregroundStyle(.primary).opacity(0.5) + Text(verbatim: "\(title)").foregroundStyle(.primary).opacity(0.5) - Text("\(count)") + Text(verbatim: "\(count)") .font(.system(size: 10)) .monospacedDigit() .frame(minWidth: count > 99 ? 30 : 24, minHeight: 17) diff --git a/Pearcleaner/Views/FilesView.swift b/Pearcleaner/Views/FilesView.swift index 37ac450..97c75f4 100644 --- a/Pearcleaner/Views/FilesView.swift +++ b/Pearcleaner/Views/FilesView.swift @@ -109,19 +109,19 @@ struct FilesView: View { } VStack(alignment: .leading) { HStack(alignment: .center) { - Text("\(appState.appInfo.appName)").font(.title).fontWeight(.bold).lineLimit(1) + Text(verbatim: "\(appState.appInfo.appName)").font(.title).fontWeight(.bold).lineLimit(1) Image(systemName: "circle.fill").foregroundStyle(Color("AccentColor")).font(.system(size: 5)) - Text("\(appState.appInfo.appVersion)").font(.title3) + Text(verbatim: "\(appState.appInfo.appVersion)").font(.title3) } - Text("\(appState.appInfo.bundleIdentifier)") + Text(verbatim: "\(appState.appInfo.bundleIdentifier)") .lineLimit(1) .font(.title3) .foregroundStyle((.primary.opacity(0.5))) } Spacer() - Button("\(detailsEnabled ? String(localized: "Hide Details") : String(localized: "Show Details"))") { + Button(detailsEnabled ? "Hide Details" : "Show Details") { withAnimation(Animation.easeInOut(duration: animationEnabled ? 0.35 : 0)) { detailsEnabled.toggle() } @@ -135,7 +135,7 @@ struct FilesView: View { VStack(alignment: .leading, spacing: 5) { Text("Total size of files:") .font(.callout).fontWeight(.bold) - Text("") + Text(verbatim: "") .font(.footnote) Text("Installed Date:") .font(.footnote) @@ -147,9 +147,9 @@ struct FilesView: View { } Spacer() VStack(alignment: .trailing, spacing: 5) { - Text("\(displaySizeTotal)").font(.callout).fontWeight(.bold)//.help("Total size on disk") + Text(verbatim: "\(displaySizeTotal)").font(.callout).fontWeight(.bold)//.help("Total size on disk") - Text("\(appState.appInfo.fileSize.count == 1 ? "\(appState.selectedItems.count) \(String(localized: "of")) \(appState.appInfo.fileSize.count) \(String(localized: "item"))" : "\(appState.selectedItems.count) \(String(localized: "of")) \(appState.appInfo.fileSize.count) \(String(localized: "items"))")") + Text(verbatim: "\(appState.appInfo.fileSize.count == 1 ? "\(appState.selectedItems.count) \(String(localized: "of")) \(appState.appInfo.fileSize.count) \(String(localized: "item"))" : "\(appState.selectedItems.count) \(String(localized: "of")) \(appState.appInfo.fileSize.count) \(String(localized: "items"))")") .font(.footnote) if let creationDate = appState.appInfo.creationDate { @@ -341,7 +341,7 @@ struct FilesView: View { // .padding(.top) - Button("\(sizeType == "Logical" ? totalSelectedSize.logical : totalSelectedSize.real)") { + Button { showCustomAlert(enabled: confirmAlert, title: String(localized: "Warning"), message: String(localized: "Are you sure you want to remove these files?"), style: .warning, onOk: { Task { @@ -419,8 +419,8 @@ struct FilesView: View { } }) - - + } label: { + Text(verbatim: "\(sizeType == "Logical" ? totalSelectedSize.logical : totalSelectedSize.real)") } .buttonStyle(UninstallButton(isEnabled: !appState.selectedItems.isEmpty)) .disabled(appState.selectedItems.isEmpty) @@ -555,7 +555,7 @@ struct FileDetailsItem: View { let displaySize = sizeType == "Real" ? formatByte(size: size!).human : formatByte(size: sizeL!).human - Text("\(displaySize)") + Text(verbatim: "\(displaySize)") } .contextMenu { diff --git a/Pearcleaner/Views/ZombieView.swift b/Pearcleaner/Views/ZombieView.swift index 546728f..7d32ca0 100644 --- a/Pearcleaner/Views/ZombieView.swift +++ b/Pearcleaner/Views/ZombieView.swift @@ -105,14 +105,14 @@ struct ZombieView: View { VStack(alignment: .leading, spacing: 5) { Text("Total size of files:") .font(.callout).fontWeight(.bold) - Text("") + Text(verbatim: "") .font(.footnote) } Spacer() VStack(alignment: .trailing, spacing: 5) { - Text("\(displaySizeTotal)").font(.callout).fontWeight(.bold)//.help("Total size on disk") + Text(verbatim: "\(displaySizeTotal)").font(.callout).fontWeight(.bold)//.help("Total size on disk") - Text("\(selectedZombieItemsLocal.count) \(String(localized: "of")) \(searchZ.isEmpty ? appState.zombieFile.fileSize.count : memoizedFiles.count) \(appState.zombieFile.fileSize.count == 1 ? "\(String(localized: "item"))" : "\(String(localized: "items"))")") + Text(verbatim: "\(selectedZombieItemsLocal.count) \(String(localized: "of")) \(searchZ.isEmpty ? appState.zombieFile.fileSize.count : memoizedFiles.count) \(appState.zombieFile.fileSize.count == 1 ? "\(String(localized: "item"))" : "\(String(localized: "items"))")") .font(.footnote).foregroundStyle(.secondary) } @@ -218,7 +218,7 @@ struct ZombieView: View { } .buttonStyle(RescanButton()) - Button("\(sizeType == "Logical" ? totalLogicalSizeUninstallBtn : totalRealSizeUninstallBtn)") { + Button { showCustomAlert(enabled: confirmAlert, title: String(localized: "Warning"), message: String(localized: "Are you sure you want to remove these files?"), style: .warning, onOk: { Task { @@ -264,7 +264,7 @@ struct ZombieView: View { }) - } + } label: { Text(verbatim: "\(sizeType == "Logical" ? totalLogicalSizeUninstallBtn : totalRealSizeUninstallBtn)") } .buttonStyle(UninstallButton(isEnabled: !selectedZombieItemsLocal.isEmpty)) .disabled(selectedZombieItemsLocal.isEmpty) @@ -486,7 +486,7 @@ struct ZombieFileDetailsItem: View { let displaySize = sizeType == "Real" ? formatByte(size: size!).human : formatByte(size: sizeL!).human - Text("\(displaySize)") + Text(verbatim: "\(displaySize)") } .contextMenu {