Includes provider integrations, settings, NSStatusItem UI, tests, Makefile, and README with screenshot. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
777 B
Swift
23 lines
777 B
Swift
import SwiftUI
|
|
|
|
struct MenuBarLabelView: View {
|
|
@ObservedObject var refreshService: UsageRefreshService
|
|
@ObservedObject var settings: AppSettings
|
|
|
|
var body: some View {
|
|
HStack(spacing: MenuBarMetrics.providerSpacing) {
|
|
ForEach(settings.menuBarProviders) { providerID in
|
|
ProviderMenuBarIconView(
|
|
providerID: providerID,
|
|
state: refreshService.providerStates[providerID],
|
|
settings: settings
|
|
)
|
|
.fixedSize(horizontal: true, vertical: false)
|
|
}
|
|
}
|
|
.fixedSize(horizontal: true, vertical: false)
|
|
.frame(height: MenuBarMetrics.labelHeight)
|
|
.padding(.horizontal, 2)
|
|
.id(settings.revision)
|
|
}
|
|
}
|