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/11889

Vanessa8f0346472649
diff --git a/app/src/editor/rename.ts b/app/src/editor/rename.ts
index edf6fb8c00..19dad2cd85 100644
--- a/app/src/editor/rename.ts
+++ b/app/src/editor/rename.ts
@@ -137,12 +137,14 @@ export const renameAsset = (assetPath: string) => {
fetchPost("/api/asset/renameAsset", {oldPath: assetPath, newName: inputElement.value}, (response) => {
getAllModels().asset.forEach(item => {
if (item.path === assetPath) {
+ item.path = response.data.newPath;
item.parent.updateTitle(getDisplayName(response.data.newPath));
}
});
getAllEditor().forEach(item => {
item.reload(false);
});
+ dialog.destroy();
});
});
};
diff --git a/app/src/layout/Tab.ts b/app/src/layout/Tab.ts
index 9aacd94a32..8bc41cd67a 100644
--- a/app/src/layout/Tab.ts
+++ b/app/src/layout/Tab.ts
@@ -67,7 +67,7 @@ export class Tab {
this.headElement.setAttribute("aria-label", escapeGreat(response.data));
});
} else {
- this.headElement.setAttribute("aria-label", escapeGreat(options.title));
+ this.headElement.setAttribute("aria-label", escapeGreat(this.title));
}
});
this.headElement.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => {