Show platform icons on link buttons

Links pick their platform from a preset dropdown (PLATFORMS in
src/lib/platforms.ts), and every link button draws that platform's
icon beside its label. The footer and event cards now share the same
PlatformIcon component instead of their own copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-27 14:45:20 -05:00
parent 99c3a87c87
commit 3c02eb8971
11 changed files with 170 additions and 65 deletions

View file

@ -16,6 +16,7 @@
═══════════════════════════════════════════════════════════════ */
import { preview } from "./text.ts";
import { PLATFORMS } from "./platforms.ts";
const PLACE_FIELDS = [
{ path: "venue", label: "Venue" },
@ -140,7 +141,14 @@ const linksChild = {
widget: "select",
options: ["action", "social", "website", "email"],
},
{ path: "platform", label: "Platform", help: "instagram, discord…" },
{
path: "platform",
label: "Platform",
widget: "select",
options: PLATFORMS.map((platform) => [platform.id, platform.label]),
blankLabel: "Default: no icon",
help: "Shows the platform's icon on the button.",
},
{ path: "label", label: "Label", required: true },
{ path: "url", label: "URL", required: true, full: true },
{ path: "is_primary", label: "Primary", widget: "checkbox" },