diff --git a/app/src/history/history.ts b/app/src/history/history.ts index b79b4283e..0b25289d0 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -80,6 +80,65 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string return; } let actionHTML = ""; + /// #if MOBILE + if (type === "getCloudRepoTagSnapshots") { + actionHTML = ` + + + + ${window.siyuan.languages.download} + + + + + + ${window.siyuan.languages.remove} + +`; + } else if (type === "getCloudRepoSnapshots") { + actionHTML = ` + + + + ${window.siyuan.languages.download} + +`; + } else if (type === "getRepoTagSnapshots") { + actionHTML = ` + + + + ${window.siyuan.languages.upload} + + + + + + ${window.siyuan.languages.rollback} + + + + + + ${window.siyuan.languages.remove} + +`; + } else if (type === "getRepoSnapshots") { + actionHTML = ` + + + + ${window.siyuan.languages.tagSnapshot} + + + + + + ${window.siyuan.languages.rollback} + +`; + } + /// #else if (type === "getCloudRepoTagSnapshots") { actionHTML = ` `; @@ -93,8 +152,8 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string actionHTML = ` `; } + /// #endif let repoHTML = ""; - const isPhone = isMobile(); response.data.snapshots.forEach((item: { memo: string, id: string, @@ -104,30 +163,42 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string tag: string, typesCount: { type: string, count: number }[] }) => { - repoHTML += `
${item.id.substring(0, 7)} ${item.hCreated}
-
- `;
- let statHTML = "";
- if (item.typesCount && 0 < item.typesCount.length && !isPhone) {
- statHTML += `
- ${item.id.substring(0, 7)}
+
+