diff --git a/src/components/Icon.astro b/src/components/Icon.astro index 36118cf..e96fa90 100644 --- a/src/components/Icon.astro +++ b/src/components/Icon.astro @@ -26,6 +26,9 @@ const ICONS: Record = { layers: '', 'shield-check': '', + 'alert-triangle': + '', + 'check-circle': '', wrench: '', cpu: '', sparkles: diff --git a/src/lib/compat-client.ts b/src/lib/compat-client.ts new file mode 100644 index 0000000..7d6d699 --- /dev/null +++ b/src/lib/compat-client.ts @@ -0,0 +1,69 @@ +/** + * Browser entry for the plugin compatibility pill. + * + * The server renders the pill from the request `User-Agent` so the layout is + * final on first paint. This re-runs the same check against + * `navigator.userAgent` and corrects the pill if the two disagree — the usual + * cause being iPadOS in desktop mode, which reports a Macintosh User-Agent but + * is really iOS. + * + * Corrections only ever toggle `hidden` on nodes that are always in the DOM, so + * a correction cannot change the element's height and shift the layout. + * + * This module touches the DOM, so it is only imported from `