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/15699 1&3

Vanessa125d18a0e1e4
diff --git a/app/src/card/viewCards.ts b/app/src/card/viewCards.ts
index 7ddd677f81..1001140801 100644
--- a/app/src/card/viewCards.ts
+++ b/app/src/card/viewCards.ts
@@ -67,10 +67,14 @@ export const viewCards = (app: App, deckID: string, title: string, deckType: "Tr
if (response.data.blocks.length > 0) {
edit = new Protyle(app, dialog.element.querySelector("#cardPreview") as HTMLElement, {
blockId: "",
+ action: [Constants.CB_GET_ALL],
render: {
gutter: true,
- breadcrumbDocName: true
+ breadcrumbDocName: true,
+ title: true,
+ hideTitleOnZoom: true,
},
+ typewriterMode: false
});
if (window.siyuan.mobile) {
window.siyuan.mobile.popEditor = edit;
@@ -310,6 +314,10 @@ const getArticle = (edit: Protyle, id: string) => {
data: getResponse,
protyle: edit.protyle,
action: getResponse.data.rootID === getResponse.data.id ? [Constants.CB_GET_HTML] : [Constants.CB_GET_ALL, Constants.CB_GET_HTML],
+ afterCB() {
+ edit.protyle.title.element.removeAttribute("data-render");
+ edit.protyle.title.render(edit.protyle, response);
+ }
});
});
});
diff --git a/app/src/protyle/header/openTitleMenu.ts b/app/src/protyle/header/openTitleMenu.ts
index beca1629f3..2b8e9eede6 100644
--- a/app/src/protyle/header/openTitleMenu.ts
+++ b/app/src/protyle/header/openTitleMenu.ts
@@ -24,6 +24,7 @@ import {transferBlockRef} from "../../menus/block";
import {addEditorToDatabase} from "../render/av/addToDatabase";
import {openFileById} from "../../editor/util";
import {hasTopClosestByClassName} from "../util/hasClosest";
+import {openMobileFileById} from "../../mobile/editor";
export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
hideTooltip();
@@ -214,22 +215,24 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
transferBlockRef(protyle.block.rootID);
}
window.siyuan.menus.menu.append(new MenuItem({id: "separator_3", type: "separator"}).element);
- /// #if !MOBILE
if (!protyle.model) {
window.siyuan.menus.menu.append(new MenuItem({
id: "openBy",
label: window.siyuan.languages.openBy,
icon: "iconOpen",
click() {
+ /// #if !MOBILE
openFileById({
app: protyle.app,
id: protyle.block.id,
action: protyle.block.rootID !== protyle.block.id ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_CONTEXT],
});
+ /// #else
+ openMobileFileById(protyle.app, protyle.block.id, protyle.block.rootID !== protyle.block.id ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_CONTEXT]);
+ /// #endif
}
}).element);
}
- /// #endif
/// #if !BROWSER
window.siyuan.menus.menu.append(new MenuItem({
id: "openByNewWindow",