diff --git a/modules/rchoices/components/folk-choices-dashboard.ts b/modules/rchoices/components/folk-choices-dashboard.ts index bc6b340..c6cb419 100644 --- a/modules/rchoices/components/folk-choices-dashboard.ts +++ b/modules/rchoices/components/folk-choices-dashboard.ts @@ -31,7 +31,7 @@ class FolkChoicesDashboard extends HTMLElement { private space: string; /* Demo state */ - private demoTab: "spider" | "ranking" | "voting" = "spider"; + private demoTab: "spider" | "ranking" | "voting" | "crowdsurf" = "spider"; private hoveredPerson: string | null = null; private rankItems: { id: number; name: string; emoji: string }[] = []; private rankDragging: number | null = null; @@ -503,15 +503,17 @@ class FolkChoicesDashboard extends HTMLElement { } private renderDemo() { - const tabs: { key: "spider" | "ranking" | "voting"; label: string; icon: string }[] = [ + const tabs: { key: "spider" | "ranking" | "voting" | "crowdsurf"; label: string; icon: string }[] = [ { key: "spider", label: "Spider Chart", icon: "🕸" }, { key: "ranking", label: "Ranking", icon: "📊" }, { key: "voting", label: "Live Voting", icon: "☑" }, + { key: "crowdsurf", label: "CrowdSurf", icon: "🏄" }, ]; let content = ""; if (this.demoTab === "spider") content = this.renderSpider(); else if (this.demoTab === "ranking") content = this.renderRanking(); + else if (this.demoTab === "crowdsurf") content = this.renderCrowdSurf(); else content = this.renderVoting(); this.shadow.innerHTML = ` @@ -725,6 +727,17 @@ class FolkChoicesDashboard extends HTMLElement { `; } + private renderCrowdSurf(): string { + return `
+
🏄
+

CrowdSurf

+

+ Swipe-based community coordination. Propose activities, set commitment thresholds, and watch them trigger when enough people join. +

+ Open CrowdSurf +
`; + } + /* -- Demo event binding -- */ private bindDemoEvents() { @@ -732,7 +745,7 @@ class FolkChoicesDashboard extends HTMLElement { // Tab switching this.shadow.querySelectorAll(".demo-tab").forEach((btn) => { btn.addEventListener("click", () => { - const tab = btn.dataset.tab as "spider" | "ranking" | "voting"; + const tab = btn.dataset.tab as "spider" | "ranking" | "voting" | "crowdsurf"; if (tab && tab !== this.demoTab) { this.demoTab = tab; this.renderDemo(); diff --git a/modules/rchoices/mod.ts b/modules/rchoices/mod.ts index 4f7c064..bc4c1c6 100644 --- a/modules/rchoices/mod.ts +++ b/modules/rchoices/mod.ts @@ -56,7 +56,7 @@ routes.get("/", (c) => { modules: getModuleInfoList(), theme: "dark", body: ``, - scripts: ``, + scripts: ``, styles: ``, })); });