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;