fix: temp remove swiftlint for ci fail
This commit is contained in:
parent
af2b28163f
commit
dd5143bea8
@ -1,28 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.7">
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<PreActions>
|
||||
<ExecutionAction
|
||||
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
|
||||
<ActionContent
|
||||
title = "Run Script"
|
||||
scriptText = "export PATH="$PATH:/opt/homebrew/bin" if which swiftlint > /dev/null; then cd $PROJECT_DIR && swiftlint --fix && swiftlint else echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" fi ">
|
||||
<EnvironmentBuildable>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "49CF3B1C20CD7463001EBF94"
|
||||
BuildableName = "ClashX.app"
|
||||
BlueprintName = "ClashX"
|
||||
ReferencedContainer = "container:ClashX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</EnvironmentBuildable>
|
||||
</ActionContent>
|
||||
</ExecutionAction>
|
||||
</PreActions>
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
|
@ -153,7 +153,7 @@ class PrivilegedHelperManager {
|
||||
case needUpdate
|
||||
}
|
||||
|
||||
private func getHelperStatus(callback:@escaping ((HelperStatus) -> Void)) {
|
||||
private func getHelperStatus(callback: @escaping ((HelperStatus) -> Void)) {
|
||||
var called = false
|
||||
let reply: ((HelperStatus) -> Void) = {
|
||||
status in
|
||||
@ -279,7 +279,6 @@ private enum DaemonInstallResult {
|
||||
case kSMErrorToolNotValid: return "blessError: kSMErrorToolNotValid"
|
||||
case kSMErrorJobNotFound: return "blessError: kSMErrorJobNotFound"
|
||||
case kSMErrorServiceUnavailable: return "blessError: kSMErrorServiceUnavailable"
|
||||
case kSMErrorJobNotFound: return "blessError: kSMErrorJobNotFound"
|
||||
case kSMErrorJobMustBeEnabled: return "ClashX Helper is disabled by other process. Please run \"sudo launchctl enable system/\(PrivilegedHelperManager.machServiceName)\" in your terminal. The command has been copied to your pasteboard"
|
||||
case kSMErrorInvalidPlist: return "blessError: kSMErrorInvalidPlist"
|
||||
default:
|
||||
|
@ -9,16 +9,16 @@
|
||||
import Foundation
|
||||
enum Settings {
|
||||
@UserDefault("mmdbDownloadUrl", defaultValue: "")
|
||||
static var mmdbDownloadUrl:String
|
||||
static var mmdbDownloadUrl: String
|
||||
|
||||
@UserDefault("filterInterface", defaultValue: true)
|
||||
static var filterInterface:Bool
|
||||
static var filterInterface: Bool
|
||||
|
||||
@UserDefault("disableNoti", defaultValue: false)
|
||||
static var disableNoti:Bool
|
||||
static var disableNoti: Bool
|
||||
|
||||
@UserDefault("usePacMode", defaultValue: false)
|
||||
static var usePacMode:Bool
|
||||
static var usePacMode: Bool
|
||||
|
||||
@UserDefault("configAutoUpdateInterval", defaultValue: 48*60*60)
|
||||
static var configAutoUpdateInterval: TimeInterval
|
||||
|
@ -78,7 +78,7 @@ class NetworkChangeNotifier {
|
||||
return (httpProxy, httpsProxy, socksProxy)
|
||||
}
|
||||
|
||||
static func isCurrentSystemSetToClash(looser:Bool = false) -> Bool {
|
||||
static func isCurrentSystemSetToClash(looser: Bool = false) -> Bool {
|
||||
let (http, https, socks) = NetworkChangeNotifier.currentSystemProxySetting()
|
||||
let currentPort = ConfigManager.shared.currentConfig?.usedHttpPort ?? 0
|
||||
let currentSocks = ConfigManager.shared.currentConfig?.usedSocksPort ?? 0
|
||||
@ -99,7 +99,7 @@ class NetworkChangeNotifier {
|
||||
let sets = SCPreferencesGetValue(prefRef, kSCPrefNetworkServices) {
|
||||
for key in sets.allKeys {
|
||||
let dict = sets[key] as? NSDictionary
|
||||
let proxySettings = dict?["Proxies"] as? [String:Any]
|
||||
let proxySettings = dict?["Proxies"] as? [String: Any]
|
||||
if currentPort != nil {
|
||||
if proxySettings?[kCFNetworkProxiesHTTPPort as String] as? Int == currentPort ||
|
||||
proxySettings?[kCFNetworkProxiesHTTPSPort as String] as? Int == currentPort {
|
||||
|
@ -69,7 +69,7 @@ public final class LoginServiceKit {
|
||||
guard isExistLoginItems(at: path) == false else {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
if #available(macOS 13.0, *) {
|
||||
do {
|
||||
try SMAppService.mainApp.register()
|
||||
@ -79,7 +79,7 @@ public final class LoginServiceKit {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
guard let (list, _) = snapshot else {
|
||||
return false
|
||||
}
|
||||
@ -93,7 +93,7 @@ public final class LoginServiceKit {
|
||||
guard isExistLoginItems(at: path) == true else {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
if #available(macOS 13.0, *) {
|
||||
do {
|
||||
try SMAppService.mainApp.unregister()
|
||||
|
@ -202,7 +202,7 @@ class CustomWKWebView: WKWebView {
|
||||
var dragableAreaHeight: CGFloat = 30
|
||||
let alwaysDragableLeftAreaWidth: CGFloat = 150
|
||||
|
||||
private func isInDargArea(with event:NSEvent?) -> Bool {
|
||||
private func isInDargArea(with event: NSEvent?) -> Bool {
|
||||
guard let event = event else { return false }
|
||||
let x = event.locationInWindow.x
|
||||
let y = (window?.frame.size.height ?? 0) - event.locationInWindow.y
|
||||
|
@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
@available(macOS 10.15, *)
|
||||
class NewStatusMenuView:NSHostingView<SwiftUIView>, StatusItemViewProtocol {
|
||||
class NewStatusMenuView: NSHostingView<SwiftUIView>, StatusItemViewProtocol {
|
||||
private var viewModel: StatusMenuViewModel!
|
||||
|
||||
static func create(on button: NSView) -> NewStatusMenuView {
|
||||
@ -45,7 +45,7 @@ class NewStatusMenuView:NSHostingView<SwiftUIView>, StatusItemViewProtocol {
|
||||
}
|
||||
|
||||
@available(macOS 10.15, *)
|
||||
class StatusMenuViewModel:ObservableObject {
|
||||
class StatusMenuViewModel: ObservableObject {
|
||||
@Published var image = StatusItemTool.getMenuImage(enableProxy: false)
|
||||
@Published var upSpeed = "0KB/s"
|
||||
@Published var downSpeed = "0KB/s"
|
||||
@ -56,7 +56,7 @@ class StatusMenuViewModel:ObservableObject {
|
||||
struct SwiftUIView: View {
|
||||
@ObservedObject var viewModel: StatusMenuViewModel
|
||||
var body: some View {
|
||||
HStack(alignment:.center) {
|
||||
HStack(alignment: .center) {
|
||||
Image(nsImage: $viewModel.image.wrappedValue).renderingMode(.template)
|
||||
if $viewModel.showSpeed.wrappedValue {
|
||||
Spacer(minLength: 0)
|
||||
|
Loading…
Reference in New Issue
Block a user