the address-and-token form is gone from the screen and ConnectionPanel.tsx with it. leaving an unreferenced component behind would have been worse than deleting it: it is in the history, and a file nothing renders rots without anyone noticing. in its place, Administration is a LIST OF BLOCKS rather than one form. it will hold several unrelated settings, and giving each a titled block now means the second one moves nothing — a single form would have to be broken up the first time anything joined it. the first block is Database, and it is empty on purpose. it says "nothing to set yet" rather than rendering nothing, because a section that draws blank reads as one somebody abandoned. what goes in it is not decided, and inventing fields to fill the space would be deciding it in the wrong place. WHAT THIS COSTS, plainly: there is now no way to configure this plugin from the screen at all. the server half is untouched — `/_config` still stores a URL and a token and the proxy in api/router.ts still reads them — but nothing can set them. that is consistent with the gate being hardcoded false rather than a second breakage: both are the same unfinished change, and neither is worth half-fixing while the shape of the connection is being replaced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
56 lines
2.1 KiB
TypeScript
56 lines
2.1 KiB
TypeScript
import { Database } from 'lucide-react';
|
|
|
|
/**
|
|
* Administration — this plugin's own machinery, not the client's site.
|
|
*
|
|
* ── It is a list of blocks, and it starts with one ──
|
|
*
|
|
* Not one form. Administration will hold several unrelated settings, and giving each its own titled
|
|
* block from the start means adding the second one moves nothing — as against a single form that has
|
|
* to be broken up the first time anything joins it.
|
|
*
|
|
* ── What used to be here ──
|
|
*
|
|
* An address and a token: where fofos is, over HTTP. That is gone. It has NOT been replaced yet, so
|
|
* nothing can currently configure this plugin — which is why `useReady` stays hardcoded false and
|
|
* every other section stays locked. The two are the same change and neither is finished.
|
|
*
|
|
* The server half is untouched: `/_config` still stores a URL and a token, and the proxy in
|
|
* `api/router.ts` still reads them. Only the way in from the screen is gone.
|
|
*/
|
|
|
|
/** One titled block. The shape every Administration setting gets, so the second one costs nothing. */
|
|
const Block = ({
|
|
icon: Icon,
|
|
title,
|
|
hint,
|
|
children,
|
|
}: {
|
|
icon: typeof Database;
|
|
title: string;
|
|
hint: string;
|
|
children?: React.ReactNode;
|
|
}) => (
|
|
<section className="flex flex-col gap-3 rounded-lg border border-border p-4">
|
|
<div className="space-y-1">
|
|
<h3 className="flex items-center gap-2 text-sm font-medium">
|
|
<Icon className="size-4" />
|
|
{title}
|
|
</h3>
|
|
<p className="text-xs text-muted-foreground">{hint}</p>
|
|
</div>
|
|
{children}
|
|
</section>
|
|
);
|
|
|
|
export const AdministrationPanel = () => (
|
|
<div className="flex size-full flex-col gap-4 overflow-auto p-5">
|
|
<Block icon={Database} title="Database" hint="Where the fofos site's own data lives.">
|
|
{/* Deliberately empty. The block exists so the shape is settled and so the screen says what is
|
|
coming rather than looking like a section nobody finished — but nothing is decided about what
|
|
goes in it, and guessing at fields would be a decision made in the wrong place. */}
|
|
<p className="text-xs text-muted-foreground/70">Nothing to set yet.</p>
|
|
</Block>
|
|
</div>
|
|
);
|