diff --git a/src/app/dashboard/streaming/page.tsx b/src/app/dashboard/streaming/page.tsx new file mode 100644 index 0000000..d0a73a5 --- /dev/null +++ b/src/app/dashboard/streaming/page.tsx @@ -0,0 +1,45 @@ +import { RadioTower, ExternalLink } from 'lucide-react'; + +export const metadata = { + title: 'Gestor StreamingTV | Almeira CMS', +}; + +export default function StreamingAdminPage() { + return ( +
+
+
+

+
+ +
+ Gestor StreamingTV +

+

+ Panel administrativo integrado del servidor Datarhei Restreamer. Desde aquí puedes controlar la captura, el estado y las transmisiones de tu canal de TV. +

+
+ + + Abrir en Pestaña Nueva + +
+ +
+
+ + +
+
+ ); +} diff --git a/src/components/LiveClock.tsx b/src/components/LiveClock.tsx new file mode 100644 index 0000000..3e7a534 --- /dev/null +++ b/src/components/LiveClock.tsx @@ -0,0 +1,39 @@ +'use client'; + +import { useEffect, useState } from 'react'; + +export default function LiveClock() { + const [time, setTime] = useState(null); + + useEffect(() => { + setTime(new Date()); + const timer = setInterval(() => setTime(new Date()), 1000); + return () => clearInterval(timer); + }, []); + + if (!time) return null; + + const dateStr = time.toLocaleDateString('es-CO', { + weekday: 'long', + day: 'numeric', + month: 'long', + year: 'numeric' + }); + + const timeStr = time.toLocaleTimeString('es-CO', { + hour: 'numeric', + minute: '2-digit', + second: '2-digit' + }); + + return ( +
+ + {dateStr} + + + {timeStr} + +
+ ); +} diff --git a/src/components/NewsTicker.tsx b/src/components/NewsTicker.tsx index 8a3b48b..df1cb33 100644 --- a/src/components/NewsTicker.tsx +++ b/src/components/NewsTicker.tsx @@ -4,6 +4,7 @@ import { Query } from 'node-appwrite'; import Link from 'next/link'; import { MessageCircle } from 'lucide-react'; import { Settings } from '@/types/settings'; +import LiveClock from './LiveClock'; export default async function NewsTicker() { let tickerItems: any[] = []; @@ -110,43 +111,58 @@ export default async function NewsTicker() { if (tickerItems.length === 0) return null; return ( -
-
-
- -
- {/* Doble render para bucle infinito visual */} - {[...tickerItems, ...tickerItems].map((item, idx) => { - const isWA = item.type === 'whatsapp'; - - const Content = ( -
- {isWA ? ( -
- -
- ) : ( - item.imagenUrl && ( - // eslint-disable-next-line @next/next/no-img-element - {item.titulo} - ) - )} - - - {isWA && COMUNIDAD} - {item.titulo.length > 80 ? item.titulo.substring(0, 80) + '...' : item.titulo} - -
- ); - - if (item.slug) { - return {Content}; - } - return
{Content}
; - })} +
+ {/* Left Block */} +
+ Últimas Noticias
+ + {/* Middle Marquee */} +
+
+
+ +
+ {/* Doble render para bucle infinito visual */} + {[...tickerItems, ...tickerItems].map((item, idx) => { + const isWA = item.type === 'whatsapp'; + + const Content = ( +
+ {isWA ? ( +
+ +
+ ) : ( + item.imagenUrl && ( + // eslint-disable-next-line @next/next/no-img-element + {item.titulo} + ) + )} + + + {isWA && COMUNIDAD} + {item.titulo.length > 90 ? item.titulo.substring(0, 90) + '...' : item.titulo} + +
+ ); + + if (item.slug) { + return {Content}; + } + return
{Content}
; + })} +
+
+ + {/* Right Block */} + {settings.show_news_date !== false && ( +
+ +
+ )}