feat: dashboard cards show preview.jpg background when available

This commit is contained in:
2026-07-27 11:31:19 +08:00
parent c4035acf0c
commit 64bf6d9603
+2 -1
View File
@@ -289,9 +289,10 @@ const PageDashboard = {
const isAll = supported === 'all';
const compatLabel = isAll ? '全' : '限';
const compatClass = isAll ? 'badge-info' : 'badge-warning';
const preview = `/dashboard/${theme.id}/preview.jpg`;
return `
<div class="glass-card theme-card" data-theme-id="${theme.id}">
<div class="theme-card-preview">${icon}</div>
<div class="theme-card-preview" style="background-image:url(${preview});background-size:cover;background-position:center">${icon}</div>
<div class="theme-card-info">
<div class="theme-card-name">${theme.name || 'Unnamed'}</div>
<div class="theme-card-meta">