From 63f91fb85d36d6d5ee21a02d469ac7cde6e4ad46 Mon Sep 17 00:00:00 2001 From: ZeroDay Date: Tue, 7 Jul 2026 15:46:13 +0000 Subject: [PATCH] =?UTF-8?q?fix(admin-dashboard):=20=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=D0=B8=20=D1=81=20=D0=B1=D1=83=D0=B4=D1=83=D1=89?= =?UTF-8?q?=D0=B8=D0=BC=20published=5Fat=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BA=D0=B0=D0=BA=20=C2=AB?= =?UTF-8?q?=D0=97=D0=B0=D0=BF=D0=BB=D0=B0=D0=BD=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=C2=BB=20(=D1=81=D0=B8=D0=BD=D0=B8=D0=B9),=20?= =?UTF-8?q?=D0=BD=D0=B5=20=C2=AB=D0=9E=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=BE=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/(protected)/page.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/admin/(protected)/page.js b/app/admin/(protected)/page.js index 78cd6d9..3dce95d 100644 --- a/app/admin/(protected)/page.js +++ b/app/admin/(protected)/page.js @@ -159,13 +159,19 @@ export default async function AdminDashboard() { {a.title}
- - {a.status === 'published' ? 'Опубликовано' : 'Черновик'} - + {(() => { + const future = a.status === 'published' && a.published_at && new Date(a.published_at) > new Date(); + const cls = future + ? 'bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400' + : a.status === 'published' + ? 'bg-emerald-50 dark:bg-emerald-950 text-emerald-600 dark:text-emerald-400' + : 'bg-amber-50 dark:bg-amber-950 text-amber-600 dark:text-amber-400'; + return ( + + {future ? 'Запланировано' : (a.status === 'published' ? 'Опубликовано' : 'Черновик')} + + ); + })()} {a.tags?.slice(0, 2).map(t => ( #{t} ))}