cc8dd1070a
- 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
37 lines
1.0 KiB
Swift
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)
|
|
)
|
|
}
|
|
}
|