| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import React from "react";
- import Link from "next/link";
- import { FolderX } from "lucide-react";
- import { Button } from "@/components/ui/button";
- import {
- Card,
- CardHeader,
- CardTitle,
- CardDescription,
- CardContent,
- CardFooter,
- } from "@/components/ui/card";
- /**
- * ExplorerNotFound
- *
- * Used when the backend returns FS_NOT_FOUND for a syntactically valid route.
- * This can happen when the NAS structure changed after the user navigated.
- *
- * @param {{
- * title?: string,
- * description?: string,
- * upHref?: string|null,
- * branchRootHref?: string|null
- * }} props
- */
- export default function ExplorerNotFound({
- title = "Nicht gefunden",
- description = "Dieser Pfad existiert nicht (mehr). Bitte wählen Sie eine andere Ebene.",
- upHref = null,
- branchRootHref = null,
- }) {
- return (
- <Card>
- <CardHeader>
- <CardTitle className="flex items-center gap-2">
- <FolderX
- className="h-5 w-5 text-muted-foreground"
- aria-hidden="true"
- />
- {title}
- </CardTitle>
- <CardDescription>{description}</CardDescription>
- </CardHeader>
- <CardContent className="text-sm text-muted-foreground">
- Dies kann passieren, wenn Ordner auf dem NAS verschoben oder gelöscht
- wurden.
- </CardContent>
- <CardFooter className="flex flex-col gap-2 sm:flex-row sm:justify-end">
- {upHref ? (
- <Button variant="outline" asChild>
- <Link href={upHref}>Eine Ebene höher</Link>
- </Button>
- ) : null}
- {branchRootHref ? (
- <Button asChild>
- <Link href={branchRootHref}>Zur Niederlassung</Link>
- </Button>
- ) : null}
- </CardFooter>
- </Card>
- );
- }
|