"use client";
import { useState } from "react";
import Link from "next/link";
/* ------------------------------------------------------------------ */
/* README content (rendered as simple markdown-ish HTML) */
/* ------------------------------------------------------------------ */
const README_LINES = [
{ tag: "h1", text: "betterNAS" },
{
tag: "p",
text: "betterNAS lets you mount remote machines as native Finder volumes on your Mac. Install a small agent on any box with files you care about, and it shows up in Finder like a local drive.",
},
{
tag: "p",
text: "The goal is to build a modular filesystem you actually use natively",
},
] as const;
/* ------------------------------------------------------------------ */
/* Icons */
/* ------------------------------------------------------------------ */
function GithubIcon({ className }: { className?: string }) {
return (
);
}
function ClockIcon() {
return (
);
}
function SharedIcon() {
return (
);
}
function LibraryIcon() {
return (
);
}
function AppIcon() {
return (
);
}
function DesktopIcon() {
return (
);
}
function DownloadIcon() {
return (
);
}
function DocumentsIcon() {
return (
);
}
function FolderIcon({ className }: { className?: string }) {
return (
);
}
function CloudIcon() {
return (
);
}
function HomeIcon() {
return (
);
}
function NetworkIcon() {
return (
);
}
function AirdropIcon() {
return (
);
}
/* ------------------------------------------------------------------ */
/* README modal (Quick Look style) */
/* ------------------------------------------------------------------ */
function ReadmeModal({ onClose }: { onClose: () => void }) {
return (
e.stopPropagation()}
>
{/* titlebar */}
{/* body */}
{README_LINES.map((block, i) => {
if (block.tag === "h1")
return (
{block.text}
);
return (
{block.text}
);
})}
);
}
/* ------------------------------------------------------------------ */
/* Finder sidebar item */
/* ------------------------------------------------------------------ */
function SidebarItem({
icon,
label,
active,
accent,
onClick,
}: {
icon: React.ReactNode;
label: string;
active?: boolean;
accent?: string;
onClick?: () => void;
}) {
return (
);
}
/* ------------------------------------------------------------------ */
/* Finder file grid item (folder) */
/* ------------------------------------------------------------------ */
function GridFolder({
name,
itemCount,
onClick,
}: {
name: string;
itemCount?: number;
onClick?: () => void;
}) {
return (
);
}
/* ------------------------------------------------------------------ */
/* Finder file grid item (file) */
/* ------------------------------------------------------------------ */
function GridFile({
name,
meta,
onClick,
}: {
name: string;
meta?: string;
onClick?: () => void;
}) {
return (
);
}
/* ------------------------------------------------------------------ */
/* Main page */
/* ------------------------------------------------------------------ */
export default function LandingPage() {
const [readmeOpen, setReadmeOpen] = useState(false);
const [selectedSidebar, setSelectedSidebar] = useState("DAV");
return (
{/* ---- header ---- */}
{/* ---- finder ---- */}
{/* titlebar */}
DAV
{/* forward/back placeholders */}
{/* content area */}
{/* ---- sidebar ---- */}
{/* Favorites */}
Favorites
} label="Recents" />
} label="Shared" />
} label="Library" />
} label="Applications" />
} label="Desktop" />
} label="Downloads" />
} label="Documents" />
} label="GitHub" />
{/* Locations */}
Locations
} label="rathi" />
} label="hari-macbook-pro" />
}
label="DAV"
active={selectedSidebar === "DAV"}
accent="text-[#65a2f8]"
onClick={() => setSelectedSidebar("DAV")}
/>
} label="AirDrop" />
{/* ---- file grid ---- */}
{/* toolbar */}
{/* files */}
{/* statusbar */}
5 folders, 1 file
847 GB available
{/* ---- readme modal ---- */}
{readmeOpen &&
setReadmeOpen(false)} />}
);
}