From 7d7f281a74c0d110ad2566335ab733120d07c983 Mon Sep 17 00:00:00 2001 From: kleinbem Date: Mon, 16 Nov 2026 14:45:05 +0000 Subject: [PATCH 1/2] feat: shared pinned links from /config.json `links` in /config.json lists pinned links that are the same for every visitor and device. They show before the browser-local bookmarks, have no remove button and are searchable in the palette. Local bookmarks live in one browser's localStorage, so a start page used on several machines had to be set up on each of them. Co-Authored-By: Claude Fable 5.2 --- README.md | 8 ++++ src/lib/components/BookmarksSection.svelte | 52 +++++++++++++--------- src/lib/components/CommandPalette.svelte | 4 +- src/lib/config.ts | 23 +++++++++- src/lib/portal.ts | 4 +- src/lib/types.ts | 9 ++++ src/routes/+page.svelte | 4 +- test/components.test.ts | 13 +++++- test/config-and-portal.test.ts | 17 +++++++ 9 files changed, 104 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 3df6b1b..a58973b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Foyer compiles to a pure static SPA (`index.html`, `200.html`, `_app/`) with zer - **Network Reachability Badges**: Distinct indicators for `public`, `mesh`, and `lan` endpoints plus one-click filter chips. - **Live Gatus Health**: Optional client-side polling against a [Gatus](https://gatus.io) `/api/v1/endpoints/statuses` endpoint with visibility-aware refresh and stale-data indication. - **Host Node Bar**: Per-host service counts, one-click host filtering, and IP clipboard copy. +- **Shared Pinned Links**: Optional `links` in `/config.json` show the same pinned links to every visitor, ahead of their own bookmarks. - **Local Quick Bookmarks**: Browser-stored personal links (`localStorage`) in a dedicated native `` modal, immediately searchable from `⌘K`. - **Optional Weather & Clock**: Minute-aligned UTC/local header clock and optional [Open-Meteo](https://open-meteo.com) telemetry widget. @@ -52,6 +53,13 @@ Serve a `/config.json` file at the web root alongside Foyer's static assets (an "tags": ["metrics", "observability"] } ], + "links": [ + { + "name": "Docs", + "url": "https://docs.example.com", + "icon": "📚" + } + ], "footerLinks": [ { "label": "Status", diff --git a/src/lib/components/BookmarksSection.svelte b/src/lib/components/BookmarksSection.svelte index f798935..4a6d74e 100644 --- a/src/lib/components/BookmarksSection.svelte +++ b/src/lib/components/BookmarksSection.svelte @@ -1,14 +1,17 @@