feat: my tab shows time/version/status, restore -created sort

This commit is contained in:
2026-07-26 22:26:43 +08:00
parent df8f33dcca
commit f9256a564b
2 changed files with 10 additions and 5 deletions
+7 -2
View File
@@ -78,10 +78,15 @@ const PageMarket = {
_myCardHtml(d, collection) {
const pending = d.dashb_pending ? '<span class="badge" style="background:rgba(255,159,10,.15);color:#FF9F0A">待审核</span>' : '<span class="badge" style="background:rgba(52,199,89,.12);color:#34C759">已通过</span>';
const created = d.created ? new Date(d.created).toLocaleString('zh-CN', {month:'numeric',day:'numeric',hour:'2-digit',minute:'2-digit'}) : '-';
const updated = d.updated ? new Date(d.updated).toLocaleString('zh-CN', {month:'numeric',day:'numeric',hour:'2-digit',minute:'2-digit'}) : created;
return `<div class="glass-card" style="padding:14px 16px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap">
<div style="flex:1;min-width:200px">
<div style="font-weight:600;font-size:14px">${d.name||'Unnamed'}</div>
<div style="font-size:12px;color:var(--text-tertiary);margin-top:2px">${d.author||''} · ${d.downloads||0} 次下载 ${pending}</div>
<div style="font-weight:600;font-size:14px">${d.name||'Unnamed'} <span style="color:var(--text-tertiary);font-weight:400;font-size:12px">v${d.version||'1.0'}</span></div>
<div style="font-size:12px;color:var(--text-tertiary);margin-top:2px">
${d.author||''} · ${d.downloads||0} 次下载 · ${pending}
</div>
<div style="font-size:11px;color:var(--text-tertiary);margin-top:2px">上传: ${created}${updated!==created?' · 更新: '+updated:''}</div>
</div>
<div style="display:flex;gap:6px;flex-shrink:0">
<button class="btn btn-sm btn-secondary btn-my-update" data-id="${d.id}" data-coll="${collection}" data-file="${d.file||''}" data-type="${collection==='scenes'?'.tss':'.tsd'}">更新</button>