🎨 Manually optimize the data index to reduce space usage and improve performance https://github.com/siyuan-note/siyuan/issues/15663

This commit is contained in:
Daniel 2025-08-24 15:44:17 +08:00
parent f92074f386
commit 1f3c3a53b4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 16 additions and 0 deletions

View file

@ -254,6 +254,12 @@ ${checkUpdateHTML}
about.element.querySelector("#tokenTip").innerHTML = window.siyuan.languages.about14.replace("${token}", window.siyuan.config.api.token);
});
});
about.element.querySelector("#vacuumDataIndex").addEventListener("click", () => {
fetchPost("/api/system/vacuumDataIndex", {}, (response) => {});
});
about.element.querySelector("#rebuildDataIndex").addEventListener("click", () => {
fetchPost("/api/system/rebuildDataIndex", {}, (response) => {});
});
about.element.querySelector("#exportLog").addEventListener("click", () => {
fetchPost("/api/system/exportLog", {}, (response) => {
openByMobile(response.data.zip);

View file

@ -299,6 +299,16 @@ export const initAbout = () => {
event.preventDefault();
event.stopPropagation();
break;
} else if (target.id === "vacuumDataIndex") {
fetchPost("/api/system/vacuumDataIndex", {}, (response) => {});
event.preventDefault();
event.stopPropagation();
break;
} else if (target.id === "exportLog") {
fetchPost("/api/system/rebuildDataIndex", {}, (response) => {});
event.preventDefault();
event.stopPropagation();
break;
} else if (target.id === "exportLog") {
fetchPost("/api/system/exportLog", {}, (response) => {
openByMobile(response.data.zip);