"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 is a hosted control plane with a user-run node agent.",
},
{
tag: "p",
text: "The control plane owns user auth, node enrollment, heartbeats, export state, and mount issuance.",
},
{
tag: "p",
text: "The node agent runs on the machine that owns the files and serves them over WebDAV.",
},
{
tag: "p",
text: "The web app reads from the control plane and shows nodes, exports, and mount details.",
},
{
tag: "p",
text: "Finder mounts the export from the node's public WebDAV URL using the same betterNAS username and password.",
},
{
tag: "p",
text: "File traffic goes directly between the client and the node, not through the control plane.",
},
] 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 */}
README.md
{/* body */}
{README_LINES.map((block, i) => {
if (block.tag === "h1")
return (