diff --git a/components/admin/AutogenPanel.js b/components/admin/AutogenPanel.js index 982d232..a16e76b 100644 --- a/components/admin/AutogenPanel.js +++ b/components/admin/AutogenPanel.js @@ -1,4 +1,5 @@ 'use client'; +import Link from 'next/link'; import { useState } from 'react'; import { useRouter } from 'next/navigation'; import { Play, Plus, Trash2, RefreshCw, Clock, CheckCircle, XCircle, Zap } from 'lucide-react'; @@ -291,74 +292,65 @@ export default function AutogenPanel({ status, queue, topics, categories = [] }) })} - {/* Очередь тем */} + {/* Планируется завтра — черновики сегодняшней генерации */}
-

- Очередь тем ({pendingQueue.length}) -

- +
+

+ Планируется завтра + + {pendingQueue.length > 0 ? `${pendingQueue.length} из 4 готово` : 'генерация в 17:00 МСК'} + +

+

+ Черновики которые выйдут завтра. Редактируй до 07:00 — потом авто-публикация. +

+
+ + Все черновики → +
- {showAddForm && ( -
-
- - setNewTopic(e.target.value)} - onKeyDown={e => e.key === 'Enter' && addTopic()} - placeholder="Тема статьи..." - className="flex-1 px-3 py-2 rounded-lg border border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-800 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500" - autoFocus - /> - -
-
- )} -
- {pendingQueue.length === 0 && !showAddForm && ( + {pendingQueue.length === 0 && (
- Очередь пуста — темы берутся из банка автоматически +
+ Черновики появятся сегодня в 17:00 МСК
)} {pendingQueue.map(item => { - const cat = CAT_LABELS[item.category]; + const cat = CAT_LABELS[item.category] || { icon: '📝', name: item.category, color: 'neutral' }; return ( -
- {cat?.icon || '📝'} +
+ {item.cover_url + ? + :
{cat.icon}
+ }
-
{item.topic}
-
{cat?.name} · приоритет {item.priority}
+
{item.title || '—'}
+
{cat.icon} {cat.name}
+
+
+ + Редактировать + +
-
); })}
+ + {pendingQueue.length > 0 && pendingQueue.length < 4 && ( +
+ ⚠️ Сгенерировано {pendingQueue.length} из 4 статей. Запусти генерацию вручную для недостающих категорий. +
+ )}
{/* Банк тем */}