Skip to content

CodexBar 是一个 macOS 菜单栏应用,用于查看本机 Codex 账号状态、额度、Token 用量、详细统计信息

feat: 在关于页面展示 Helper 安装与授权状态

Bob4aea8e522bf1
diff --git a/CodexBar/Resources/Localizable.xcstrings b/CodexBar/Resources/Localizable.xcstrings
index be03242..847f2ac 100644
--- a/CodexBar/Resources/Localizable.xcstrings
+++ b/CodexBar/Resources/Localizable.xcstrings
@@ -3889,6 +3889,86 @@
}
}
},
+ "settings.about.helper.authorized" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Authorized"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已授权"
+ }
+ }
+ }
+ },
+ "settings.about.helper.not-installed" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Not Installed"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "未安装"
+ }
+ }
+ }
+ },
+ "settings.about.helper.requires-approval" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Not Authorized"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "未授权"
+ }
+ }
+ }
+ },
+ "settings.about.helper.title" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "CodexBar Helper"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "CodexBar Helper"
+ }
+ }
+ }
+ },
+ "settings.about.helper.unavailable" : {
+ "localizations" : {
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Unavailable"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "不可用"
+ }
+ }
+ }
+ },
"settings.about.version" : {
"localizations" : {
"en" : {
diff --git a/CodexBar/Views/Settings/AppSettingsView.swift b/CodexBar/Views/Settings/AppSettingsView.swift
index fcaa052..95c22de 100644
--- a/CodexBar/Views/Settings/AppSettingsView.swift
+++ b/CodexBar/Views/Settings/AppSettingsView.swift
@@ -295,6 +295,8 @@ private extension AppSettingsView {
LiquidGlassDivider()
versionRow
LiquidGlassDivider()
+ HelperInstallationStatusRow(status: keepAliveController.helperStatus)
+ LiquidGlassDivider()
githubProjectRow
}
.padding(Metrics.panelPadding)
diff --git a/CodexBar/Views/Settings/HelperInstallationStatusRow.swift b/CodexBar/Views/Settings/HelperInstallationStatusRow.swift
new file mode 100644
index 0000000..f0a1424
--- /dev/null
+++ b/CodexBar/Views/Settings/HelperInstallationStatusRow.swift
@@ -0,0 +1,36 @@
+import SwiftUI
+
+struct HelperInstallationStatusRow: View {
+ let status: KeepAliveController.HelperStatus
+
+ var body: some View {
+ HStack(spacing: SettingsRowMetrics.spacing) {
+ Image(systemName: "puzzlepiece.extension")
+ .frame(width: SettingsRowMetrics.iconWidth)
+ .foregroundStyle(.tint)
+
+ Text("settings.about.helper.title")
+
+ Spacer()
+
+ Text(statusPresentation.text)
+ .foregroundStyle(statusPresentation.color)
+ .lineLimit(1)
+ .contentTransition(.opacity)
+ .animation(.codexStatus, value: status)
+ }
+ }
+
+ private var statusPresentation: (text: LocalizedStringKey, color: Color) {
+ switch status {
+ case .notRegistered:
+ ("settings.about.helper.not-installed", .gray)
+ case .enabled:
+ ("settings.about.helper.authorized", .green)
+ case .requiresApproval:
+ ("settings.about.helper.requires-approval", .orange)
+ case .notFound:
+ ("settings.about.helper.unavailable", .red)
+ }
+ }
+}
diff --git a/Config/Version.xcconfig b/Config/Version.xcconfig
index a7c73aa..55568cd 100644
--- a/Config/Version.xcconfig
+++ b/Config/Version.xcconfig
@@ -1,2 +1,2 @@
-MARKETING_VERSION = 3.7.0
-CURRENT_PROJECT_VERSION = 84
+MARKETING_VERSION = 3.7.1
+CURRENT_PROJECT_VERSION = 85
diff --git a/appcast.xml b/appcast.xml
index 9f68dbd..447472c 100644
--- a/appcast.xml
+++ b/appcast.xml
@@ -7,6 +7,15 @@
<link>https://codexbar.zabrian.app/appcast.xml</link>
<description>CodexBar appcast feed</description>
<language>zh-CN</language>
+ <item>
+ <title>CodexBar.app 3.7.1</title>
+ <sparkle:version>85</sparkle:version>
+ <sparkle:shortVersionString>3.7.1</sparkle:shortVersionString>
+ <sparkle:minimumSystemVersion>15.0</sparkle:minimumSystemVersion>
+ <sparkle:releaseNotesLink>https://codexbar.zabrian.app/notes#3.7.1</sparkle:releaseNotesLink>
+ <pubDate>Wed, 09 Sep 2026 16:59:49 +0800</pubDate>
+ <enclosure url="https://codexbar.zabrian.app/download/CodexBar-v3.7.1.dmg" sparkle:edSignature="S4gcEvTyLmV6esBoKLn+me18p+Oi+fm6oJhAKjRPgHcuUDCbRunMMo64aujo++M16iT3xIxzmyRRRgZD8xJhCw==" length="7900308" type="application/octet-stream"/>
+ </item>
<item>
<title>CodexBar.app 3.7.0</title>
<sparkle:version>84</sparkle:version>