mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(editor): update footnote node style and config (#10392)
[BS-2581](https://linear.app/affine-design/issue/BS-2581/优化-footnote-node-正文样式)
This commit is contained in:
@@ -4,6 +4,7 @@ import type { AIChatBlockModel } from '@affine/core/blocksuite/ai/blocks/ai-chat
|
||||
import { createPageModePreviewSpecs } from '@affine/core/blocksuite/block-suite-editor/specs/preview';
|
||||
import { AINetworkSearchService } from '@affine/core/modules/ai-button/services/network-search';
|
||||
import type { EditorHost } from '@blocksuite/affine/block-std';
|
||||
import { FootNoteNodeConfigExtension } from '@blocksuite/affine/blocks';
|
||||
import { useFramework } from '@toeverything/infra';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
@@ -12,6 +13,11 @@ export type AIChatBlockPeekViewProps = {
|
||||
host: EditorHost;
|
||||
};
|
||||
|
||||
// Disable hover effect for footnote node in center peek preview mode
|
||||
const FOOTNOTE_CONFIG = FootNoteNodeConfigExtension({
|
||||
disableHoverEffect: true,
|
||||
});
|
||||
|
||||
export const AIChatBlockPeekView = ({
|
||||
model,
|
||||
host,
|
||||
@@ -20,6 +26,7 @@ export const AIChatBlockPeekView = ({
|
||||
const searchService = framework.get(AINetworkSearchService);
|
||||
return useMemo(() => {
|
||||
const previewSpecBuilder = createPageModePreviewSpecs(framework);
|
||||
previewSpecBuilder.extend([FOOTNOTE_CONFIG]);
|
||||
const networkSearchConfig = {
|
||||
visible: searchService.visible,
|
||||
enabled: searchService.enabled,
|
||||
|
||||
Reference in New Issue
Block a user