Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat(core): add actions to transcription block (#11896)

pengx17c17c335f9be8
diff --git a/packages/frontend/core/src/blocksuite/attachment-viewer/audio/audio-block.css.ts b/packages/frontend/core/src/blocksuite/attachment-viewer/audio/audio-block.css.ts
index 8182ffac72..81c0fc4cea 100644
--- a/packages/frontend/core/src/blocksuite/attachment-viewer/audio/audio-block.css.ts
+++ b/packages/frontend/core/src/blocksuite/attachment-viewer/audio/audio-block.css.ts
@@ -30,9 +30,3 @@ export const notesButtonIcon = style({
export const error = style({
color: cssVarV2('aI/errorText'),
});
-
-export const publicUserLabel = style({
- fontSize: cssVar('fontXs'),
- fontWeight: 500,
- userSelect: 'none',
-});
diff --git a/packages/frontend/core/src/modules/cloud/views/public-user.css.ts b/packages/frontend/core/src/modules/cloud/views/public-user.css.ts
index c9668219c4..634822ba14 100644
--- a/packages/frontend/core/src/modules/cloud/views/public-user.css.ts
+++ b/packages/frontend/core/src/modules/cloud/views/public-user.css.ts
@@ -2,7 +2,7 @@ import { style } from '@vanilla-extract/css';
export const publicUserLabel = style({
fontSize: 'inherit',
- display: 'flex',
+ display: 'inline-flex',
alignItems: 'center',
});
diff --git a/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts b/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts
index 2bbd810daf..4369cb1097 100644
--- a/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts
+++ b/packages/frontend/core/src/modules/media/entities/audio-attachment-block.ts
@@ -242,7 +242,21 @@ export class AudioAttachmentBlock extends Entity<AttachmentBlockModel> {
);
};
+ const fillActions = async (actions: TranscriptionResult['actions']) => {
+ if (!actions) {
+ return;
+ }
+ const calloutId = addCalloutBlock('🎯', 'Todo');
+ await insertFromMarkdown(
+ undefined,
+ actions ?? '',
+ this.props.doc,
+ calloutId,
+ 1
+ );
+ };
fillTranscription(result.segments);
await fillSummary(result.summary);
+ await fillActions(result.actions);
};
}
diff --git a/packages/frontend/core/src/modules/media/entities/types.ts b/packages/frontend/core/src/modules/media/entities/types.ts
index f1794c3466..1c3c96ad55 100644
--- a/packages/frontend/core/src/modules/media/entities/types.ts
+++ b/packages/frontend/core/src/modules/media/entities/types.ts
@@ -7,4 +7,5 @@ export interface TranscriptionResult {
end: string;
transcription: string;
}[];
+ actions?: string;
}