From b8383291746f342352cdd314235234d5a4011ee2 Mon Sep 17 00:00:00 2001
From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com>
Date: Mon, 1 Sep 2025 20:53:21 +0000
Subject: [PATCH] Improve video display and pagination on the history page
Refactor the `GeschichteLiedPage` component to display videos with descriptions and update pagination logic for better user experience.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 890577b1-c154-40a4-a177-a0c6d55320c3
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/890577b1-c154-40a4-a177-a0c6d55320c3/2xHHKQn
---
client/src/pages/GeschichteLiedPage.tsx | 139 +++++++++++++++---------
1 file changed, 88 insertions(+), 51 deletions(-)
diff --git a/client/src/pages/GeschichteLiedPage.tsx b/client/src/pages/GeschichteLiedPage.tsx
index 8ce503e..1d7d516 100644
--- a/client/src/pages/GeschichteLiedPage.tsx
+++ b/client/src/pages/GeschichteLiedPage.tsx
@@ -179,59 +179,96 @@ export default function GeschichteLiedPage() {
- {geschichteVideos.length === 0 ? (
-
-
- Keine Videos in der Sammlung "Die Geschichte des Liedes" gefunden
-
-
- Überprüfen Sie später, ob neue Inhalte hinzugefügt wurden.
-
-
- ) : (
- <>
- {/* Video Grid */}
-
- {currentVideos.map((video) => (
- handleVideoClick(video)}
- />
- ))}
-
-
- {/* Pagination */}
- {totalPages > 1 && (
-
-
+ {/* Video List with Descriptions */}
+
+ {currentVideos.map((video, index) => (
+
+
+ {/* Video Card */}
+
+
+
-
- Seite {currentPage} von {totalPages}
-
-
-
+ {/* Video Description */}
+
+
{video.title}
+
+ {video.description || "Keine Beschreibung für diese Sendung verfügbar."}
+
+
+ {Math.floor(video.duration / 60)}:{(video.duration % 60).toString().padStart(2, '0')} min
+ {video.views} Aufrufe
+
+
- )}
- >
+
+ ))}
+
+ {geschichteVideos.length === 0 && (
+
+
Keine "Die Geschichte des Liedes" Videos gefunden
+
+ )}
+
+
+ {/* Bottom Pagination */}
+ {totalPages > 1 && (
+
+
+
+
+ {Array.from({ length: Math.min(totalPages, 5) }, (_, i) => {
+ let pageNum;
+ if (totalPages <= 5) {
+ pageNum = i + 1;
+ } else if (currentPage <= 3) {
+ pageNum = i + 1;
+ } else if (currentPage >= totalPages - 2) {
+ pageNum = totalPages - 4 + i;
+ } else {
+ pageNum = currentPage - 2 + i;
+ }
+
+ return (
+
+ );
+ })}
+
+
+
+
)}