29 model?: string;
30 price?: number;
31 images?: string;
32 finishReason?: string;
33}
3View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stevekrouse/sqlite_admin?v=46) val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by [LibSQL Studio](https://github.com/invisal/libsql-studio) by [invisal](https://github.com/invisal). This is now more an SPA, with tables, queries and results showing up on the same page.
4
5
6
7## Install
178
179- **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
6 <title>React Hono Val Town Starter</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>
524 name: team.team.team_short_name || team.team.name,
525 value: [team.marketValue, team.stats.points],
526 symbol: `image://${team.team.logo}`,
527 symbolSize: 25,
528 marketValueFormatted: formatMarketValue(team.marketValue),
1184}
1185
1186/* --- Team Logo Image Styling --- */
1187img {
1188 vertical-align: middle;
35 username: user.username,
36 bio: user.bio,
37 profile_image_url: user.profileImageUrl,
38 url: user.url,
39 updated_at: new Date().toISOString(), // Using current time as the API doesn't provide updated_at
53 name: val.name,
54 description: val.description,
55 image_url: val.imageUrl,
56 username: val.author.username || "",
57 updated_at: mainBranch?.updatedAt || new Date().toISOString(),
19
20- **Voice-to-Email Conversion** - Transform spoken descriptions into well-formatted work order emails
21- **Image Support** - Attach images to provide visual context for the reported issue
22- **Work Order Management** - Track the status of your work orders (unsent, pending, completed)
23- **Magic Sign in** - Login with magic links sent to your email
42 "json",
43 z.object({
44 imageB64: z.string().optional(),
45 audioB64: z.string().optional(),
46 fromName: z.string().optional(),
48 ),
49 async (c) => {
50 let { imageB64, audioB64, fromName } = c.req.valid("json");
51 const user = await getUserByEmail(c.get("jwtPayload").email);
52
66
67 const emailContent = await generateWorkorderEmail({
68 imageB64,
69 audioB64,
70 fromName: fromName,
20 title: string;
21 description: string;
22 imageUrl?: string;
23 url?: string;
24 author?: string;
44 title: '',
45 description: '',
46 imageUrl: '',
47 url: '',
48 author: username || '', // Default to username if provided
139 yaml += `description: "${frontmatter.description}"\n`;
140
141 if (frontmatter.imageUrl) {
142 yaml += `imageUrl: "${frontmatter.imageUrl}"\n`;
143 }
144
313 <div>
314 <label className="block text-sm font-medium text-gray-700 mb-1">
315 Image URL <span className="text-gray-400 text-xs">(Optional)</span>
316 </label>
317 <input
318 type="text"
319 value={frontmatter.imageUrl || ''}
320 onChange={(e) => handleFieldChange('imageUrl', e.target.value)}
321 className="w-full p-2 border rounded-md"
322 placeholder="https://example.com/image.png"
323 disabled={disabled}
324 />
492 title: '',
493 description: '',
494 imageUrl: '',
495 url: '',
496 author: '',
570 } else if (key === 'description') {
571 parsedFrontmatter.description = value;
572 } else if (key === 'imageUrl') {
573 parsedFrontmatter.imageUrl = value;
574 } else if (key === 'url') {
575 parsedFrontmatter.url = value;
23 title: string;
24 description: string;
25 imageUrl?: string;
26 tags: string[];
27 author?: string;
50 title: '',
51 description: '',
52 imageUrl: '',
53 tags: [],
54 author: username || '',
71 title: '',
72 description: '',
73 imageUrl: '',
74 url: '',
75 tags: [],
94 title: parsed.title || '',
95 description: parsed.description || '',
96 imageUrl: parsed.imageUrl || '',
97 url: parsed.url || '',
98 tags: parsed.tags || ['val-town'],
115 title: '',
116 description: '',
117 imageUrl: '',
118 url: '',
119 tags: ['val-town'],
236 frontmatter += `description: "${data.description}"\n`;
237
238 if (data.imageUrl) {
239 frontmatter += `imageUrl: "${data.imageUrl}"\n`;
240 }
241
312 <div>
313 <label className="block text-sm font-medium text-gray-700 mb-1">
314 Image URL <span className="text-gray-400 text-xs">(Optional)</span>
315 </label>
316 <input
317 type="text"
318 value={metadata.imageUrl || ''}
319 onChange={(e) => updateField('imageUrl', e.target.value)}
320 className="w-full p-2 border rounded-md"
321 placeholder="https://example.com/image.png"
322 disabled={disabled}
323 />
453 title: string;
454 description: string;
455 imageUrl?: string;
456 url?: string;
457 author?: string;
466 title: '',
467 description: '',
468 imageUrl: undefined,
469 url: undefined,
470 author: undefined,
519 result.description = value;
520 break;
521 case 'imageUrl':
522 result.imageUrl = value;
523 break;
524 case 'url':