feat(transcription): add download transcript as txt button

[2f488f42]
This commit is contained in:
2026-01-26 12:36:58 +00:00
parent 01e5ae8b5c
commit 0a1be647c4

View File

@@ -332,6 +332,21 @@ export default function App() {
>
<Copy className="h-5 w-5" />
</button>
<button
onClick={() => {
const transcriptText = flatMessages.map(m => `[${m.display_time}] ${m.speaker}: ${m.text}`).join('\n');
const filename = `${detailMeeting.title}.txt`;
const blob = new Blob([transcriptText], { type: 'text/plain;charset=utf-8' });
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = filename;
link.click();
URL.revokeObjectURL(link.href);
}}
className="text-slate-500 hover:bg-slate-100 dark:hover:bg-slate-800 p-2 rounded" title="Download Full Transcript as TXT"
>
<FileText className="h-5 w-5" />
</button>
<button onClick={(e) => handleDeleteMeeting(e, detailMeeting.id)} className="text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 p-2 rounded"><Trash2 className="h-5 w-5" /></button>
</div>
</header>