Compare commits

..

No commits in common. "e9410b0ca6e288753cea653007fc28830afdb903" and "b927182e7dec6a06139dd52cc1ebd57258b5e0c4" have entirely different histories.

3 changed files with 5 additions and 10 deletions

View File

@ -5,8 +5,6 @@
- Adds numbers to the list of tokens issued.
- Selects numbers from the list to be called.
- Removes the called number from the list or moves it back to the queue.
- People check whether their number has been called on queue.hswro.org
- Additional page queue.hswro.org/infokiosk displays video and information bar.
## Common tasks
@ -16,11 +14,10 @@ In the repo directory:
```
docker build -t queue-app:latest .
docker run -it --rm -p 5000:5000 -v "$(pwd)":/data -e INFO_TEXT='example info text' queue-app:latest
docker run -p="5000:5000" --volume="$PWD:/data:" -it queue-app:latest
```
Preview should be available on:
`http://localhost:5000` - end user access
`http://localhost:5000/admin` - operator access
`http://localhost:5000/infokiosk` - information page
`http://localhost:5000` - end user access
`http://localhost:5000/admin` - operator access

View File

@ -6,7 +6,6 @@ import os
DB = os.environ.get("DB_PATH", "queue.db")
ADMIN_SUFFIX = os.environ.get("ADMIN_URL", "admin").strip("/")
ADMIN_PATH = f"/{ADMIN_SUFFIX}" if ADMIN_SUFFIX else "/admin"
INFO_TEXT = os.environ.get("INFO_TEXT", "Chcesz spróbować swoich sił w lutowaniu? Odbierz numer i sprawdzaj kolejkę tutaj lub na queue.hswro.org")
app = Flask(__name__)
@ -62,7 +61,7 @@ def infokiosk():
)
row = cur.fetchone()
current = row["number"] if row else ""
return render_template("infokiosk.html", current=current, infotext=INFO_TEXT)
return render_template("infokiosk.html", current=current)
# API endpoint used by clients to poll current number(s) (JSON)

View File

@ -118,8 +118,7 @@
const waitingCount = j.waiting != null ? j.waiting : '0';
const first = j.first != 0 ? j.first : '-';
const infoText = ({{ infotext | tojson }});
// const infoText = 'Chcesz spróbować swoich sił w lutowaniu? Odbierz numer i sprawdzaj kolejkę tutaj lub na queue.hswro.org';
const infoText = 'Chcesz spróbować swoich sił w lutowaniu? Odbierz numer i sprawdzaj kolejkę tutaj lub na queue.hswro.org';
const numsFormatted = nums.map(n => `<span class="num-inline">${n}</span>`).join(' ');
const numList = nums.length > 0 ? `| Zapraszamy z numerami: ${numsFormatted}` : '';
const combinedText = `${infoText} | Liczba oczekujących: ${waitingCount} | Pierwszy w kolejce nr ${first} ${numList} `;