Files
OSGKeyboard/OSGKeyboardShared/DesignSystem/UsageSurfaceCard.swift
T
Rocky cc8dd1070a feat: macOS architecture, cloud ASR/LLM providers, and 6-step iOS onboarding
- Add macOS menu-bar dictation app with local ASR models (SenseVoice/Qwen3),
  global Option hotkey, and bottom overlay
- Add cloud ASR/LLM providers (Anthropic, Volcengine, Bailian, and more) with
  provider logos, model listing, and connection checks
- Add shared 7-day usage stats UI (UsageStatsCluster / SevenDayUsageChart)
- Add iOS onboarding step 6 for polish LLM setup; hide custom-language-model
  diagnostic toggle behind DEBUG
- Unify iOS onboarding tagline with the macOS brand line ("开口即文字。")
- Rewrite README (Chinese-first, product-oriented) and refresh GitHub Pages
2026-07-11 19:10:20 +08:00

37 lines
1.0 KiB
Swift

// UsageSurfaceCard.swift
// OSGKeyboard · Shared
//
// Flat semantic surface used by home / dashboard stats on every platform.
// Deliberately shadowless — hierarchy comes from fill + hairline border.
import SwiftUI
public struct UsageSurfaceCard<Content: View>: View {
@Environment(\.themePalette) private var palette
public var padding: CGFloat
public var cornerRadius: CGFloat
@ViewBuilder public var content: () -> Content
public init(
padding: CGFloat = Spacing.md,
cornerRadius: CGFloat = Radius.medium,
@ViewBuilder content: @escaping () -> Content
) {
self.padding = padding
self.cornerRadius = cornerRadius
self.content = content
}
public var body: some View {
let shape = RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
content()
.padding(padding)
.background(palette.surface, in: shape)
.overlay(
shape.stroke(palette.divider, lineWidth: 0.5)
)
}
}