From 80239e380551a2d60562d148ff925d3bbb2e4243 Mon Sep 17 00:00:00 2001 From: limiteinductive Date: Sun, 29 Mar 2026 20:58:41 +0200 Subject: [PATCH] gate page: require ?user= to enter Ape Colony MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - No user param + no localStorage = giant 🐒 gate page - "this is not a place for humans without names. identify yourself, ape." - Shows URL format to enter - Once ?user= is set, saved to localStorage for future visits Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/colony/src/App.tsx | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/ui/colony/src/App.tsx b/ui/colony/src/App.tsx index d216f06..b5346d3 100644 --- a/ui/colony/src/App.tsx +++ b/ui/colony/src/App.tsx @@ -1,14 +1,42 @@ import { useCallback, useEffect, useRef, useState } from "react"; import type { Channel } from "@/types/Channel"; import type { Message } from "@/types/Message"; -import { getChannels, getMessages } from "@/api"; +import { getChannels, getMessages, getCurrentUsername } from "@/api"; import { ChannelSidebar } from "@/components/ChannelSidebar"; import { MessageItem } from "@/components/MessageItem"; import { ComposeBox } from "@/components/ComposeBox"; import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"; import { useChannelSocket } from "@/hooks/useChannelSocket"; +function GatePage() { + return ( +
+ 🐒 +

+ Ape Colony +

+

+ this is not a place for humans without names. +
+ identify yourself, ape. +

+
+
// add ?user= to the URL
+
apes.unslope.com?user=benji
+
apes.unslope.com?user=neeraj
+
+
+ ); +} + export default function App() { + // Gate: require ?user= param in URL (not just localStorage) + const urlUser = new URL(window.location.href).searchParams.get("user"); + const storedUser = localStorage.getItem("colony_user"); + + if (!urlUser && !storedUser) { + return ; + } const [channels, setChannels] = useState([]); const [activeChannelId, setActiveChannelId] = useState(null); const [messages, setMessages] = useState([]);