diff --git a/app/src/history/doc.ts b/app/src/history/doc.ts
index 108471a85..a985f6eab 100644
--- a/app/src/history/doc.ts
+++ b/app/src/history/doc.ts
@@ -66,8 +66,11 @@ export const openDocHistory = (options: {
${window.siyuan.languages.emptyContent}
-
-
+
`;
const dialog = new Dialog({
title:`
@@ -165,6 +168,7 @@ export const openDocHistory = (options: {
action: [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML],
});
}
+ dialog.element.querySelector('.protyle-title__input').textContent = item.title;
isLoading = false;
});
target.parentElement.querySelector(".b3-list-item--focus")?.classList.remove("b3-list-item--focus");
diff --git a/app/src/history/history.ts b/app/src/history/history.ts
index 9769f2ff6..7d39aadc5 100644
--- a/app/src/history/history.ts
+++ b/app/src/history/history.ts
@@ -397,9 +397,12 @@ export const openHistory = (app: App) => {
${window.siyuan.languages.emptyContent}
-
-
-
+
@@ -480,6 +483,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {
const docElement = firstPanelElement.querySelector('.history__text[data-type="docPanel"]') as HTMLElement;
const assetElement = firstPanelElement.querySelector('.history__text[data-type="assetPanel"]');
const mdElement = firstPanelElement.querySelector('.history__text[data-type="mdPanel"]') as HTMLTextAreaElement;
+ const titleElement = firstPanelElement.querySelector('.protyle-title__input') as HTMLElement;
renderDoc(firstPanelElement, 1);
historyEditor = new Protyle(app, docElement, {
blockId: "",
@@ -706,6 +710,7 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {
}
});
}
+ titleElement.textContent = target.querySelector(".b3-list-item__text").textContent;
let currentItem = hasClosestByClassName(target, "b3-list") as HTMLElement;
if (currentItem) {
currentItem = currentItem.querySelector(".b3-list-item--focus");
@@ -864,8 +869,6 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {
}
);
}
-
-
} else if ((type === "docprevious" || type === "docnext") && target.getAttribute("disabled") !== "disabled") {
const currentPage = parseInt(firstPanelElement.getAttribute("data-page"));
renderDoc(firstPanelElement, type === "docprevious" ? currentPage - 1 : currentPage + 1);