feat: Add recent published section and filter self-interactions
- Add "Publicaciones Recientes" section to dashboard showing published posts - Filter out self-generated interactions in X API (thread auto-replies) - Improve username resolution for X interactions using user expansions - Pass recent_published data to dashboard template Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -166,6 +166,46 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recent Published Posts -->
|
||||
<div class="mt-8">
|
||||
<div class="card rounded-2xl p-6">
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<h2 class="text-lg font-semibold flex items-center gap-2">
|
||||
<span>✅</span>
|
||||
<span>Publicaciones Recientes</span>
|
||||
</h2>
|
||||
<a href="/posts?status=published" class="text-primary text-sm hover:underline">Ver todas</a>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-4">
|
||||
{% if recent_published %}
|
||||
{% for post in recent_published %}
|
||||
<div class="bg-dark-800/50 rounded-xl p-4 hover:bg-dark-700/50 transition-colors">
|
||||
<div class="flex items-center gap-2 mb-2">
|
||||
{% for platform in post.platforms %}
|
||||
<span class="text-xs bg-green-500/20 text-green-400 px-2 py-1 rounded-full">{{ platform }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p class="text-sm text-gray-300 line-clamp-3">{{ post.content[:120] }}{% if post.content|length > 120 %}...{% endif %}</p>
|
||||
<div class="flex items-center justify-between mt-3">
|
||||
<span class="text-xs text-gray-500">{{ post.published_at[:10] if post.published_at else '-' }}</span>
|
||||
{% if post.platform_post_ids %}
|
||||
<a href="https://x.com/i/status/{{ post.platform_post_ids.x }}" target="_blank" class="text-xs text-primary hover:underline" {% if not post.platform_post_ids.x %}style="display:none"{% endif %}>
|
||||
Ver en X
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="col-span-full text-center py-8 text-gray-500">
|
||||
<span class="text-4xl mb-2 block">📭</span>
|
||||
<p>No hay publicaciones recientes</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Quick Actions -->
|
||||
<div class="mt-8">
|
||||
<h2 class="text-lg font-semibold mb-4">Acciones Rápidas</h2>
|
||||
|
||||
Reference in New Issue
Block a user