Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/12478

Vanessa9f62738fa49c
diff --git a/app/src/mobile/dock/MobileBacklinks.ts b/app/src/mobile/dock/MobileBacklinks.ts
index 475673cefb..74bf8c4b7b 100644
--- a/app/src/mobile/dock/MobileBacklinks.ts
+++ b/app/src/mobile/dock/MobileBacklinks.ts
@@ -44,14 +44,14 @@ export class MobileBacklinks {
element: this.element.querySelector(".backlinkList") as HTMLElement,
data: null,
click(element: HTMLElement) {
- openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
+ openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_CONTEXT]);
}
});
this.mTree = new Tree({
element: this.element.querySelector(".backlinkMList") as HTMLElement,
data: null,
click: (element) => {
- openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
+ openMobileFileById(app, element.getAttribute("data-node-id"), [Constants.CB_GET_CONTEXT]);
},
});
this.element.addEventListener("click", (event) => {
diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts
index b2541a0195..1afc7c23a5 100644
--- a/app/src/mobile/dock/MobileFiles.ts
+++ b/app/src/mobile/dock/MobileFiles.ts
@@ -223,7 +223,7 @@ export class MobileFiles extends Model {
} else if (target.tagName === "LI") {
this.setCurrent(target);
if (target.getAttribute("data-type") === "navigation-file") {
- openMobileFileById(app, target.getAttribute("data-node-id"), [Constants.CB_GET_SCROLL, Constants.CB_GET_HL]);
+ openMobileFileById(app, target.getAttribute("data-node-id"), [Constants.CB_GET_SCROLL]);
} else if (target.getAttribute("data-type") === "navigation-root") {
const ulElement = hasTopClosestByTag(target, "UL");
if (ulElement) {
diff --git a/app/src/mobile/dock/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts
index 2b6be67057..78aaae5e31 100644
--- a/app/src/mobile/dock/MobileOutline.ts
+++ b/app/src/mobile/dock/MobileOutline.ts
@@ -37,7 +37,7 @@ export class MobileOutline {
document.getElementById(id)?.scrollIntoView();
} else {
checkFold(id, (zoomIn) => {
- openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_HL, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);
+ openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML]);
});
}
}
diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts
index 3e5c01dd36..ad2b1c95d4 100644
--- a/app/src/mobile/index.ts
+++ b/app/src/mobile/index.ts
@@ -162,7 +162,7 @@ window.hideKeyboardToolbar = hideKeyboardToolbar;
window.openFileByURL = (openURL) => {
if (openURL && isSYProtocol(openURL)) {
openMobileFileById(siyuanApp, getIdFromSYProtocol(openURL),
- getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ getSearch("focus", openURL) === "1" ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
return true;
}
return false;
diff --git a/app/src/mobile/menu/getRecentDocs.ts b/app/src/mobile/menu/getRecentDocs.ts
index bde4ebb549..43227044ae 100644
--- a/app/src/mobile/menu/getRecentDocs.ts
+++ b/app/src/mobile/menu/getRecentDocs.ts
@@ -24,7 +24,7 @@ ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, "b3-list-item__graphic
element.firstElementChild.addEventListener("click", (event) => {
const liElement = hasClosestByClassName(event.target as HTMLElement, "b3-list-item");
if (liElement) {
- openMobileFileById(app, liElement.dataset.nodeId, [Constants.CB_GET_SCROLL, Constants.CB_GET_HL]);
+ openMobileFileById(app, liElement.dataset.nodeId, [Constants.CB_GET_SCROLL]);
}
});
}
diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.ts
index f459355801..233e574ca4 100644
--- a/app/src/mobile/menu/search.ts
+++ b/app/src/mobile/menu/search.ts
@@ -591,7 +591,7 @@ const initSearchEvent = (app: App, element: Element, config: Config.IUILayoutTab
preventScroll(window.siyuan.mobile.editor.protyle);
}
checkFold(id, (zoomIn) => {
- openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
});
closePanel();
} else {
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index 3c9747efe5..b8497f7e78 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -174,7 +174,7 @@ export const initFramework = (app: App, isStart: boolean) => {
const idZoomIn = getIdZoomInByPath();
if (idZoomIn.id) {
openMobileFileById(app, idZoomIn.id,
- idZoomIn.isZoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ idZoomIn.isZoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
return;
}
if (window.siyuan.config.fileTree.closeTabsOnStart && isStart) {
@@ -184,12 +184,12 @@ export const initFramework = (app: App, isStart: boolean) => {
const localDoc = window.siyuan.storage[Constants.LOCAL_DOCINFO];
fetchPost("/api/block/checkBlockExist", {id: localDoc.id}, existResponse => {
if (existResponse.data) {
- openMobileFileById(app, localDoc.id, [Constants.CB_GET_SCROLL, Constants.CB_GET_HL]);
+ openMobileFileById(app, localDoc.id, [Constants.CB_GET_SCROLL]);
} else {
fetchPost("/api/block/getRecentUpdatedBlocks", {}, (response) => {
if (response.data.length !== 0) {
checkFold(response.data[0].id, (zoomIn) => {
- openMobileFileById(app, response.data[0].id, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ openMobileFileById(app, response.data[0].id, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
});
} else {
setEmpty(app);
diff --git a/app/src/mobile/util/onMessage.ts b/app/src/mobile/util/onMessage.ts
index 9fd1ac4d42..d809615a6c 100644
--- a/app/src/mobile/util/onMessage.ts
+++ b/app/src/mobile/util/onMessage.ts
@@ -45,7 +45,7 @@ export const onMessage = (app: App, data: IWebSocketData) => {
}
break;
case "openFileById":
- openMobileFileById(app, data.data.id, [Constants.CB_GET_HL]);
+ openMobileFileById(app, data.data.id);
break;
case"txerr":
transactionError();
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 16d8d9aec7..71551afc7f 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -2142,7 +2142,7 @@ export class WYSIWYG {
action.push(Constants.CB_GET_HL);
}
/// #if MOBILE
- openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
activeBlur();
hideKeyboardToolbar();
/// #else
@@ -2207,7 +2207,7 @@ export class WYSIWYG {
excludeIDs: [blockElement.getAttribute("data-node-id")]
}, (response) => {
checkFold(response.data[0], (zoomIn) => {
- openMobileFileById(protyle.app, response.data[0], zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ openMobileFileById(protyle.app, response.data[0], zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
activeBlur();
hideKeyboardToolbar();
});
@@ -2278,7 +2278,7 @@ export class WYSIWYG {
const embedId = embedItemElement.getAttribute("data-id");
checkFold(embedId, (zoomIn, action) => {
/// #if MOBILE
- openMobileFileById(protyle.app, embedId, zoomIn ? [Constants.CB_GET_ALL, Constants.CB_GET_HL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
+ openMobileFileById(protyle.app, embedId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
activeBlur();
hideKeyboardToolbar();
/// #else