feat: add booth open/closed toggle on settings page
This commit is contained in:
parent
c39265ab42
commit
5e26650b90
6 changed files with 96 additions and 6 deletions
|
|
@ -6,7 +6,8 @@ A Flask web app for a convention booth where visitors request a custom AI-genera
|
|||
|
||||
### Customer-facing
|
||||
|
||||
- **Request form** (`/request`) — visitors enter name, email, hobbies, notable facts, preferred style/genre, vocal gender preference, and extra requests. A branded banner image is shown. The email field is validated to reduce delivery problems.
|
||||
- **Request form** (`/request`) — visitors enter name, email, hobbies, notable facts, preferred style/genre, vocal gender preference, and extra requests. A branded banner image is shown. The email field is validated to reduce delivery problems. If the operator marks the booth as closed, this page shows a closed banner and message instead.
|
||||
- **Closed page** (`/request`) — when the booth is marked closed from `/admin/settings`, visitors see the closed banner and a friendly "goblin engineers are on a break" message.
|
||||
- **Confirmation page** (`/thanks/<id>`) — shows the request number after submission.
|
||||
- **FAQ page** (`/faq`) — answers common customer questions.
|
||||
- **Private player page** (`/play/<token>`) — customer receives an email with a unique link. They can stream Version A and Version B, pick one (or both), or request a limited number of revisions.
|
||||
|
|
@ -59,6 +60,7 @@ pending → prompt_ready → songs_uploaded → awaiting_payment → paid → de
|
|||
| `config.py` | Environment-variable based configuration; defines defaults for DB, uploads, SMTP, and secrets. |
|
||||
| `models.py` | SQLite schema and CRUD helpers. |
|
||||
| `init_db.py` | Standalone script to create the database tables. |
|
||||
| `templates/closed.html` | Message shown on `/request` when the booth is marked closed. |
|
||||
| `templates/request.html` | Customer request form. |
|
||||
| `templates/thanks.html` | Post-submission confirmation. |
|
||||
| `templates/faq.html` | Customer FAQ page. |
|
||||
|
|
@ -69,6 +71,7 @@ pending → prompt_ready → songs_uploaded → awaiting_payment → paid → de
|
|||
| `templates/admin/settings.html` | Maintenance, settings, backup/restore, and reset page. |
|
||||
| `static/Trollgorithm_booth.jpg` | Banner image on the request page. |
|
||||
| `static/DM-Logo_email.png` | Inline Dionysis Media logo attached to emails. |
|
||||
| `static/Booth_closed.png` | Banner shown when the booth is marked closed. |
|
||||
| `Dockerfile` | Production container image. |
|
||||
| `docker-compose.yml` | Portainer stack definition. |
|
||||
| `requirements.txt` | Python dependencies. |
|
||||
|
|
@ -131,7 +134,8 @@ After each push to GitLab, go to Portainer → **Stacks** → `theme-song-booth`
|
|||
## Important notes
|
||||
|
||||
- **No `.env` file in production.** `docker-compose.yml` passes variables directly from Portainer. This avoids Portainer's `env_file not found` error.
|
||||
- **Runtime settings persist.** SMTP config, revision limit, auto-refresh interval, and MP3 metadata defaults are stored encrypted (where sensitive) in `booth_settings.json` inside the persistent uploads volume. They survive redeploys.
|
||||
- **Runtime settings persist.** SMTP config, revision limit, auto-refresh interval, booth open/closed state, and MP3 metadata defaults are stored in `booth_settings.json` inside the persistent uploads volume. They survive redeploys.
|
||||
- **Booth open/closed switch.** Operators can flip the booth status from `/admin/settings`. When closed, `/request` shows a closed banner and message instead of the form.
|
||||
- **Payments are manual.** The app records a Square payment reference but does not integrate with Square's API. Use a Square Terminal/Reader at the booth.
|
||||
- **Operator queue is the dashboard.** No operator email alerts are sent; approvals and revision notes appear as status changes in `/admin`.
|
||||
- **MP3 metadata.** Uploaded files are tagged with title (from the saved prompt), plus configured artist/album/year/comment values.
|
||||
|
|
|
|||
Reference in a new issue