chore: add switch for enable/disable update channel selection
This commit is contained in:
parent
98ccf30b0e
commit
8f9508bd6a
|
@ -33,15 +33,19 @@ class AutoUpgardeManager: NSObject {
|
||||||
return items
|
return items
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
private var allowSelectChannel:Bool {
|
||||||
|
return Bundle.main.object(forInfoDictionaryKey: "SUDisallowSelectChannel") as? Bool != true
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: Public
|
// MARK: Public
|
||||||
|
|
||||||
func setup() {
|
func setup() {
|
||||||
guard WebPortalManager.hasWebProtal == false else { return }
|
guard WebPortalManager.hasWebProtal == false, allowSelectChannel else { return }
|
||||||
SUUpdater.shared()?.delegate = self
|
SUUpdater.shared()?.delegate = self
|
||||||
}
|
}
|
||||||
|
|
||||||
func addChanelMenuItem(_ menu: inout NSMenu) {
|
func addChanelMenuItem(_ menu: inout NSMenu) {
|
||||||
guard WebPortalManager.hasWebProtal == false else { return }
|
guard WebPortalManager.hasWebProtal == false, allowSelectChannel else { return }
|
||||||
let upgradeMenu = NSMenu(title: NSLocalizedString("Upgrade Channel", comment: ""))
|
let upgradeMenu = NSMenu(title: NSLocalizedString("Upgrade Channel", comment: ""))
|
||||||
for (_, item) in menuItems {
|
for (_, item) in menuItems {
|
||||||
upgradeMenu.addItem(item)
|
upgradeMenu.addItem(item)
|
||||||
|
|
|
@ -118,6 +118,8 @@
|
||||||
<key>com.west2online.ClashX.ProxyConfigHelper</key>
|
<key>com.west2online.ClashX.ProxyConfigHelper</key>
|
||||||
<string>anchor apple generic and identifier "com.west2online.ClashX.ProxyConfigHelper" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = MEWHFZ92DY)</string>
|
<string>anchor apple generic and identifier "com.west2online.ClashX.ProxyConfigHelper" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = MEWHFZ92DY)</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>SUDisallowSelectChannel</key>
|
||||||
|
<false/>
|
||||||
<key>SUFeedURL</key>
|
<key>SUFeedURL</key>
|
||||||
<string>https://yichengchen.github.io/clashX/appcast.xml</string>
|
<string>https://yichengchen.github.io/clashX/appcast.xml</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
Loading…
Reference in New Issue