From 171fc40dea879cc48cf962ff0fc761238b01adee Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 21 Apr 2023 20:51:28 +0800 Subject: [PATCH] :art: Support downloading cloud data snapshots to local on demand https://github.com/siyuan-note/siyuan/issues/8057 --- app/src/history/history.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/history/history.ts b/app/src/history/history.ts index 88a071ff6..908650397 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -146,7 +146,12 @@ const renderRepo = (element: Element, currentPage: number) => { renderRepoItem(response, element, "cloudTag"); }); } else if (currentPage === -3) { - fetchPost("/api/repo/getCloudRepoSnapshots", {marker: ""}, (response) => { + fetchPost("/api/repo/getCloudRepoSnapshots", {page: currentPage}, (response) => { + if (currentPage < response.data.pageCount) { + nextElement.removeAttribute("disabled"); + } else { + nextElement.setAttribute("disabled", "disabled"); + } renderRepoItem(response, element, "cloud"); }); }