feat(admin): Basic settings answers where the instance is reachable, not just what it is called #337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/basic-settings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The page shipped as one field on an otherwise empty screen, and its subtitle promised less than the mockup does.
Subtitle
"How this instance identifies itself." → "What this instance calls itself, and the address it answers on." The old line described half the page because only half the page existed.
Identity
The instance-name row gets an
Identityheading and a live preview of everywhere the name appears: the header wordmark and the browser-tab chip, both updating as you type.The preview clones the real header elements — the
.markglyph and the tagline<small>— rather than re-describing them in a second place. A preview that restates the thing it previews is a second source of truth that drifts; cloning cannot.maxlength="64"was already on the input, so the description can now state "Up to 64 characters" truthfully. Prefixed in all four languages.Where this instance answers
New read-only table: Address (with a TLS/No TLS chip), Share links (explaining they are built from that address, so changing it breaks links already sent), and WebDAV.
The address comes from
location.origin, not from a setting — because that is the answer. It's the address that just served the page, through whatever reverse proxy sits in front. Cairn doesn't own it and shouldn't pretend to, which is what the read-only note says.The share-expiry pointer is back
I argued against this panel when we moved default share expiry to Sharing (#331), on the grounds that Cairn has no users who could have learned the old location. Your mockup includes it and I think that's the better call: the question "where did it go?" gets asked by anyone reading the docs or a screenshot, not only by someone with muscle memory. It jumps to Sharing by clicking the rail button.
Caught by the guard
My first attempt used
t("sharing") === "sharing" ? "Sharing" : t("sharing")— a defensive fallback around a key I had not defined.TestI18nKeysDefinedfailed the build and named it. That check exists precisely to stop this papering-over, so the fix was a realbsSharingLinkkey in four languages rather than a smarter fallback.Gate:
node --check,go vet ./...,go test ./...,go build ./cmd/cairnd. All new keys in four languages.