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
feat(history): add copy both action
altic-dev48e3d18b1e0c
diff --git a/Sources/Fluid/UI/TranscriptionHistoryView.swift b/Sources/Fluid/UI/TranscriptionHistoryView.swiftindex 85fbc99a..e2738445 100644--- a/Sources/Fluid/UI/TranscriptionHistoryView.swift+++ b/Sources/Fluid/UI/TranscriptionHistoryView.swift@@ -176,19 +176,23 @@ struct TranscriptionHistoryView: View {.buttonStyle(.plain).contextMenu {Button {- NSPasteboard.general.clearContents()- NSPasteboard.general.setString(entry.processedText, forType: .string)+ self.copyToClipboard(entry.processedText)} label: {- Label("Copy Text", systemImage: "doc.on.doc")+ Label(entry.wasAIProcessed ? "Copy AI Text" : "Copy Text", systemImage: "doc.on.doc")}if entry.wasAIProcessed {Button {- NSPasteboard.general.clearContents()- NSPasteboard.general.setString(entry.rawText, forType: .string)+ self.copyToClipboard(entry.rawText)} label: {Label("Copy Raw Text", systemImage: "doc.on.doc.fill")}++ Button {+ self.copyToClipboard(self.combinedText(for: entry))+ } label: {+ Label("Copy Both", systemImage: "doc.on.doc")+ }}Divider()@@ -275,22 +279,40 @@ struct TranscriptionHistoryView: View {VStack(alignment: .leading, spacing: 20) {// HeaderVStack(alignment: .leading, spacing: 8) {- HStack {+ HStack(spacing: 8) {Text("Transcription Details").font(.system(size: 18, weight: .semibold))Spacer()- // Copy buttonButton {- NSPasteboard.general.clearContents()- NSPasteboard.general.setString(entry.processedText, forType: .string)+ self.copyToClipboard(entry.processedText)} label: {- Label("Copy", systemImage: "doc.on.doc")+ Label(entry.wasAIProcessed ? "Copy AI" : "Copy", systemImage: "doc.on.doc").font(.system(size: 12, weight: .medium))}.buttonStyle(.bordered).controlSize(.small)++ if entry.wasAIProcessed {+ Button {+ self.copyToClipboard(entry.rawText)+ } label: {+ Label("Raw", systemImage: "doc.on.doc.fill")+ .font(.system(size: 12, weight: .medium))+ }+ .buttonStyle(.bordered)+ .controlSize(.small)++ Button {+ self.copyToClipboard(self.combinedText(for: entry))+ } label: {+ Label("Both", systemImage: "doc.on.doc")+ .font(.system(size: 12, weight: .medium))+ }+ .buttonStyle(.borderedProminent)+ .controlSize(.small)+ }}Text(entry.fullDateString)@@ -459,6 +481,15 @@ struct TranscriptionHistoryView: View {.fill(self.theme.palette.cardBackground.opacity(0.9)))}+ private func copyToClipboard(_ text: String) {+ NSPasteboard.general.clearContents()+ NSPasteboard.general.setString(text, forType: .string)+ }++ private func combinedText(for entry: TranscriptionHistoryEntry) -> String {+ "\(entry.rawText)\n\n\(entry.processedText)"+ }+// MARK: - No Selection Viewprivate var noSelectionView: some View {