Files
linkwarden/web/layout.ts
T
pastilhas c2850fe8ed a settings panel, so installing it is enough
`/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.
2026-09-05 21:00:30 +01:00

12 lines
556 B
TypeScript

import type { LayoutNode } from 'officerdev';
// A single full-width panel. The framework requires a layout even when there is only one thing in it —
// a plugin contributes panels and an arrangement, never a screen — and this is that arrangement stated
// honestly rather than padded out with a sidebar nothing needs yet.
export const defaultLayout: LayoutNode = {
type: 'group',
id: 'linkwarden-root',
direction: 'horizontal',
children: [{ node: { type: 'panel', id: 'linkwarden-settings', appType: 'linkwarden-settings' }, size: 100 }],
};