Fold long page introductions to two lines with Show more

One component, PageIntro, for the text under a page's title: shown as it is
when it fits in two lines, otherwise folded with a Show more, remembered per
page in this browser, opened by tabbing to a link in it, unfolded in print.
Used on 41 pages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-10 19:42:34 +01:00
1 parent a2b43bcd5d
commit 9937ab2202
46 files changed
+307 -82

No files matched your search

+3 -2
View File
@@ -9,6 +9,7 @@ import { confirmDialog } from "../utils/dialogs";
import { formatDate } from "../utils/date";
import { readableError } from "../utils/errors";
import { toast } from "../utils/toast";
import PageIntro from "../components/PageIntro";
const EXPIRY = [
{ value: "90", label: "90 days" },
@@ -87,9 +88,9 @@ export default function ApiTokens() {
<div className="d-flex align-items-center mb-1">
<h2 className="page-title mb-0">API tokens</h2>
</div>
<div className="text-secondary mb-3">
<PageIntro>
Read-only access to your installation&rsquo;s data for scripts, Home Assistant and dashboards. A token can only read, sees what you see, and stops working when you are removed. Make one for each thing that reads, so each can be removed on its own.
</div>
</PageIntro>
<ErrorNotice error={error} />
{fresh && (