mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(core): transcription block styls (#11772)
1. collapsed transcript block by default 2. summary block should be able to have list paragraphs
This commit is contained in:
@@ -172,7 +172,11 @@ export class AudioAttachmentBlock extends Entity<AttachmentBlockModel> {
|
||||
) => {
|
||||
this.props.props.caption = result.title ?? '';
|
||||
|
||||
const addCalloutBlock = (emoji: string, title: string) => {
|
||||
const addCalloutBlock = (
|
||||
emoji: string,
|
||||
title: string,
|
||||
collapsed: boolean = false
|
||||
) => {
|
||||
const calloutId = this.props.doc.addBlock(
|
||||
'affine:callout',
|
||||
{
|
||||
@@ -184,6 +188,7 @@ export class AudioAttachmentBlock extends Entity<AttachmentBlockModel> {
|
||||
'affine:paragraph',
|
||||
{
|
||||
type: 'h6',
|
||||
collapsed,
|
||||
text: new Text([
|
||||
{
|
||||
insert: title,
|
||||
@@ -195,7 +200,7 @@ export class AudioAttachmentBlock extends Entity<AttachmentBlockModel> {
|
||||
return calloutId;
|
||||
};
|
||||
const fillTranscription = (segments: TranscriptionResult['segments']) => {
|
||||
const calloutId = addCalloutBlock('💬', 'Transcript');
|
||||
const calloutId = addCalloutBlock('💬', 'Transcript', true);
|
||||
|
||||
const speakerToColors = new Map<string, string>();
|
||||
for (const segment of segments) {
|
||||
|
||||
Reference in New Issue
Block a user