mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-15 11:38:06 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
838f3977db
32 changed files with 500 additions and 52 deletions
|
|
@ -156,6 +156,26 @@ export const about = {
|
|||
<input class="b3-text-field fn__flex-center fn__size200" min="1" type="number" id="retentionIndexesDaily" value="${window.siyuan.config.repo.retentionIndexesDaily}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="fn__flex b3-label config__item">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.vacuumDataIndex}
|
||||
<div class="b3-label__text">${window.siyuan.languages.vacuumDataIndexTip}</div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<button id="vacuumDataIndex" class="b3-button b3-button--outline fn__size200 fn__flex-center">
|
||||
<svg><use xlink:href="#iconRefresh"></use></svg>${window.siyuan.languages.vacuumDataIndex}
|
||||
</button>
|
||||
</div>
|
||||
<div class="fn__flex b3-label config__item">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.rebuildDataIndex}
|
||||
<div class="b3-label__text">${window.siyuan.languages.rebuildDataIndexTip}</div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<button id="rebuildDataIndex" class="b3-button b3-button--outline fn__size200 fn__flex-center">
|
||||
<svg><use xlink:href="#iconRefresh"></use></svg>${window.siyuan.languages.rebuildDataIndex}
|
||||
</button>
|
||||
</div>
|
||||
<div class="fn__flex b3-label config__item">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.systemLog}
|
||||
|
|
@ -234,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);
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
|
|||
"systemLog", "importKey", "genKey", "genKeyByPW", "copyKey", "resetRepo", "systemLogTip", "export",
|
||||
"downloadLatestVer", "safeQuit", "directConnection", "siyuanNote", "key", "password", "copied", "resetRepoTip",
|
||||
"autoDownloadUpdatePkg", "autoDownloadUpdatePkgTip", "networkProxy", "keyPlaceholder", "initRepoKeyTip",
|
||||
"dataRepoPurge", "dataRepoPurgeTip", "dataRepoAutoPurgeIndexRetentionDays",
|
||||
"dataRepoAutoPurgeRetentionIndexesDaily"]),
|
||||
"dataRepoPurge", "dataRepoPurgeTip", "dataRepoAutoPurgeIndexRetentionDays", "dataRepoAutoPurgeRetentionIndexesDaily",
|
||||
"vacuumDataIndex", "vacuumDataIndexTip", "rebuildDataIndex", "rebuildDataIndexTip"]),
|
||||
];
|
||||
const inputElement = element.querySelector(".b3-form__icon input") as HTMLInputElement;
|
||||
/// #if !BROWSER
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ export const transactionError = () => {
|
|||
export const refreshFileTree = (cb?: () => void) => {
|
||||
window.siyuan.storage[Constants.LOCAL_FILEPOSITION] = {};
|
||||
setStorageVal(Constants.LOCAL_FILEPOSITION, window.siyuan.storage[Constants.LOCAL_FILEPOSITION]);
|
||||
fetchPost("/api/filetree/refreshFiletree", {}, () => {
|
||||
fetchPost("/api/system/rebuildDataIndex", {}, () => {
|
||||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,22 @@ export const initAbout = () => {
|
|||
<input class="b3-text-field fn__block" style="padding-right: 64px;" id="retentionIndexesDaily" min="1" type="number" class="b3-text-field" value="${window.siyuan.config.repo.retentionIndexesDaily}">
|
||||
<div class="b3-label__text">${window.siyuan.languages.dataRepoAutoPurgeRetentionIndexesDaily}</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
${window.siyuan.languages.vacuumDataIndex}
|
||||
<div class="fn__hr"></div>
|
||||
<button class="b3-button b3-button--outline fn__block" id="vacuumDataIndex">
|
||||
<svg><use xlink:href="#iconRefresh"></use></svg>${window.siyuan.languages.vacuumDataIndex}
|
||||
</button>
|
||||
<div class="b3-label__text">${window.siyuan.languages.vacuumDataIndexTip}</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
${window.siyuan.languages.rebuildDataIndex}
|
||||
<div class="fn__hr"></div>
|
||||
<button class="b3-button b3-button--outline fn__block" id="rebuildDataIndex">
|
||||
<svg><use xlink:href="#iconRefresh"></use></svg>${window.siyuan.languages.rebuildDataIndex}
|
||||
</button>
|
||||
<div class="b3-label__text">${window.siyuan.languages.rebuildDataIndexTip}</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
${window.siyuan.languages.systemLog}
|
||||
<div class="fn__hr"></div>
|
||||
|
|
@ -283,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 === "rebuildDataIndex") {
|
||||
fetchPost("/api/system/rebuildDataIndex", {}, (response) => {});
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (target.id === "exportLog") {
|
||||
fetchPost("/api/system/exportLog", {}, (response) => {
|
||||
openByMobile(response.data.zip);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue