Upload floor-map blueprints (light/dark) instead of typing a path

The Floor Map settings only had text fields for the blueprint image path with
no way to upload one. Add a real upload.

- POST /settings/map-blueprint (multipart: file + theme) saves the image to the
  instance maps dir and points map_blueprint_<theme> at the served URL;
  GET /settings/map-blueprint/<file> serves it (public - kiosks read the map).
- Settings > Floor Map: a file picker + thumbnail next to each theme's field
  (still accepts a manual path/URL too).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-07-10 10:50:51 -04:00
parent d08f341403
commit b26d0d1b87
3 changed files with 97 additions and 5 deletions

View File

@@ -793,6 +793,12 @@ export const settingsApi = {
},
create(data) {
return api.post('/settings', data)
},
uploadMapBlueprint(theme, file) {
const form = new FormData()
form.append('theme', theme)
form.append('file', file)
return api.post('/settings/map-blueprint', form, { headers: { 'Content-Type': 'multipart/form-data' } })
}
}