Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/9695

Vanessa72752f441ae3
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index 58ed0f1f1d..2eb81dd35b 100644
--- a/app/src/dialog/processSystem.ts
+++ b/app/src/dialog/processSystem.ts
@@ -49,6 +49,7 @@ export const reloadSync = (app: App, data: { upsertRootIDs: string[], removeRoot
fetchPost("/api/block/getDocInfo", {
id: window.siyuan.mobile.editor.protyle.block.rootID
}, (response) => {
+ setTitle(response.data.name);
(document.getElementById("toolbarName") as HTMLInputElement).value = response.data.name === "Untitled" ? "" : response.data.name;
});
}
diff --git a/app/src/mobile/util/MobileBackFoward.ts b/app/src/mobile/util/MobileBackFoward.ts
index 5d63f9a250..b5768d8753 100644
--- a/app/src/mobile/util/MobileBackFoward.ts
+++ b/app/src/mobile/util/MobileBackFoward.ts
@@ -12,6 +12,7 @@ import {closePanel} from "./closePanel";
import {showMessage} from "../../dialog/message";
import {getCurrentEditor} from "../editor";
import {avRender} from "../../protyle/render/av/render";
+import {setTitle} from "../../dialog/processSystem";
const forwardStack: IBackStack[] = [];
@@ -42,6 +43,7 @@ const focusStack = (backStack: IBackStack) => {
fetchPost("/api/block/getDocInfo", {
id: backStack.id,
}, (response) => {
+ setTitle(response.data.name);
(document.getElementById("toolbarName") as HTMLInputElement).value = response.data.name === "Untitled" ? "" : response.data.name;
protyle.background.render(response.data.ial, protyle.block.rootID);
protyle.wysiwyg.renderCustom(response.data.ial);
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index 05320a4f60..0abd376deb 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -19,6 +19,7 @@ import {activeBlur, hideKeyboardToolbar, initKeyboardToolbar} from "./keyboardTo
import {syncGuide} from "../../sync/syncGuide";
import {Inbox} from "../../layout/dock/Inbox";
import {App} from "../../index";
+import {setTitle} from "../../dialog/processSystem";
export const initFramework = (app: App, isStart: boolean) => {
setInlineStyle();
@@ -162,5 +163,6 @@ const initEditorName = () => {
path: window.siyuan.mobile.editor.protyle.path,
title: inputElement.value,
});
+ setTitle(inputElement.value);
});
};
diff --git a/app/src/mobile/util/setEmpty.ts b/app/src/mobile/util/setEmpty.ts
index 942a478b6e..564819fd28 100644
--- a/app/src/mobile/util/setEmpty.ts
+++ b/app/src/mobile/util/setEmpty.ts
@@ -5,8 +5,10 @@ import {popSearch} from "../menu/search";
import {getRecentDocs} from "../menu/getRecentDocs";
import {openHistory} from "../../history/history";
import {App} from "../../index";
+import {setTitle} from "../../dialog/processSystem";
export const setEmpty = (app: App) => {
+ setTitle(window.siyuan.languages.siyuanNote);
document.getElementById("toolbarName").classList.add("fn__hidden");
document.getElementById("editor").classList.add("fn__none");
const emptyElement = document.getElementById("empty");
@@ -75,7 +77,9 @@ export const setEmpty = (app: App) => {
};
export const setEditor = () => {
- document.getElementById("toolbarName").classList.remove("fn__hidden");
+ const toolbarNameElement = document.getElementById("toolbarName") as HTMLInputElement
+ setTitle(toolbarNameElement.value);
+ toolbarNameElement.classList.remove("fn__hidden");
document.getElementById("editor").classList.remove("fn__none");
document.getElementById("empty").classList.add("fn__none");
};