mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
💄 移动端历史数据
This commit is contained in:
parent
3c99393849
commit
d3636e328f
2 changed files with 17 additions and 3 deletions
|
|
@ -162,10 +162,11 @@
|
|||
overflow: hidden;
|
||||
|
||||
.b3-chip--secondary {
|
||||
padding: 2px 8px;
|
||||
padding: 0 8px;
|
||||
display: inline;
|
||||
margin-right: 8px;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,19 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string
|
|||
}
|
||||
let repoHTML = "";
|
||||
response.data.snapshots.forEach((item: { memo: string, id: string, hCreated: string, count: number, hSize: string, tag: string }) => {
|
||||
repoHTML += `<li class="b3-list-item b3-list-item--hide-action" data-id="${item.id}" data-tag="${item.tag}">
|
||||
if (isMobile()) {
|
||||
repoHTML += `<li class="b3-list-item b3-list-item--two" data-id="${item.id}" data-tag="${item.tag}">
|
||||
<div class="b3-list-item__first">
|
||||
<span class="b3-chip b3-chip--secondary${item.tag ? "" : " fn__none"}">${item.tag}</span>
|
||||
${item.hCreated}<span class="fn__space"></span>
|
||||
<span class="b3-list-item__meta">${item.hSize}</span>
|
||||
<span class="fn__flex-1"></span>
|
||||
${actionHTML}
|
||||
</div>
|
||||
<span class="b3-list-item__meta">${escapeHtml(item.memo)}</span>
|
||||
</li>`;
|
||||
} else {
|
||||
repoHTML += `<li class="b3-list-item b3-list-item--hide-action" data-id="${item.id}" data-tag="${item.tag}">
|
||||
<div class="b3-list-item__text">
|
||||
<span class="b3-chip b3-chip--secondary${item.tag ? "" : " fn__none"}">${item.tag}</span>
|
||||
${item.hCreated}<span class="fn__space"></span>
|
||||
|
|
@ -133,6 +145,7 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string
|
|||
</div>
|
||||
${actionHTML}
|
||||
</li>`;
|
||||
}
|
||||
});
|
||||
element.lastElementChild.innerHTML = `${repoHTML}`;
|
||||
};
|
||||
|
|
@ -247,7 +260,7 @@ export const openHistory = () => {
|
|||
<span class="fn__space"></span>
|
||||
<span data-type="next" class="block__icon b3-tooltips b3-tooltips__se" disabled="disabled" aria-label="${window.siyuan.languages.nextLabel}"><svg><use xlink:href='#iconRight'></use></svg></span>
|
||||
<div class="fn__flex-1"></div>
|
||||
<select class="b3-select">
|
||||
<select class="b3-select" style="min-width: auto">
|
||||
<option value="0">${window.siyuan.languages.localSnapshot}</option>
|
||||
<option value="1">${window.siyuan.languages.localTagSnapshot}</option>
|
||||
<option value="2">${window.siyuan.languages.cloudTagSnapshot}</option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue