mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00: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:
@@ -27,7 +27,7 @@ export const generateUrl = ({
|
||||
pageId,
|
||||
blockIds,
|
||||
elementIds,
|
||||
shareMode,
|
||||
shareMode: mode,
|
||||
xywh, // not needed currently
|
||||
}: UseSharingUrl) => {
|
||||
// Base URL construction
|
||||
@@ -36,13 +36,8 @@ export const generateUrl = ({
|
||||
|
||||
try {
|
||||
const url = new URL(`/workspace/${workspaceId}/${pageId}`, baseUrl);
|
||||
const search = toURLSearchParams({
|
||||
mode: shareMode,
|
||||
blockIds,
|
||||
elementIds,
|
||||
xywh,
|
||||
});
|
||||
if (search) url.search = search.toString();
|
||||
const search = toURLSearchParams({ mode, blockIds, elementIds, xywh });
|
||||
if (search?.size) url.search = search.toString();
|
||||
return url.toString();
|
||||
} catch {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user