瀏覽代碼

RHL-022 feat(explorer): replace placeholder components with specific explorers for branch, year, month, and day

Code_Uwe 4 周之前
父節點
當前提交
cd3e1424cc

+ 4 - 11
app/(protected)/[branch]/[year]/[month]/[day]/page.jsx

@@ -1,18 +1,11 @@
-import PlaceholderPage from "@/components/placeholders/PlaceholderPage";
+import FilesExplorer from "@/components/explorer/levels/FilesExplorer";
 
 /**
  * /:branch/:year/:month/:day
  *
- * Next.js 15+ treats `params` as an async value (Promise) for dynamic routes.
+ * Explorer leaf: lists files for the selected day.
  */
 export default async function BranchYearMonthDayPage({ params }) {
-	const resolvedParams = await params;
-
-	return (
-		<PlaceholderPage
-			title="Day"
-			description="Day placeholder (future: file list + PDF viewer)."
-			params={resolvedParams}
-		/>
-	);
+	const { branch, year, month, day } = await params;
+	return <FilesExplorer branch={branch} year={year} month={month} day={day} />;
 }

+ 4 - 11
app/(protected)/[branch]/[year]/[month]/page.jsx

@@ -1,18 +1,11 @@
-import PlaceholderPage from "@/components/placeholders/PlaceholderPage";
+import DaysExplorer from "@/components/explorer/levels/DaysExplorer";
 
 /**
  * /:branch/:year/:month
  *
- * Next.js 15+ treats `params` as an async value (Promise) for dynamic routes.
+ * Explorer level: lists days for month.
  */
 export default async function BranchYearMonthPage({ params }) {
-	const resolvedParams = await params;
-
-	return (
-		<PlaceholderPage
-			title="Month"
-			description="Month placeholder (future: days overview / explorer drill-down)."
-			params={resolvedParams}
-		/>
-	);
+	const { branch, year, month } = await params;
+	return <DaysExplorer branch={branch} year={year} month={month} />;
 }

+ 4 - 11
app/(protected)/[branch]/[year]/page.jsx

@@ -1,18 +1,11 @@
-import PlaceholderPage from "@/components/placeholders/PlaceholderPage";
+import MonthsExplorer from "@/components/explorer/levels/MonthsExplorer";
 
 /**
  * /:branch/:year
  *
- * Next.js 15+ treats `params` as an async value (Promise) for dynamic routes.
+ * Explorer level: lists months for year.
  */
 export default async function BranchYearPage({ params }) {
-	const resolvedParams = await params;
-
-	return (
-		<PlaceholderPage
-			title="Year"
-			description="Year placeholder (future: months overview / explorer drill-down)."
-			params={resolvedParams}
-		/>
-	);
+	const { branch, year } = await params;
+	return <MonthsExplorer branch={branch} year={year} />;
 }

+ 4 - 12
app/(protected)/[branch]/page.jsx

@@ -1,19 +1,11 @@
-import PlaceholderPage from "@/components/placeholders/PlaceholderPage";
+import YearsExplorer from "@/components/explorer/levels/YearsExplorer";
 
 /**
  * /:branch
  *
- * Next.js 15+ treats `params` as an async value (Promise) for dynamic routes.
- * We explicitly await it here to avoid "sync dynamic APIs" runtime errors.
+ * Explorer entry for a branch: lists years.
  */
 export default async function BranchPage({ params }) {
-	const resolvedParams = await params;
-
-	return (
-		<PlaceholderPage
-			title="Branch"
-			description="Branch dashboard placeholder (will become the explorer entry point)."
-			params={resolvedParams}
-		/>
-	);
+	const { branch } = await params;
+	return <YearsExplorer branch={branch} />;
 }

+ 1 - 7
app/(protected)/layout.jsx

@@ -1,9 +1,3 @@
-// ---------------------------------------------------------------------------
-// Folder: app/(protected)
-// File: layout.jsx
-// Relative Path: app/(protected)/layout.jsx
-// ---------------------------------------------------------------------------
-
 import React, { Suspense } from "react";
 import { Loader2 } from "lucide-react";
 
@@ -28,7 +22,7 @@ function AuthProviderFallback() {
 			<div className="mx-auto flex min-h-screen max-w-md items-center justify-center">
 				<div className="flex items-center gap-3 text-sm text-muted-foreground">
 					<Loader2 className="h-4 w-4 animate-spin" />
-					<span>Preparing session...</span>
+					<span>Sitzung wird vorbereitet…</span>
 				</div>
 			</div>
 		</div>