CodexBar 是一个 macOS 菜单栏应用,用于查看本机 Codex 账号状态、额度、Token 用量、详细统计信息
Swift appkitcodexcodex-clideveloper-toolsmacosmacos-appmenu-bar-appopenai-codexproductivityswiftswiftuiusage-tracker
feat: 新增主面板动画效果
Bob4b46a5cf3358
diff --git a/CodexBar/Controllers/SettingsOptionsPanelController.swift b/CodexBar/Controllers/SettingsOptionsPanelController.swiftindex 11946e2..fd1e66b 100644--- a/CodexBar/Controllers/SettingsOptionsPanelController.swift+++ b/CodexBar/Controllers/SettingsOptionsPanelController.swift@@ -21,7 +21,7 @@ enum SettingsOptionsPanelAction {/// 子面板入场时的内容重建信号, 由 makeContentController 接进内容视图, 面板自己不必知道/// 原生 Switch 的 thumb 由 WindowPortal 投射, 面板首次布局那一轮建不起来也不会自愈, 只有重建补得上-/// bump 排在 present 之后, 那时入场动画已经把内容 translation 到可视区外, 重建才看不见+/// bump 排在 present 之后, 那时动画效果已经把内容 translation 到可视区外, 重建才看不见@MainActorfinal class SidePanelEntryCue: ObservableObject {@Published private(set) var pass = 0@@ -204,7 +204,7 @@ final class SettingsOptionsPanelController {isEntryAnimationRunning = falsescheduleResize()}- // 排在 present 之后: 入场动画先把内容 translation 到可视区外, 这一次重建落在那段里, 看不见+ // 排在 present 之后: 动画效果先把内容 translation 到可视区外, 这一次重建落在那段里, 看不见if needsEntryRebuild {entryCue.bump()}diff --git a/CodexBar/Controllers/StatusItemController.swift b/CodexBar/Controllers/StatusItemController.swiftindex 6565cce..24d7686 100644--- a/CodexBar/Controllers/StatusItemController.swift+++ b/CodexBar/Controllers/StatusItemController.swift@@ -953,7 +953,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {}private func completeMenuSurfaceOpen() {- menuSurfaceVisibility.isVisible = true+ menuSurfaceVisibility.beginPresentation()refreshWorkflowIfHookEnabled(performMaintenance: false)menuSurfaceDismissMonitor.install(onDismiss: { [weak self] in@@ -1109,7 +1109,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {cancelMenuSurfaceTasks()hideSideDetailPanels()menuSurfaceDismissMonitor.remove()- menuSurfaceVisibility.isVisible = false+ menuSurfaceVisibility.endPresentation()guard isActiveMenuSurfaceVisible else {menuSurfaceFadeCoordinator.resetAlpha()@@ -1147,7 +1147,7 @@ final class StatusItemController: NSObject, NSMenuDelegate {closeActiveMenuSurface()- menuSurfaceVisibility.isVisible = false+ menuSurfaceVisibility.endPresentation()menuSurfaceFadeCoordinator.resetAlpha()menuSurfaceState = .hiddenactiveMenuSurface = .nonediff --git a/CodexBar/Resources/Localizable.xcstrings b/CodexBar/Resources/Localizable.xcstringsindex 5b8a1b7..b258cf2 100644--- a/CodexBar/Resources/Localizable.xcstrings+++ b/CodexBar/Resources/Localizable.xcstrings@@ -3617,6 +3617,22 @@}}},+ "settings.main-panel.entrance-animations" : {+ "localizations" : {+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Animation Effects"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "动画效果"+ }+ }+ }+ },"settings.main-panel.layout.title" : {"localizations" : {"en" : {diff --git a/CodexBar/Services/Settings/MainPanelSettings.swift b/CodexBar/Services/Settings/MainPanelSettings.swiftindex a918c80..aae57f9 100644--- a/CodexBar/Services/Settings/MainPanelSettings.swift+++ b/CodexBar/Services/Settings/MainPanelSettings.swift@@ -61,10 +61,11 @@ nonisolated struct MainPanelLayout: Equatable, Sendable {}}-/// 主面板区域顺序与显隐偏好+/// 主面板区域布局与动画效果偏好@MainActorfinal class MainPanelSettings: ObservableObject {@Published private(set) var layout: MainPanelLayout+ @Published private(set) var areEntranceAnimationsEnabled: Boolprivate let defaults: UserDefaultsprivate var isHookEnabled: Bool?@@ -72,9 +73,15 @@ final class MainPanelSettings: ObservableObject {init(defaults: UserDefaults = .standard) {self.defaults = defaultslayout = Self.loadLayout(from: defaults)+ areEntranceAnimationsEnabled = Self.loadEntranceAnimationsEnabled(from: defaults)}func refresh() {+ let loadedEntranceAnimationsEnabled = Self.loadEntranceAnimationsEnabled(from: defaults)+ if loadedEntranceAnimationsEnabled != areEntranceAnimationsEnabled {+ areEntranceAnimationsEnabled = loadedEntranceAnimationsEnabled+ }+let loadedLayout = Self.loadLayout(from: defaults)guard isHookEnabled == false else {publish(loadedLayout)@@ -104,6 +111,16 @@ final class MainPanelSettings: ObservableObject {saveAndPublish(updatedLayout)}+ func setEntranceAnimationsEnabled(_ enabled: Bool) {+ guard enabled != areEntranceAnimationsEnabled else {+ return+ }++ AppLog.settings.notice("动画效果变更: enabled=\(enabled ? 1 : 0)")+ defaults.set(enabled, forKey: Self.entranceAnimationsEnabledKey)+ areEntranceAnimationsEnabled = enabled+ }+func setSection(_ section: MainPanelSection,isVisible: Bool,@@ -212,10 +229,19 @@ final class MainPanelSettings: ObservableObject {)}+ private static func loadEntranceAnimationsEnabled(from defaults: UserDefaults) -> Bool {+ guard defaults.object(forKey: entranceAnimationsEnabledKey) != nil else {+ return true+ }++ return defaults.bool(forKey: entranceAnimationsEnabledKey)+ }+private static func orderLogValue(for layout: MainPanelLayout) -> String {layout.orderedSections.map(\.rawValue).joined(separator: ",")}private static let sectionOrderKey = "MainPanel.sectionOrder"private static let hiddenSectionsKey = "MainPanel.hiddenSections"+ private static let entranceAnimationsEnabledKey = "MainPanel.entranceAnimationsEnabled"}diff --git a/CodexBar/Views/Menu/CodexStatusMenuView.swift b/CodexBar/Views/Menu/CodexStatusMenuView.swiftindex 57cb6c2..0867a76 100644--- a/CodexBar/Views/Menu/CodexStatusMenuView.swift+++ b/CodexBar/Views/Menu/CodexStatusMenuView.swift@@ -1,10 +1,24 @@import Combineimport SwiftUI-/// 菜单面板可见状态, 用于控制逐秒时间更新+extension EnvironmentValues {+ @Entry var mainPanelEntranceAnimationsEnabled: Bool = true+}++/// 菜单面板展示状态, 可见性控制逐秒更新, 展示代次区分快速重开@MainActorfinal class MenuSurfaceVisibilityState: ObservableObject {- @Published var isVisible = false+ @Published private(set) var isVisible = false+ @Published private(set) var presentationGeneration: UInt = 0++ func beginPresentation() {+ presentationGeneration &+= 1+ isVisible = true+ }++ func endPresentation() {+ isVisible = false+ }}/// 菜单栏弹出面板根视图, 汇总账号; 实时活动; 额度; token; 同步状态和更新时间@@ -25,12 +39,17 @@ struct CodexStatusMenuView: View {let onUsageHeatmapHoverChange: (UsageHeatmapHoverContext?) -> Voidlet onResetCreditsTap: (ResetCreditsPanelContext) -> Voidlet onActivityCenterTap: (CodexActivityCenterPanelContext) -> Void+ @Environment(\.accessibilityReduceMotion) private var accessibilityReduceMotion@EnvironmentObject private var appUpdater: AppUpdatervar body: some View {VStack(alignment: .leading, spacing: Metrics.verticalSpacing) {content}+ .environment(+ \.mainPanelEntranceAnimationsEnabled,+ mainPanelSettings.areEntranceAnimationsEnabled && !accessibilityReduceMotion+ ).padding(Metrics.padding).liquidGlassSurface(cornerRadius: Metrics.surfaceCornerRadius, isOuterSurface: true).animation(Metrics.statusAnimation, value: viewModel.loadState)@@ -137,6 +156,7 @@ private extension CodexStatusMenuView {isStale: snapshot.isRateLimitsStale,onResetCreditsTap: onResetCreditsTap)+ .id(menuSurfaceVisibility.presentationGeneration)} else if dataPlaceholderSection == .quota {EmptyDataPanel()}@@ -152,6 +172,7 @@ private extension CodexStatusMenuView {isStale: snapshot.isUsageStale,onHoverContextChange: onUsageHeatmapHoverChange)+ .id(menuSurfaceVisibility.presentationGeneration)} else if dataPlaceholderSection == .usage {EmptyDataPanel()}diff --git a/CodexBar/Views/Menu/QuotaRow.swift b/CodexBar/Views/Menu/QuotaRow.swiftindex 9deb512..ec89093 100644--- a/CodexBar/Views/Menu/QuotaRow.swift+++ b/CodexBar/Views/Menu/QuotaRow.swift@@ -3,6 +3,8 @@ import SwiftUI/// 单个额度窗口行, 布局宽度固定以避免不同文案撑宽菜单面板struct QuotaRow: View {let window: QuotaWindow+ @Environment(\.mainPanelEntranceAnimationsEnabled) private var animatesEntrance+ @State private var revealedPercent: Double = 0var body: some View {HStack(alignment: .center, spacing: 0) {@@ -13,12 +15,14 @@ struct QuotaRow: View {.allowsTightening(true).frame(width: Metrics.labelWidth, alignment: .center)- SegmentedQuotaBar(percent: remainingPercent)- .padding(.leading, Metrics.labelBarSpacing)+ SegmentedQuotaBar(+ percent: displayedPercent,+ targetPercent: remainingPercent.map { Double($0) }+ )+ .padding(.leading, Metrics.labelBarSpacing)- Text(percentText)+ percentageValue.font(.caption.monospacedDigit().weight(.semibold))- .foregroundStyle(percentColor).lineLimit(1).frame(width: Metrics.percentWidth, alignment: .leading).padding(.leading, Metrics.barPercentSpacing)@@ -34,6 +38,9 @@ struct QuotaRow: View {.frame(width: Metrics.resetWidth, alignment: .trailing)}.frame(maxWidth: .infinity, alignment: .leading)+ .task(id: remainingPercent) {+ await revealPercent()+ }}}@@ -46,6 +53,7 @@ private extension QuotaRow {static let percentWidth: CGFloat = 37static let percentResetSpacing: CGFloat = 6static let resetWidth: CGFloat = 75+ static let entranceDuration: TimeInterval = 0.65}var resetText: String {@@ -56,24 +64,51 @@ private extension QuotaRow {return Self.resetFormatter.string(from: resetsAt)}- var percentText: String {- guard let remainingPercent else {- return "--"+ @ViewBuilder+ var percentageValue: some View {+ if let displayedPercent, let remainingPercent {+ AnimatedQuotaPercentageText(+ percent: displayedPercent,+ targetPercent: Double(remainingPercent)+ )+ } else {+ Text(verbatim: "--")+ .foregroundStyle(.secondary)}-- return CodexPercentageFormat.string(from: remainingPercent)}var remainingPercent: Int? {window.hasData ? window.remainingPercent : nil}- var percentColor: Color {+ var displayedPercent: Double? {guard let remainingPercent else {- return .secondary+ return nil}- return QuotaBarPalette.filledColor(for: remainingPercent)+ return animatesEntrance ? revealedPercent : Double(remainingPercent)+ }++ func revealPercent() async {+ guard let remainingPercent else {+ revealedPercent = 0+ return+ }++ let targetPercent = Double(remainingPercent)+ guard animatesEntrance else {+ revealedPercent = targetPercent+ return+ }++ await Task.yield()+ guard !Task.isCancelled else {+ return+ }++ withAnimation(.easeOut(duration: Metrics.entranceDuration)) {+ revealedPercent = targetPercent+ }}static let resetFormatter: DateFormatter = {@@ -85,34 +120,119 @@ private extension QuotaRow {}()}+/// 通过 Animatable 的中间值让百分比数字和进度条保持同一动画进度+private struct AnimatedQuotaPercentageText: View, Animatable {+ var percent: Double+ let targetPercent: Double++ var animatableData: Double {+ get { percent }+ set { percent = newValue }+ }++ var body: some View {+ Text(CodexPercentageFormat.string(from: roundedPercent))+ .foregroundStyle(+ QuotaBarPalette.animatedColor(+ for: percent,+ targetPercent: targetPercent+ )+ )+ .numericRollTransition(value: Double(roundedPercent))+ }++ private var roundedPercent: Int {+ Int(percent.rounded())+ }+}+/// 分档色值来自共享的 QuotaPalette, 无数据时使用占位色private enum QuotaBarPalette {- static func filledColor(for percent: Int?) -> Color {- guard let percent else {- return placeholderColor+ static func animatedColor(for percent: Double, targetPercent: Double) -> Color {+ let currentPercent = min(max(percent, 0), 100)+ let clampedTargetPercent = min(max(targetPercent, 0), 100)++ guard currentPercent < clampedTargetPercent else {+ return QuotaPalette.color(for: Int(currentPercent.rounded()))}- return QuotaPalette.color(for: percent)+ for (lowerTier, upperTier) in zip(+ QuotaPalette.tiers,+ QuotaPalette.tiers.dropFirst()+ ) {+ let upperBound = Double(upperTier.lowerBound)+ let transitionStart = upperBound - colorTransitionSpan+ guard clampedTargetPercent >= upperBound,+ currentPercent >= transitionStart,+ currentPercent < upperBound else {+ continue+ }++ let progress = (currentPercent - transitionStart) / colorTransitionSpan+ return Color(hex: lowerTier.hex).mix(+ with: Color(hex: upperTier.hex),+ by: smoothStep(progress),+ in: .device+ )+ }++ return QuotaPalette.color(for: Int(currentPercent.rounded()))}static let placeholderColor = Color(hex: 0xE5E7EB)+ private static let colorTransitionSpan = 4.0++ private static func smoothStep(_ value: Double) -> Double {+ let clampedValue = min(max(value, 0), 1)+ return clampedValue * clampedValue * (3 - 2 * clampedValue)+ }}/// 胶囊条, 与菜单面板宽度联动-private struct SegmentedQuotaBar: View {- let percent: Int?+private struct SegmentedQuotaBar: View, Animatable {+ var percent: Double+ let targetPercent: Double?+ var revealedWidth: CGFloat++ init(percent: Double?, targetPercent: Double?) {+ self.percent = percent ?? 0+ self.targetPercent = targetPercent+ revealedWidth = percent.map(Self.filledWidth(for:)) ?? 0+ }++ var animatableData: AnimatablePair<Double, CGFloat> {+ get { AnimatablePair(percent, revealedWidth) }+ set {+ percent = newValue.first+ revealedWidth = newValue.second+ }+ }var body: some View {- let filledColor = QuotaBarPalette.filledColor(for: percent)+ let filledColor = targetPercent.map {+ QuotaBarPalette.animatedColor(for: percent, targetPercent: $0)+ } ?? QuotaBarPalette.placeholderColor++ ZStack(alignment: .leading) {+ segments(color: QuotaBarPalette.placeholderColor)+ segments(color: filledColor)+ .mask(alignment: .leading) {+ Rectangle()+ .frame(width: revealedWidth)+ }+ }+ .frame(width: Metrics.totalWidth, height: Metrics.segmentHeight, alignment: .leading)+ }++ private func segments(color: Color) -> some View {HStack(spacing: Metrics.segmentSpacing) {- ForEach(0 ..< Metrics.segmentCount, id: \.self) { index in+ ForEach(0 ..< Metrics.segmentCount, id: \.self) { _ inCapsule(style: .continuous)- .fill(index < filledSegments ? filledColor : QuotaBarPalette.placeholderColor)+ .fill(color).frame(width: Metrics.segmentWidth, height: Metrics.segmentHeight)}}- .frame(width: Metrics.totalWidth, height: Metrics.segmentHeight, alignment: .leading)}}@@ -128,11 +248,13 @@ private extension SegmentedQuotaBar {}}- var filledSegments: Int {- guard let percent else {+ static func filledWidth(for percent: Double) -> CGFloat {+ let filledSegments = Int((percent / 100.0 * Double(Metrics.segmentCount)).rounded())+ let count = min(max(filledSegments, 0), Metrics.segmentCount)+ guard count > 0 else {return 0}- return Int((Double(percent) / 100.0 * Double(Metrics.segmentCount)).rounded())+ return CGFloat(count) * Metrics.segmentWidth + CGFloat(count - 1) * Metrics.segmentSpacing}}diff --git a/CodexBar/Views/Menu/UsageHeatmap.swift b/CodexBar/Views/Menu/UsageHeatmap.swiftindex 7edc380..df9de2e 100644--- a/CodexBar/Views/Menu/UsageHeatmap.swift+++ b/CodexBar/Views/Menu/UsageHeatmap.swift@@ -223,6 +223,9 @@ struct UsageHeatmap: View {let days: [UsageHeatmapDay?]let onScreenFrameChange: (CGRect?) -> Void@Binding var selection: UsageHeatmapSelection?+ @Environment(\.mainPanelEntranceAnimationsEnabled) private var animatesEntrance+ @State private var areSquaresRevealed = false+ @State private var entranceStartedAt: TimeInterval?@State private var snapSelection: UsageHeatmapSelection?@State private var hoverClearTask: Task<Void, Never>?private let peakTokens: Int@@ -245,6 +248,9 @@ struct UsageHeatmap: View {.background {ScreenFrameReader(onChange: onScreenFrameChange)}+ .task {+ await revealSquares()+ }.onDisappear {cancelHoverClearTask()onScreenFrameChange(nil)@@ -280,6 +286,12 @@ struct UsageHeatmap: View {percent: Double(day.tokensForHeatmap) / Double(peakTokens),isHovered: snapSelection?.day.id == day.id)+ .opacity(showsSquares ? 1 : 0)+ .scaleEffect(showsSquares ? 1 : Metrics.entranceScale)+ .animation(+ entranceAnimation(column: column, row: row),+ value: showsSquares+ )} else {Color.clear.frame(width: Metrics.squareSize, height: Metrics.squareSize)@@ -314,6 +326,56 @@ struct UsageHeatmap: View {return String(localized: "date-range.closed", defaultValue: "\(firstText)\(lastText)")}+ private var showsSquares: Bool {+ areSquaresRevealed || !animatesEntrance+ }++ private func entranceAnimation(column: Int, row: Int) -> Animation? {+ guard areSquaresRevealed,+ animatesEntrance else {+ return nil+ }++ return .spring(+ response: Metrics.entranceResponse,+ dampingFraction: Metrics.entranceDampingFraction+ )+ .delay(entranceDelay(column: column, row: row))+ }++ private func revealSquares() async {+ guard animatesEntrance else {+ areSquaresRevealed = true+ return+ }++ await Task.yield()+ guard !Task.isCancelled else {+ return+ }++ entranceStartedAt = ProcessInfo.processInfo.systemUptime+ areSquaresRevealed = true+ }++ private func entranceDelay(column: Int, row: Int) -> TimeInterval {+ TimeInterval(column + row) * Metrics.entranceStagger+ }++ private func isSquareInteractive(column: Int, row: Int) -> Bool {+ guard showsSquares else {+ return false+ }++ guard animatesEntrance, let entranceStartedAt else {+ return true+ }++ let elapsed = ProcessInfo.processInfo.systemUptime - entranceStartedAt+ let interactiveAt = entranceDelay(column: column, row: row) + Metrics.entranceResponse+ return elapsed >= interactiveAt+ }+private func localDayText(_ dayKey: String) -> String {guard let date = CodexDateFormat.dayDate(from: dayKey) else {return dayKey@@ -346,7 +408,8 @@ struct UsageHeatmap: View {let row = Int(((point.y - Metrics.squareSize / 2) / Metrics.squarePitch).rounded())guard (0 ..< Metrics.columnCount).contains(column),- (0 ..< Metrics.rowCount).contains(row) else {+ (0 ..< Metrics.rowCount).contains(row),+ isSquareInteractive(column: column, row: row) else {return nil}@@ -410,6 +473,10 @@ extension UsageHeatmap {static let hoverFadeDuration: TimeInterval = 0.15static let hoverExitGraceMilliseconds: UInt64 = 160static let snapHalfExtent: CGFloat = squareSize / 2 + squareSpacing+ static let entranceScale: CGFloat = 0.35+ static let entranceStagger: TimeInterval = 0.015+ static let entranceResponse: TimeInterval = 0.25+ static let entranceDampingFraction = 0.60static var totalWidth: CGFloat {CGFloat(columnCount) * squareSize + CGFloat(columnCount - 1) * squareSpacingdiff --git a/CodexBar/Views/Settings/AppSettingsView.swift b/CodexBar/Views/Settings/AppSettingsView.swiftindex f3bcb07..1aabefa 100644--- a/CodexBar/Views/Settings/AppSettingsView.swift+++ b/CodexBar/Views/Settings/AppSettingsView.swift@@ -240,6 +240,8 @@ private extension AppSettingsView {VStack(alignment: .leading, spacing: Metrics.rowSpacing) {mainPanelLayoutRowLiquidGlassDivider()+ mainPanelEntranceAnimationsRow+ LiquidGlassDivider()launchAtLoginRowLiquidGlassDivider()automaticUpdateCheckRow@@ -391,6 +393,17 @@ private extension AppSettingsView {}}+ var mainPanelEntranceAnimationsRow: some View {+ SettingsToggleRow(+ icon: "sparkles",+ title: "settings.main-panel.entrance-animations",+ isOn: Binding(+ get: { mainPanelSettings.areEntranceAnimationsEnabled },+ set: { mainPanelSettings.setEntranceAnimationsEnabled($0) }+ )+ )+ }+// MARK: - 高级页各行var codexHookRow: some View {diff --git a/CodexBar/Views/Shared/QuotaPalette.swift b/CodexBar/Views/Shared/QuotaPalette.swiftindex b7ff4b5..ad938c8 100644--- a/CodexBar/Views/Shared/QuotaPalette.swift+++ b/CodexBar/Views/Shared/QuotaPalette.swift@@ -3,19 +3,16 @@ import SwiftUI/// 额度颜色按剩余百分比分档, 菜单栏图标与面板额度条共用同一套阈值和色值nonisolated enum QuotaPalette {+ static let tiers: [(lowerBound: Int, hex: Int)] = [+ (0, 0xEE3F3F),+ (20, 0xFF7A59),+ (40, 0xF5B041),+ (60, 0x5DADE2),+ (80, 0x16A085)+ ]+static func hex(for percent: Int) -> Int {- switch percent {- case 80...:- 0x16A085- case 60 ..< 80:- 0x5DADE2- case 40 ..< 60:- 0xF5B041- case 20 ..< 40:- 0xFF7A59- default:- 0xEE3F3F- }+ tiers.last(where: { percent >= $0.lowerBound })?.hex ?? tiers[0].hex}static func color(for percent: Int) -> Color {diff --git a/Config/Version.xcconfig b/Config/Version.xcconfigindex 6661680..87e76ed 100644--- a/Config/Version.xcconfig+++ b/Config/Version.xcconfig@@ -1,2 +1,2 @@-MARKETING_VERSION = 3.6.10-CURRENT_PROJECT_VERSION = 77+MARKETING_VERSION = 3.6.11+CURRENT_PROJECT_VERSION = 78diff --git a/Docs/UserGuide/main-panel.md b/Docs/UserGuide/main-panel.mdindex cd5fd6c..7aef6a4 100644--- a/Docs/UserGuide/main-panel.md+++ b/Docs/UserGuide/main-panel.md@@ -49,6 +49,8 @@ CodexBar 会展示 Codex 返回的全部额度分组和窗口。- 分段进度条- 下一次重置时间+开启 `动画效果` 时,分段进度条会在每次打开主面板时从零填充到当前剩余比例。+主额度分组还可能展示以下信息:- 可用积分或无限积分状态@@ -69,6 +71,8 @@ CodexBar 会展示 Codex 返回的全部额度分组和窗口。热力图使用 30 列乘 7 行方块展示近 30 周每日 Token 用量,颜色强度相对于当前热力图中的峰值计算。+开启 `动画效果` 时,日期方块会在每次打开主面板时从左上到右下依次展示。+悬停日期方块时会显示日期、Token 数量和用量强度。CodexBar Hook 开启且当天有数据时,日期详情还会显示以下统计:diff --git a/Docs/UserGuide/settings.md b/Docs/UserGuide/settings.mdindex f2cca15..2259679 100644--- a/Docs/UserGuide/settings.md+++ b/Docs/UserGuide/settings.md@@ -11,6 +11,7 @@| 设置 | 作用 | 默认或初始状态 || --- | --- | --- || 主面板布局 | 调整主面板 5 个区域的顺序和显隐 | 账户、任务、额度、用量、状态;Hook 未开启时任务关闭 |+| 动画效果 | 每次打开主面板时播放额度条填充和用量热力图波动动画 | 开启 || 开机自动启动 | 通过 macOS 登录项自动启动 CodexBar | 跟随当前系统登录项状态 || 自动检查更新 | 由 Sparkle 定期检查可用更新 | 跟随 Sparkle 当前设置 || 菜单栏额度指示 | 在菜单栏图标旁显示所选额度窗口剩余比例 | 主额度 |diff --git a/Docs/en/UserGuide/main-panel.md b/Docs/en/UserGuide/main-panel.mdindex c5d8725..c05d40a 100644--- a/Docs/en/UserGuide/main-panel.md+++ b/Docs/en/UserGuide/main-panel.md@@ -49,6 +49,8 @@ Each rate-limit window includes:- A segmented progress bar- The next reset time+When `Animation Effects` is enabled, each segmented progress bar fills from zero to its current remaining percentage whenever the main panel opens.+The primary rate-limit group may also show:- Available credits or unlimited-credit status@@ -69,6 +71,8 @@ The summary area shows:The heatmap uses a 30-column by 7-row grid to show daily token usage over the last 30 weeks. Color intensity is relative to the highest value currently visible in the heatmap.+When `Animation Effects` is enabled, the day squares appear from the top left to the bottom right whenever the main panel opens.+Hover over a day to see its date, token count, and usage intensity.When CodexBar Hook is enabled and data exists for that day, the details also include:diff --git a/Docs/en/UserGuide/settings.md b/Docs/en/UserGuide/settings.mdindex 49661a8..cb1defa 100644--- a/Docs/en/UserGuide/settings.md+++ b/Docs/en/UserGuide/settings.md@@ -11,6 +11,7 @@ Settings contains three pages: `General`, `Advanced`, and `About`.| Setting | Effect | Default or initial state || --- | --- | --- || Main Panel Layout | Reorders and shows or hides the five main-panel sections | Account, Tasks, Quota, Usage, and Status; the Tasks section is off while Hook is disabled |+| Animation Effects | Animates the rate-limit bars and usage heatmap whenever the main panel opens | On || Launch at Login | Starts CodexBar automatically through macOS Login Items | Follows the current system Login Item state || Automatically Check for Updates | Lets Sparkle check periodically for updates | Follows the current Sparkle setting || Menu Bar Quota Indicator | Shows the remaining percentage for a selected rate-limit window beside the menu bar icon | Primary rate limit |diff --git a/appcast.xml b/appcast.xmlindex a24fbbb..2eb1be2 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.6.11</title>+ <sparkle:version>78</sparkle:version>+ <sparkle:shortVersionString>3.6.11</sparkle:shortVersionString>+ <sparkle:minimumSystemVersion>15.0</sparkle:minimumSystemVersion>+ <sparkle:releaseNotesLink>https://codexbar.zabrian.app/notes#3.6.11</sparkle:releaseNotesLink>+ <pubDate>Sat, 29 Aug 2026 21:03:51 +0800</pubDate>+ <enclosure url="https://codexbar.zabrian.app/download/CodexBar-v3.6.11.dmg" sparkle:edSignature="6Rig20RatI1P6EJxQzlr2DvLQJuEIvzf3duRZIywEDOqbbx1IPa4ZSjYyzjFtGq2aQUgvqzZ5c9utnvzQwO8DQ==" length="7611320" type="application/octet-stream"/>+ </item><item><title>CodexBar.app 3.6.10</title><sparkle:version>77</sparkle:version>