mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08:00
feat(editor): audio block (#10947)
AudioMedia entity for loading & controlling a single audio media AudioMediaManagerService: Global audio state synchronization across tabs AudioAttachmentService + AudioAttachmentBlock for manipulating AttachmentBlock in affine - e.g., filling transcription (using mock endpoint for now) Added AudioBlock + AudioPlayer for rendering audio block in affine (new transcription block whose renderer is provided in affine) fix AF-2292 fix AF-2337
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { Skeleton } from '@affine/component';
|
||||
import { AttachmentViewer } from '@affine/core/blocksuite/attachment-viewer';
|
||||
import { type Doc, DocsService } from '@affine/core/modules/doc';
|
||||
import { type AttachmentBlockModel } from '@blocksuite/affine/model';
|
||||
import { FrameworkScope, useLiveData, useService } from '@toeverything/infra';
|
||||
import { type ReactElement, useLayoutEffect, useState } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
import { AttachmentViewerView } from '../../../../components/attachment-viewer';
|
||||
import { ViewIcon, ViewTitle } from '../../../../modules/workbench';
|
||||
import { PageNotFound } from '../../404';
|
||||
import * as styles from './index.css';
|
||||
@@ -71,7 +71,7 @@ export const AttachmentPage = ({
|
||||
<ViewIcon
|
||||
icon={model.props.type.endsWith('pdf') ? 'pdf' : 'attachment'}
|
||||
/>
|
||||
<AttachmentViewerView model={model} />
|
||||
<AttachmentViewer model={model} />
|
||||
</FrameworkScope>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user