feat(AutogenPanel): визуальный индикатор today_active

Карточки категорий которые не выходят сегодня (ротация 4 из 8):
  - opacity-40 (приглушённый вид)
  - бейдж 'не сегодня' (серый) вместо 'сегодня' (зелёный)
This commit is contained in:
Aleksei Pavlov
2026-06-21 21:55:33 +03:00
parent 3cd7b3762e
commit d5a0fb2e19
+8 -2
View File
@@ -239,13 +239,19 @@ export default function AutogenPanel({ status, queue, topics, categories = [] })
const isRunning = running[s.category] || running.all; const isRunning = running[s.category] || running.all;
const nextRun = calcNextRun(s); const nextRun = calcNextRun(s);
return ( return (
<div key={s.category} className={`rounded-xl border p-5 ${colorCls}`}> <div key={s.category} className={`rounded-xl border p-5 transition-opacity ${colorCls} ${s.today_active === false ? "opacity-40" : ""}`}>
<div className="flex items-start justify-between mb-4"> <div className="flex items-start justify-between mb-4">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span className="text-2xl">{cat.icon}</span> <span className="text-2xl">{cat.icon}</span>
<div> <div>
<div className="font-semibold text-sm">{cat.name}</div> <div className="font-semibold text-sm">{cat.name}</div>
<div className="text-xs opacity-70">{s.article_count || 0} статей · {s.topic_count_free ?? s.topic_count ?? 0} тем свободно</div> <div className="text-xs opacity-70 flex items-center gap-1.5 flex-wrap">
<span>{s.article_count || 0} статей · {s.topic_count_free ?? s.topic_count ?? 0} тем свободно</span>
{s.today_active === false
? <span className="px-1.5 py-0.5 rounded text-[10px] font-semibold bg-neutral-200 dark:bg-neutral-700 text-neutral-500">не сегодня</span>
: <span className="px-1.5 py-0.5 rounded text-[10px] font-semibold bg-emerald-100 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400">сегодня</span>
}
</div>
</div> </div>
</div> </div>