mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-18 18:41:52 +08:00
chore(mobile): disable reference popup on mobile (#8743)
This PR disable reference node popup on mobile. Close [BS-1730](https://linear.app/affine-design/issue/BS-1730/%E7%A6%81%E7%94%A8-block-yuan%E7%B4%A0%E7%9A%84-toolbar)
This commit is contained in:
+13
@@ -40,6 +40,7 @@ import type {
|
|||||||
PeekOptions,
|
PeekOptions,
|
||||||
PeekViewService as BSPeekViewService,
|
PeekViewService as BSPeekViewService,
|
||||||
QuickSearchResult,
|
QuickSearchResult,
|
||||||
|
ReferenceNodeConfig,
|
||||||
RootBlockConfig,
|
RootBlockConfig,
|
||||||
RootService,
|
RootService,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
@@ -57,6 +58,7 @@ import {
|
|||||||
PeekViewExtension,
|
PeekViewExtension,
|
||||||
QuickSearchExtension,
|
QuickSearchExtension,
|
||||||
ReferenceNodeConfigExtension,
|
ReferenceNodeConfigExtension,
|
||||||
|
ReferenceNodeConfigIdentifier,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import { type BlockSnapshot, Text } from '@blocksuite/affine/store';
|
import { type BlockSnapshot, Text } from '@blocksuite/affine/store';
|
||||||
import {
|
import {
|
||||||
@@ -567,6 +569,17 @@ export function patchForMobile() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide reference popup on mobile.
|
||||||
|
{
|
||||||
|
const prev = di.getFactory(ReferenceNodeConfigIdentifier);
|
||||||
|
di.override(ReferenceNodeConfigIdentifier, provider => {
|
||||||
|
return {
|
||||||
|
...prev?.(provider),
|
||||||
|
hidePopup: true,
|
||||||
|
} satisfies ReferenceNodeConfig;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Disable some toolbar widgets for mobile.
|
// Disable some toolbar widgets for mobile.
|
||||||
{
|
{
|
||||||
di.override(WidgetViewMapIdentifier('affine:page'), () => {
|
di.override(WidgetViewMapIdentifier('affine:page'), () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user