From 4c8dd35d53b9d80766a865f66da92e5bbaef9dfb Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Mon, 13 Apr 2026 12:03:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=A1=E7=89=87=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=A4=E8=A1=8C=EF=BC=8C=E7=AC=AC=E4=BA=8C=E8=A1=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=86=85=E5=AE=B9=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xian_favor/api.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/xian_favor/api.py b/xian_favor/api.py index fd4a123..96c56a3 100644 --- a/xian_favor/api.py +++ b/xian_favor/api.py @@ -541,18 +541,21 @@ function renderItems(items) { container.innerHTML = items.map(item => `
-
+
-
+
${getTypeIcon(item.type)} ${item.title || truncate(item.content || item.url, 30)}
+

+ ${item.url ? truncate(item.url, 50) : item.content ? truncate(item.content, 50) : item.note ? truncate(item.note, 50) : ''} + ${item.type === 'todo' ? `${getStatusLabelShort(item.status)} ${getPriorityLabelShort(item.priority)} ${item.due_date ? '๐Ÿ“…' + item.due_date : ''}` : ''} +

-
- ${item.tags.slice(0, 3).map(t => `${t}`).join('')} - ${item.type === 'todo' ? `${getStatusLabelShort(item.status)}` : ''} - - ${item.type === 'todo' && item.status !== 'completed' ? `` : ''} - +
+ ${item.tags.slice(0, 2).map(t => `${t}`).join('')} + + ${item.type === 'todo' && item.status !== 'completed' ? `` : ''} +
@@ -766,6 +769,11 @@ function getStatusLabelShort(status) { return labels[status] || status; } +function getPriorityLabelShort(priority) { + const labels = { low: '๐ŸŸข', medium: '๐ŸŸก', high: '๐ŸŸ ', urgent: '๐Ÿ”ด' }; + return labels[priority] || ''; +} + function getPriorityLabel(priority) { const labels = { low: '๐ŸŸข ไฝŽ', medium: '๐ŸŸก ไธญ', high: '๐ŸŸ  ้ซ˜', urgent: '๐Ÿ”ด ็ดงๆ€ฅ' }; return labels[priority] || priority;