Riyadh 5c45ddce6e Real image upload for services + placeholder
Task: Replace the admin "paste an image URL" field with a real upload
control backed by App Storage, store the returned objectPath in
services.image_url, serve via /api/storage/objects/*, and add a
placeholder when no image is set so service cards keep consistent height.

Changes:
- artifacts/teaboy-os/src/lib/image-url.ts (new): resolveServiceImageUrl
  helper that maps stored "/objects/<id>" paths to "/api/storage/objects/<id>"
  for rendering, and passes through any legacy http/https URLs unchanged.
- artifacts/teaboy-os/src/pages/admin.tsx: ServiceImageUploader now
  stores the bare objectPath returned by the upload (resp.objectPath)
  in services.imageUrl instead of a pre-prefixed URL, and uses the
  helper to render the preview.
- artifacts/teaboy-os/src/pages/services.tsx: always renders the image
  area at a fixed 16:10 aspect; shows the resolved image when present,
  otherwise renders a centered ImageIcon placeholder so all cards keep
  the same height.

Notes:
- App Storage server routes (request-url, /storage/objects/*,
  /storage/public-objects/*) and the @workspace/object-storage-web
  client were already wired up by an earlier task; this change builds
  on top of them.
- Backward compatible with any existing services.image_url values that
  already contain absolute URLs.
- Typecheck passes (pnpm --filter @workspace/teaboy-os exec tsc --noEmit).
2026-04-20 11:49:48 +00:00
2026-04-18 02:00:09 +00:00
2026-04-18 02:00:09 +00:00
2026-04-18 02:00:09 +00:00
S
Description
No description provided
139 MiB
Languages
TypeScript 69.4%
JavaScript 29%
CSS 0.6%
Shell 0.6%
Dockerfile 0.2%
Other 0.2%