mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat(editor): add idle status for embed iframe block (#11142)
To close: [BS-2843](https://linear.app/affine-design/issue/BS-2843/iframe-embed-block-占位态) [BS-2844](https://linear.app/affine-design/issue/BS-2844/iframe-embed-block-create-modal-ui-调整) [BS-2880](https://linear.app/affine-design/issue/BS-2880/spotify-选中时圆角有问题) [BS-2881](https://linear.app/affine-design/issue/BS-2881/miro-圆角有问题-点击-see-the-board-加载之后就好了)
This commit is contained in:
@@ -48,6 +48,7 @@ import {
|
||||
} from '@blocksuite/affine/inlines/reference';
|
||||
import {
|
||||
BookmarkBlockModel,
|
||||
EmbedIframeBlockModel,
|
||||
EmbedLinkedDocModel,
|
||||
EmbedSyncedDocModel,
|
||||
} from '@blocksuite/affine/model';
|
||||
@@ -868,6 +869,12 @@ const inlineReferenceToolbarConfig = {
|
||||
} as const satisfies ToolbarModuleConfig;
|
||||
|
||||
const embedIframeToolbarConfig = {
|
||||
when: (ctx: ToolbarContext) => {
|
||||
const model = ctx.getCurrentModelByType(EmbedIframeBlockModel);
|
||||
if (!model) return false;
|
||||
|
||||
return !!model.props.url;
|
||||
},
|
||||
actions: [
|
||||
{
|
||||
id: 'a.copy-link-and-edit',
|
||||
|
||||
Reference in New Issue
Block a user