mirror of
https://github.com/X1a0He/Adobe-Downloader.git
synced 2025-11-25 03:14:57 +08:00
feat: 垃圾 SMAppService 赶紧滚,回退 SMJobBless Helper
This commit is contained in:
@@ -11,7 +11,7 @@ struct CleanConfigView: View {
|
||||
@State private var showAlert = false
|
||||
@State private var alertMessage = ""
|
||||
@State private var chipInfo: String = ""
|
||||
@State private var helperStatus: ModernPrivilegedHelperManager.HelperStatus = .notInstalled
|
||||
@State private var helperStatus: PrivilegedHelperAdapter.HelperStatus = .noFound
|
||||
|
||||
private func getChipInfo() -> String {
|
||||
var size = 0
|
||||
@@ -85,7 +85,9 @@ struct CleanConfigView: View {
|
||||
chipInfo = getChipInfo()
|
||||
}
|
||||
.task {
|
||||
helperStatus = await ModernPrivilegedHelperManager.shared.getHelperStatus()
|
||||
PrivilegedHelperAdapter.shared.getHelperStatus { status in
|
||||
helperStatus = status
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +110,7 @@ struct CleanConfigView: View {
|
||||
ofItemAtPath: scriptURL.path)
|
||||
|
||||
if helperStatus == .installed {
|
||||
ModernPrivilegedHelperManager.shared.executeCommand("open -a Terminal \(scriptURL.path)") { output in
|
||||
PrivilegedHelperAdapter.shared.executeCommand("open -a Terminal \(scriptURL.path)") { output in
|
||||
if output.starts(with: "Error") {
|
||||
alertMessage = String(localized: "清空配置失败: \(output)")
|
||||
showAlert = true
|
||||
|
||||
Reference in New Issue
Block a user