Townie-2.cursorrules2 matches
178179- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
180- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
181- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
182- **Storage:** DO NOT use the Deno KV module for storage
183- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods
Townie-2ChatRouteSingleColumn.tsx15 matches
9import { useUsageStats } from "../hooks/useUsageStats.ts";
10import { Messages } from "./Messages.tsx";
11import { InputBox, ImageDropContainer } from "./InputBox.tsx";
12import { PreviewFrame } from "./PreviewFrame.tsx";
13import { BranchSelect } from "./BranchSelect.tsx";
66refetch: () => void;
67}) {
68const [images, setImages] = useState<(string|null)[]>([]);
69const [selectedFiles, setSelectedFiles] = useState<string[]>([]);
70const { audio, user } = useContext(AppContext);
85branchId,
86selectedFiles,
87images,
88soundEnabled: audio,
89});
109110return (
111<ImageDropContainer
112running={running}
113images={images}
114setImages={setImages}>
115<div className="single-column-container">
116<div className="single-sticky-header">
120rel="norefferer"
121className="block-link text-link lockup">
122{project.imageUrl ? (
123<img src={project.imageUrl} className="image-thumbnail" />
124) : user?.profileImageUrl ? (
125<img
126src={user.profileImageUrl}
127className="avatar"
128alt={user.username}
131/>
132) : (
133<div className="image-placeholder" />
134)}
135<div>{project.name}</div>
178onSubmit={e => {
179handleSubmit(e);
180setImages([]);
181}}
182onCancel={handleStop}
183running={running}
184error={error}
185images={images}
186setImages={setImages}
187/>
188)}
190</div>
191</div>
192</ImageDropContainer>
193);
194}
Joalda_couturemain.tsx11 matches
20price: number;
21category: "cultural" | "standard";
22imageUrl: string;
23stockQuantity: number;
24}
36price REAL NOT NULL,
37category TEXT NOT NULL,
38imageUrl TEXT NOT NULL,
39stockQuantity INTEGER NOT NULL
40)
53await sqlite.execute(
54`INSERT INTO ${KEY}_products
55(name, description, price, category, imageUrl, stockQuantity)
56VALUES (?, ?, ?, ?, ?, ?)`,
57[
60product.price,
61product.category,
62product.imageUrl,
63product.stockQuantity,
64],
369price: 0,
370category: "standard",
371imageUrl: "",
372stockQuantity: 0,
373});
441</div>
442<div style={{ marginBottom: "10px" }}>
443<label>Image URL:</label>
444<input
445type="url"
446value={newProduct.imageUrl}
447onChange={(e) => setNewProduct({ ...newProduct, imageUrl: e.target.value })}
448required
449style={{ width: "100%", padding: "5px" }}
536>
537<img
538src={product.imageUrl}
539alt={product.name}
540style={{ maxWidth: "100%", height: "250px", objectFit: "cover" }}
570<div key={product.id} style={{ display: "flex", alignItems: "center", marginBottom: "10px" }}>
571<img
572src={product.imageUrl}
573alt={product.name}
574style={{ width: "100px", marginRight: "10px" }}
608>
609<img
610src={selectedProduct.imageUrl}
611alt={selectedProduct.name}
612style={{ maxWidth: "50%", objectFit: "cover" }}
40<section className="mb-10 rounded-xl overflow-hidden shadow-lg relative">
41<img
42src="https://images.unsplash.com/photo-1465101046530-73398c7f28ca?auto=format&fit=crop&w=1200&q=80"
43alt="Zon Hero"
44className="w-full h-64 object-cover"
FileDumpThingutils.ts1 match
56export interface ContentState {
7type: "text" | "image";
8value: string;
9}
FileDumpThingREADME.md2 matches
4Built with React & Hono.
56- Paste text or images directly into the app
7- Upload files through the file input
8- Get shareable links instantly
9- Links are automatically copied to your clipboard
10- Preview images and text content
11- CLI tool for uploading files directly from your terminal
12- Smart content detection (automatically detects text vs binary)
FileDumpThingREADME.md3 matches
2122```bash
23cat image.png | fdt image.png
24```
2552```bash
53# Upload and open in browser
54cat image.png | fdt image.png | xargs open
5556# Upload and copy URL to clipboard (macOS)
7374```bash
75cat image.png | fdt image.png
76```
77
FileDumpThingmimetype.ts9 matches
1// Mime type mapping for file extensions
2export const mimeTypes: Record<string, string> = {
3// Image formats
4'jpg': 'image/jpeg',
5'jpeg': 'image/jpeg',
6'png': 'image/png',
7'gif': 'image/gif',
8'webp': 'image/webp',
9'svg': 'image/svg+xml',
10'bmp': 'image/bmp',
11'ico': 'image/x-icon',
12// Text formats
13'txt': 'text/plain',
FileDumpThingindex.html1 match
6<title>File Dump Thing</title>
7<link rel="stylesheet" href="/public/style.css">
8<link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">
9</head>
10<body>
FileDumpThingFileDumper.tsx4 matches
8990// Create a local preview for the file
91if (file.type.startsWith("image/")) {
92const reader = new FileReader();
93reader.onloadend = () => {
94setContent({ type: "image", value: reader.result as string });
95};
96reader.readAsDataURL(file);
108event.preventDefault();
109110// Check for image first
111const file = event.clipboardData?.items[0]?.getAsFile();
112if (file) {
148149const renderContent = () => {
150if (content.type === "image") {
151return <img src={content.value} alt="Pasted" style={{ maxWidth: "100%", maxHeight: "300px" }} />;
152}