OpenTownieChatInput.tsx2 matches
13}
1415export function ChatInput({
16input,
17handleInputChange,
128onClick={() => {
129const customStop = (window as any).customStopRef?.current;
130if (typeof customStop === "function") {
131customStop();
132}
OpenTownieChatHeader.tsx1 match
17}
1819export function ChatHeader({
20project,
21bearerToken,
OpenTownieBranchControl.tsx1 match
17}
1819export function BranchControl({
20projectId,
21projectName,
OpenTownieApp.tsx4 matches
7import { Home } from "./Home.tsx";
89function safeParse(s: string) {
10try {
11return JSON.parse(s);
15}
1617export function App() {
18const [bearerToken, setBearerToken] = useLocalStorage("bearer", "");
19const [anthropicApiKey, setAnthropicApiKey] = useLocalStorage("anthropic_api_key", "");
22const [showLogin, setShowLogin] = useState(false);
2324function setProject(p: any) {
25setProject_(p);
26setProjectJSON(JSON.stringify(p));
27}
2829function handleLogout() {
30setBearerToken("");
31setShowLogin(false);
OpenTownieapi.ts1 match
1// Fetch project files from the backend
2export async function fetchProjectFiles(
3{ bearerToken, projectId, branchId }: { bearerToken: string; projectId: string; branchId?: string },
4) {
OpenTownieApiKeyWarning.tsx1 match
6}
78export function ApiKeyWarning({ show }: ApiKeyWarningProps) {
9if (!show) return null;
10
blob_adminapp.tsx7 matches
10}
1112function Tooltip({ children, content }: TooltipProps) {
13const [isVisible, setIsVisible] = useState(false);
14const tooltipRef = useRef<HTMLDivElement>(null);
49}
5051function formatBytes(bytes: number, decimals = 2) {
52if (bytes === 0) return "0 Bytes";
53const k = 1024;
58}
5960function copyToClipboard(text: string) {
61navigator.clipboard.writeText(text).then(() => {
62console.log("Text copied to clipboard");
66}
6768function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
69const [isOpen, setIsOpen] = useState(false);
70const menuRef = useRef(null);
7374useEffect(() => {
75function handleClickOutside(event) {
76if (menuRef.current && !menuRef.current.contains(event.target)) {
77event.stopPropagation();
155}
156157function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
158const [isLoading, setIsLoading] = useState(false);
159const decodedKey = decodeURIComponent(blob.key);
216}
217218function App({ initialEmail, initialProfile, sourceURL }) {
219const encodeKey = (key: string) => encodeURIComponent(key);
220const decodeKey = (key: string) => decodeURIComponent(key);
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function MiCameraApp() {
6const [imageSource, setImageSource] = useState<string | null>(null);
7const [cameraMode, setCameraMode] = useState<'user' | 'environment'>('environment');
226}
227228function client() {
229createRoot(document.getElementById("root")).render(<MiCameraApp />);
230}
231if (typeof document !== "undefined") { client(); }
232233export default async function server(request: Request): Promise<Response> {
234return new Response(`
235<html>
linkInBioTemplatemain.tsx1 match
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
5return new Response(
6renderToString(
Jobs_aboard2main.tsx5 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45// Utility function for generating unique IDs
6const generateId = () => Math.random().toString(36).substr(2, 9);
764};
6566function JobBoardChatApp() {
67const [activeTab, setActiveTab] = useState('jobs');
68const [jobs, setJobs] = useState([]);
99// Load existing jobs from server
100useEffect(() => {
101async function fetchJobs() {
102try {
103const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
284}
285286function client() {
287createRoot(document.getElementById("root")).render(<JobBoardChatApp />);
288}
289if (typeof document !== "undefined") { client(); }
290291export default async function server(request: Request): Promise<Response> {
292return new Response(`
293<html>