Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more
refactor: implement comprehensive theme system for UI consistency
altic-deve009f06e9bbb
diff --git a/Sources/Fluid/Theme/Components/SetupComponents.swift b/Sources/Fluid/Theme/Components/SetupComponents.swiftindex e91eaf02..4dfca734 100644--- a/Sources/Fluid/Theme/Components/SetupComponents.swift+++ b/Sources/Fluid/Theme/Components/SetupComponents.swift@@ -11,58 +11,119 @@ import AppKit// MARK: - Setup Step Viewstruct SetupStepView: View {+ @Environment(\.theme) private var themelet step: Intlet title: Stringlet description: Stringlet status: SetupStatuslet action: () -> Void- var showConfigureButton: Bool = true+ var actionButtonTitle: String = "Configure"+ var showActionButton: Bool = trueenum SetupStatus {case pending, completed, inProgress}var body: some View {- HStack(alignment: .top, spacing: 12) {- ZStack {- Circle()- .fill(statusColor.opacity(0.2))- .frame(width: 32, height: 32)-- if status == .completed {- Image(systemName: "checkmark")- .foregroundStyle(statusColor)- .font(.system(size: 14, weight: .bold))- } else {- Text("\(step)")- .font(.system(size: 14, weight: .semibold))- .foregroundStyle(statusColor)- }+ Button(action: {+ if status != .completed && showActionButton {+ action()}+ }) {+ HStack(alignment: .top, spacing: 12) {+ // Status indicator+ ZStack {+ Circle()+ .fill(statusColor.opacity(0.15))+ .frame(width: 32, height: 32)+ .overlay(+ Circle()+ .stroke(statusColor.opacity(0.3), lineWidth: 1.5)+ )++ if status == .completed {+ Image(systemName: "checkmark.circle.fill")+ .foregroundStyle(statusColor)+ .font(.system(size: 20, weight: .semibold))+ } else if status == .inProgress {+ ProgressView()+ .scaleEffect(0.7)+ .tint(statusColor)+ } else {+ Text("\(step)")+ .font(.system(size: 14, weight: .bold))+ .foregroundStyle(statusColor)+ }+ }- VStack(alignment: .leading, spacing: 4) {- HStack {- Text(title)- .font(.system(size: 14, weight: .semibold))+ VStack(alignment: .leading, spacing: 4) {+ HStack(alignment: .top) {+ VStack(alignment: .leading, spacing: 3) {+ Text(title)+ .font(.system(size: 14, weight: .semibold))+ .foregroundStyle(.primary)++ Text(description)+ .font(.system(size: 12))+ .foregroundStyle(.secondary)+ .fixedSize(horizontal: false, vertical: true)+ }- Spacer()+ Spacer()- if status != .completed && showConfigureButton {- Button("Configure") {- action()+ // Action button or status badge+ if status == .completed {+ HStack(spacing: 4) {+ Image(systemName: "checkmark")+ .font(.system(size: 10, weight: .bold))+ Text("Done")+ .font(.system(size: 11, weight: .semibold))+ }+ .foregroundStyle(.white)+ .padding(.horizontal, 10)+ .padding(.vertical, 4)+ .background(+ Capsule()+ .fill(Color.green)+ )+ } else if showActionButton {+ HStack(spacing: 4) {+ Text(actionButtonTitle)+ .font(.system(size: 11, weight: .semibold))+ Image(systemName: "arrow.right")+ .font(.system(size: 9, weight: .bold))+ }+ .foregroundStyle(theme.palette.accent)+ .padding(.horizontal, 10)+ .padding(.vertical, 4)+ .background(+ Capsule()+ .fill(theme.palette.accent.opacity(0.15))+ )}- .font(.system(size: 12))- .buttonStyle(.bordered)- .controlSize(.small)}}-- Text(description)- .font(.system(size: 13))- .foregroundStyle(.secondary)}+ .padding(12)+ .background(+ RoundedRectangle(cornerRadius: 10, style: .continuous)+ .fill(status == .completed+ ? Color.green.opacity(0.08)+ : theme.palette.cardBackground.opacity(0.6))+ .overlay(+ RoundedRectangle(cornerRadius: 10, style: .continuous)+ .stroke(+ status == .completed+ ? Color.green.opacity(0.3)+ : theme.palette.cardBorder.opacity(0.3),+ lineWidth: 1+ )+ )+ )}- .padding(.vertical, 8)+ .buttonStyle(.plain)+ .disabled(status == .completed || !showActionButton)+ .opacity(status == .completed ? 0.85 : 1.0)}private var statusColor: Color {@@ -83,27 +144,28 @@ struct InstructionStep: View {let description: Stringvar body: some View {- HStack(alignment: .top, spacing: 12) {+ HStack(alignment: .top, spacing: 10) {ZStack {Circle().fill(theme.palette.accent.opacity(0.2))- .frame(width: 28, height: 28)+ .frame(width: 24, height: 24)Text("\(number)")- .font(.system(size: 14, weight: .semibold))+ .font(.system(size: 12, weight: .semibold)).foregroundStyle(theme.palette.accent)}VStack(alignment: .leading, spacing: 2) {Text(title)- .font(.system(size: 14, weight: .semibold))+ .font(.system(size: 13, weight: .semibold))Text(description)- .font(.system(size: 13))+ .font(.system(size: 12)).foregroundStyle(.secondary).lineLimit(2)}}+ .padding(.vertical, 2)}}@@ -112,16 +174,24 @@ struct InstructionStep: View {struct ProviderGuide: View {let name: Stringlet url: String- let description: String+ let description: String?let baseURL: Stringlet keyPrefix: String++ init(name: String, url: String, description: String? = nil, baseURL: String, keyPrefix: String) {+ self.name = name+ self.url = url+ self.description = description+ self.baseURL = baseURL+ self.keyPrefix = keyPrefix+ }var body: some View {ThemedCard(hoverEffect: false) {- VStack(alignment: .leading, spacing: 8) {+ VStack(alignment: .leading, spacing: 6) {HStack {Text(name)- .font(.system(size: 14, weight: .semibold))+ .font(.system(size: 13, weight: .semibold))Spacer()@@ -131,39 +201,41 @@ struct ProviderGuide: View {NSWorkspace.shared.open(url)}}- .font(.system(size: 12))+ .font(.system(size: 11)).buttonStyle(.bordered)- .controlSize(.small)+ .controlSize(.mini)}}- Text(description)- .font(.system(size: 13))- .foregroundStyle(.secondary)+ if let description = description, !description.isEmpty {+ Text(description)+ .font(.system(size: 11))+ .foregroundStyle(.secondary)+ }- VStack(alignment: .leading, spacing: 4) {+ VStack(alignment: .leading, spacing: 3) {HStack {Text("Base URL:")- .font(.system(size: 12, weight: .medium))+ .font(.system(size: 11, weight: .medium)).foregroundStyle(.secondary)Text(baseURL)- .font(.system(size: 12, weight: .medium))+ .font(.system(size: 11, weight: .medium)).foregroundStyle(.primary).textSelection(.enabled)}HStack {Text("Key Format:")- .font(.system(size: 12, weight: .medium))+ .font(.system(size: 11, weight: .medium)).foregroundStyle(.secondary)Text(keyPrefix == "not-needed" ? "Not required" : "Starts with: \(keyPrefix)")- .font(.system(size: 12, weight: .medium))+ .font(.system(size: 11, weight: .medium)).foregroundStyle(.primary)}}- .padding(.top, 4)+ .padding(.top, 3)}- .padding(12)+ .padding(10)}}}@@ -171,3 +243,4 @@ struct ProviderGuide: View {+diff --git a/Sources/Fluid/Theme/Components/ThemedGroupBox.swift b/Sources/Fluid/Theme/Components/ThemedGroupBox.swiftindex be845950..54699324 100644--- a/Sources/Fluid/Theme/Components/ThemedGroupBox.swift+++ b/Sources/Fluid/Theme/Components/ThemedGroupBox.swift@@ -46,3 +46,5 @@ struct ThemedGroupBox<Label: View, Content: View>: View {++diff --git a/Sources/Fluid/Theme/NativeButtonStyles.swift b/Sources/Fluid/Theme/NativeButtonStyles.swiftindex ff79bd45..cc010d63 100644--- a/Sources/Fluid/Theme/NativeButtonStyles.swift+++ b/Sources/Fluid/Theme/NativeButtonStyles.swift@@ -319,3 +319,5 @@ struct GlassToggleStyle: ToggleStyle {++diff --git a/Sources/Fluid/Theme/ThemeEnvironment.swift b/Sources/Fluid/Theme/ThemeEnvironment.swiftindex a4319bf5..a3f061d7 100644--- a/Sources/Fluid/Theme/ThemeEnvironment.swift+++ b/Sources/Fluid/Theme/ThemeEnvironment.swift@@ -21,3 +21,5 @@ extension View {++