feat(transcription): add download transcript as txt button
[2f488f42]
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user