chore: add switch for enable/disable update channel selection
This commit is contained in:
parent
98ccf30b0e
commit
8f9508bd6a
|
@ -32,16 +32,20 @@ class AutoUpgardeManager: NSObject {
|
|||
}
|
||||
return items
|
||||
}()
|
||||
|
||||
private var allowSelectChannel:Bool {
|
||||
return Bundle.main.object(forInfoDictionaryKey: "SUDisallowSelectChannel") as? Bool != true
|
||||
}
|
||||
|
||||
// MARK: Public
|
||||
|
||||
func setup() {
|
||||
guard WebPortalManager.hasWebProtal == false else { return }
|
||||
guard WebPortalManager.hasWebProtal == false, allowSelectChannel else { return }
|
||||
SUUpdater.shared()?.delegate = self
|
||||
}
|
||||
|
||||
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: ""))
|
||||
for (_, item) in menuItems {
|
||||
upgradeMenu.addItem(item)
|
||||
|
|
|
@ -118,6 +118,8 @@
|
|||
<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>
|
||||
</dict>
|
||||
<key>SUDisallowSelectChannel</key>
|
||||
<false/>
|
||||
<key>SUFeedURL</key>
|
||||
<string>https://yichengchen.github.io/clashX/appcast.xml</string>
|
||||
</dict>
|
||||
|
|
Loading…
Reference in New Issue