Skip to content

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

:bug: Prevent accidental history rollback on mobile https://github.com/siyuan-note/siyuan/issues/18490

Daniel5a0873e5bf14
diff --git a/app/src/assets/scss/business/_history.scss b/app/src/assets/scss/business/_history.scss
index 3c9015120a..44eb193aa1 100644
--- a/app/src/assets/scss/business/_history.scss
+++ b/app/src/assets/scss/business/_history.scss
@@ -287,7 +287,7 @@
}
@media (hover: none) {
- .history__side .b3-list-item--hide-action > [data-type="selectVersion"] {
+ .history__side .b3-list-item--hide-action > .b3-list-item__action {
display: flex;
}
}
diff --git a/app/src/history/doc.ts b/app/src/history/doc.ts
index 6e7335cc41..41eeac320a 100644
--- a/app/src/history/doc.ts
+++ b/app/src/history/doc.ts
@@ -69,12 +69,12 @@ const renderDoc = (element: HTMLElement, currentPage: number, id: string) => {
logsHTML += `<li class="b3-list-item b3-list-item--hide-action" data-created="${item}">
<span class="b3-list-item__text">${dayjs(parseInt(item) * 1000).format("YYYY-MM-DD HH:mm:ss")}</span>
<span class="fn__space"></span>
- <span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="selectVersion" aria-pressed="false" aria-label="${window.siyuan.languages.compare}">
- <svg><use xlink:href="#iconUncheck"></use></svg>
- </span>
<span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="rollback" aria-label="${window.siyuan.languages.rollback}">
<svg><use xlink:href="#iconUndo"></use></svg>
</span>
+ <span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="selectVersion" aria-pressed="false" aria-label="${window.siyuan.languages.compare}">
+ <svg><use xlink:href="#iconUncheck"></use></svg>
+ </span>
</li>`;
});
listElement.innerHTML = logsHTML;
diff --git a/app/src/history/repoFile.ts b/app/src/history/repoFile.ts
index 2ec69db376..9d35b7e17b 100644
--- a/app/src/history/repoFile.ts
+++ b/app/src/history/repoFile.ts
@@ -33,14 +33,14 @@ export const renderRepoFileList = (files: IRepoFile[], element: Element, showPat
html += `<li class="b3-list-item b3-list-item--hide-action" data-type="searchFileItem" data-id="${item.fileID}" data-snapshot="${item.indexID}" data-created="${item.updated}" data-title="${escapeAttr(item.title)}">
<span class="b3-list-item__text">${dayjs(item.updated).format("YYYY-MM-DD HH:mm:ss")}</span>
<span class="fn__space"></span>
- <span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="selectVersion" aria-pressed="false" aria-label="${window.siyuan.languages.compare}">
- <svg><use xlink:href="#iconUncheck"></use></svg>
+ <span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="rollback" aria-label="${window.siyuan.languages.rollback}">
+ <svg><use xlink:href="#iconUndo"></use></svg>
</span>
<span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="saveAs" aria-label="${window.siyuan.languages.saveAs}">
<svg><use xlink:href="#iconDownload"></use></svg>
</span>
- <span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="rollback" aria-label="${window.siyuan.languages.rollback}">
- <svg><use xlink:href="#iconUndo"></use></svg>
+ <span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="selectVersion" aria-pressed="false" aria-label="${window.siyuan.languages.compare}">
+ <svg><use xlink:href="#iconUncheck"></use></svg>
</span>
</li>`;
return;