`/config` is owner-only and takes a PUT, so without this the only way to point the install at a server was curl. A plugin cannot ask that - installing it has to be enough, which is the same argument the schema makes for the URL being a table rather than an env var. `web/panels.ts` and `web/layout.ts` are required once `web/` exists, and the directory existed empty, so discovery would have refused the plugin with exactly that complaint. The panel says the thing this install taught me, at the point where it would otherwise be rediscovered: the address it asks for is the one the SIDECAR dials, not the one a browser or the extension is given. Those are the same string on most setups and are not here - the name Linkwarden advertises resolves to 127.0.1.1 on the host it runs on, where nothing is bound. The admin token is write-only across the boundary: never sent back to the screen, and only sent on save when something was typed, because an empty field means "leave it alone" rather than "clear it". Health has three distinct reasons - unconfigured, unreachable, sidecar not running - because they are three different next actions and one word for all of them sends somebody to check the wrong thing.
16 lines
864 B
TypeScript
16 lines
864 B
TypeScript
import type { AppRegistryMeta } from 'officerdev';
|
|
import { Bookmark } from 'lucide-react';
|
|
import { LinkwardenPanel } from './LinkwardenPanel';
|
|
|
|
// One panel, for now: where the instance is, and whether it answers.
|
|
//
|
|
// Reading and saving links happens in Linkwarden's own UI and in the browser extension, both of which
|
|
// are better at it than anything reproduced here would be. What Officer has to own is the part neither
|
|
// of those can do — pointing the install at a server, and saying who is who on it.
|
|
//
|
|
// `availableOnPanel: false` keeps it out of the generic picker: it belongs to the /linkwarden screen
|
|
// rather than being something to drop into an arbitrary dashboard.
|
|
export const appRegistryMetas: AppRegistryMeta[] = [
|
|
{ key: 'linkwarden-settings', name: 'Linkwarden', icon: Bookmark, component: LinkwardenPanel, availableOnPanel: false },
|
|
];
|