mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-10-21 05:23:19 +00:00
fix(menubar): only list providers with a live quota adapter in settings
The Capacity Dock settings sidebar listed the whole 69-provider catalog, but only 7 have a live CodeBurn quota adapter; the rest just read 'coming soon'. Filter the settings provider list to live-adapter providers so users only see what actually works.
This commit is contained in:
parent
76d77d4ef7
commit
5958294f67
1 changed files with 13 additions and 8 deletions
|
|
@ -22,14 +22,19 @@ struct SettingsView: View {
|
|||
private static let mainPaneIDs: Set<String> = ["general", "about"]
|
||||
|
||||
private var providers: [ProviderPane] {
|
||||
CapacityDockPreferences.supportedProviders.map { provider in
|
||||
ProviderPane(
|
||||
id: provider.id,
|
||||
name: provider.displayName,
|
||||
icon: provider.iconName,
|
||||
isConnected: providerIsConnected(provider)
|
||||
)
|
||||
}
|
||||
// Only surface providers CodeBurn actually has a live quota adapter for;
|
||||
// the rest of the catalog would just read "coming soon" and clutter the
|
||||
// list, so they stay hidden until their adapter ships.
|
||||
CapacityDockPreferences.supportedProviders
|
||||
.filter { $0.catalogEntry.hasLiveCodeBurnQuotaAdapter }
|
||||
.map { provider in
|
||||
ProviderPane(
|
||||
id: provider.id,
|
||||
name: provider.displayName,
|
||||
icon: provider.iconName,
|
||||
isConnected: providerIsConnected(provider)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private func providerIsConnected(_ provider: CapacityDockProvider) -> Bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue