Update core menuitem title.

This commit is contained in:
mrFq1 2022-07-15 10:49:39 +08:00
parent d10ad8eb22
commit a0a9e694e2
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet var useAlphaMetaMenuItem: NSMenuItem!
@IBOutlet var alphaMetaVersionMenuItem: NSMenuItem!
@IBOutlet var updateAlphaMetaMenuItem: NSMenuItem!
var disposeBag = DisposeBag()
var statusItemView: StatusItemView!
@ -1006,7 +1007,7 @@ extension AppDelegate {
func dlResult(_ info: String) {
sender.isEnabled = true
NSUserNotificationCenter.default.post(title: "Clash Meta Downloaded.", info: info)
NSUserNotificationCenter.default.post(title: "Clash Meta Core", info: info)
}
AF.request("https://api.github.com/repos/MetaCubeX/Clash.Meta/releases/tags/Prerelease-Alpha").responseDecodable(of: ReleasesResp.self) {
@ -1060,8 +1061,10 @@ extension AppDelegate {
if let v = version {
let info = "Version: \(v)"
alphaMetaVersionMenuItem.title = info
updateAlphaMetaMenuItem.title = "Update Meta core"
} else {
alphaMetaVersionMenuItem.title = "Version: none"
updateAlphaMetaMenuItem.title = "Download Meta core"
}
}
}

View File

@ -205,6 +205,7 @@
<outlet property="snifferMenuItem" destination="mk5-fI-KvW" id="wy5-NG-fu9"/>
<outlet property="socksPortMenuItem" destination="Uy1-g8-r6Q" id="NiI-Gy-9Sa"/>
<outlet property="statusMenu" destination="Afa-lD-EbR" id="cov-E9-WrO"/>
<outlet property="updateAlphaMetaMenuItem" destination="MWh-yg-3Yk" id="jJi-h8-7T2"/>
<outlet property="useAlphaMetaMenuItem" destination="sk5-MZ-XB1" id="Ijq-xa-vVc"/>
</connections>
</customObject>