mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08:00
fix(core): block link recognition in self-hosted (#8340)
Part of [BS-1445](https://linear.app/affine-design/issue/BS-1445/点击-affine-link-时识别应用内链接,以触发应用内跳转) <div class='graphite__hidden'> <div>🎥 Video uploaded on Graphite:</div> <a href="https://app.graphite.dev/media/video/8ypiIKZXudF5a0tIgIzf/fae580bc-7d30-4711-a70e-7a5cf26c76f1.mov"> <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/8ypiIKZXudF5a0tIgIzf/fae580bc-7d30-4711-a70e-7a5cf26c76f1.mov"> </a> </div> <video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/8ypiIKZXudF5a0tIgIzf/fae580bc-7d30-4711-a70e-7a5cf26c76f1.mov">Screen Recording 2024-09-21 at 10.50.12.mov</video>
This commit is contained in:
@@ -175,16 +175,21 @@ const DetailPageImpl = memo(function DetailPageImpl() {
|
||||
refNodeSlots.docLinkClicked.on(({ pageId, params }) => {
|
||||
if (params) {
|
||||
const { mode, blockIds, elementIds } = params;
|
||||
return jumpToPageBlock(
|
||||
jumpToPageBlock(
|
||||
docCollection.id,
|
||||
pageId,
|
||||
mode,
|
||||
blockIds,
|
||||
elementIds
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
return openPage(docCollection.id, pageId);
|
||||
if (editor.doc.id === pageId) {
|
||||
return;
|
||||
}
|
||||
|
||||
openPage(docCollection.id, pageId);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -247,13 +247,12 @@ const SharePageInner = ({
|
||||
refNodeSlots.docLinkClicked.on(({ pageId, params }) => {
|
||||
if (params) {
|
||||
const { mode, blockIds, elementIds } = params;
|
||||
return jumpToPageBlock(
|
||||
workspaceId,
|
||||
pageId,
|
||||
mode,
|
||||
blockIds,
|
||||
elementIds
|
||||
);
|
||||
jumpToPageBlock(workspaceId, pageId, mode, blockIds, elementIds);
|
||||
return;
|
||||
}
|
||||
|
||||
if (editor.doc.id === pageId) {
|
||||
return;
|
||||
}
|
||||
|
||||
return openPage(workspaceId, pageId);
|
||||
|
||||
Reference in New Issue
Block a user