Skip to content

Commit

Permalink
misc: add setting interface
Browse files Browse the repository at this point in the history
  • Loading branch information
yichengchen committed Nov 20, 2022
1 parent 2b37be7 commit 3c86163
Show file tree
Hide file tree
Showing 16 changed files with 373 additions and 87 deletions.
16 changes: 16 additions & 0 deletions ClashX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
4982F51F2344A216008804B0 /* Cgo+Convert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4982F51E2344A216008804B0 /* Cgo+Convert.swift */; };
49862FA0218418C600A1D5EC /* ClashRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49862F9F218418C600A1D5EC /* ClashRule.swift */; };
4989F98E20D0AE990001E564 /* sampleConfig.yaml in Resources */ = {isa = PBXBuildFile; fileRef = 4989F98D20D0AE990001E564 /* sampleConfig.yaml */; };
498BC2532929CC2A00CA8084 /* SettingTabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 498BC2522929CC2A00CA8084 /* SettingTabViewController.swift */; };
498BC2552929CCAE00CA8084 /* GeneralSettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 498BC2542929CCAE00CA8084 /* GeneralSettingViewController.swift */; };
499976C821359F0400E7BF83 /* ClashWebViewContoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 499976C721359F0400E7BF83 /* ClashWebViewContoller.swift */; };
499A485522ED707300F6C675 /* RemoteConfigViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 499A485322ED707300F6C675 /* RemoteConfigViewController.swift */; };
499A485822ED715200F6C675 /* RemoteConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 499A485722ED715200F6C675 /* RemoteConfigModel.swift */; };
Expand Down Expand Up @@ -162,6 +164,8 @@
49862F9F218418C600A1D5EC /* ClashRule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClashRule.swift; sourceTree = "<group>"; };
498960722340F21C00AFB7EC /* com.west2online.ClashX.ProxyConfigHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = com.west2online.ClashX.ProxyConfigHelper.entitlements; sourceTree = "<group>"; };
4989F98D20D0AE990001E564 /* sampleConfig.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.yaml; path = sampleConfig.yaml; sourceTree = "<group>"; };
498BC2522929CC2A00CA8084 /* SettingTabViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingTabViewController.swift; sourceTree = "<group>"; };
498BC2542929CCAE00CA8084 /* GeneralSettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralSettingViewController.swift; sourceTree = "<group>"; };
499976C721359F0400E7BF83 /* ClashWebViewContoller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClashWebViewContoller.swift; sourceTree = "<group>"; };
499A485322ED707300F6C675 /* RemoteConfigViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteConfigViewController.swift; sourceTree = "<group>"; };
499A485722ED715200F6C675 /* RemoteConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteConfigModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -385,6 +389,7 @@
4989F98520D0AA300001E564 /* ViewControllers */ = {
isa = PBXGroup;
children = (
498BC2512929CC0A00CA8084 /* Settings */,
49BC061B212931F4005A0FE7 /* AboutViewController.swift */,
499976C721359F0400E7BF83 /* ClashWebViewContoller.swift */,
499A485322ED707300F6C675 /* RemoteConfigViewController.swift */,
Expand All @@ -393,6 +398,15 @@
path = ViewControllers;
sourceTree = "<group>";
};
498BC2512929CC0A00CA8084 /* Settings */ = {
isa = PBXGroup;
children = (
498BC2522929CC2A00CA8084 /* SettingTabViewController.swift */,
498BC2542929CCAE00CA8084 /* GeneralSettingViewController.swift */,
);
path = Settings;
sourceTree = "<group>";
};
4997732220D251A60009B136 /* Basic */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -721,6 +735,7 @@
49D176A72355FE680093DD7B /* NetworkChangeNotifier.swift in Sources */,
4913C82321157D0200F6B87C /* Notification.swift in Sources */,
8ACD21BD27A04ED500BC4632 /* ProxyModeChangeCommand.swift in Sources */,
498BC2552929CCAE00CA8084 /* GeneralSettingViewController.swift in Sources */,
49228457270AADE20027A4B6 /* RemoteConfigUpdateIntervalSettingView.swift in Sources */,
F9203A26236342820020D57D /* AppDelegate+..swift in Sources */,
499A485C22ED793C00F6C675 /* NSView+Nib.swift in Sources */,
Expand Down Expand Up @@ -760,6 +775,7 @@
493AEAE5221AE7230016FE98 /* ProxyMenuItem.swift in Sources */,
499A485E22ED9B7C00F6C675 /* NSTableView+Reload.swift in Sources */,
F939724C23A4B33500FE5A3F /* ClashProvider.swift in Sources */,
498BC2532929CC2A00CA8084 /* SettingTabViewController.swift in Sources */,
49862FA0218418C600A1D5EC /* ClashRule.swift in Sources */,
49C9EF64223E78F5005D8B6A /* ClashProxy.swift in Sources */,
4929F684258CE07500A435F6 /* UserDefaultWrapper.swift in Sources */,
Expand Down
5 changes: 2 additions & 3 deletions ClashX/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
if WebPortalManager.hasWebProtal {
WebPortalManager.shared.addWebProtalMenuItem(&statusMenu)
}
ICloudManager.shared.addEnableMenuItem(&experimentalMenu)
AutoUpgardeManager.shared.setup()
AutoUpgardeManager.shared.addChanelMenuItem(&experimentalMenu)
updateExperimentalFeatureStatus()
Expand Down Expand Up @@ -695,7 +694,7 @@ extension AppDelegate {

extension AppDelegate {
@IBAction func openConfigFolder(_ sender: Any) {
if ICloudManager.shared.isICloudEnable() {
if ICloudManager.shared.useiCloud.value {
ICloudManager.shared.getUrl {
url in
if let url = url {
Expand Down Expand Up @@ -841,7 +840,7 @@ extension AppDelegate {
}
}

if ICloudManager.shared.isICloudEnable() {
if ICloudManager.shared.useiCloud.value {
ICloudManager.shared.getConfigFilesList { list in
action(list)
}
Expand Down
Loading

0 comments on commit 3c86163

Please sign in to comment.