diff --git a/src/app.py b/src/app.py index 30a60b8..0df31c2 100644 --- a/src/app.py +++ b/src/app.py @@ -6,6 +6,7 @@ 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__) @@ -61,7 +62,7 @@ def infokiosk(): ) row = cur.fetchone() current = row["number"] if row else "" - return render_template("infokiosk.html", current=current) + return render_template("infokiosk.html", current=current, infotext=INFO_TEXT) # API endpoint used by clients to poll current number(s) (JSON) diff --git a/src/templates/infokiosk.html b/src/templates/infokiosk.html index 5774a23..d1be01f 100644 --- a/src/templates/infokiosk.html +++ b/src/templates/infokiosk.html @@ -118,7 +118,8 @@ const waitingCount = j.waiting != null ? j.waiting : '0'; const first = j.first != 0 ? j.first : '-'; - const infoText = 'Chcesz spróbować swoich sił w lutowaniu? Odbierz numer i sprawdzaj kolejkę tutaj lub na queue.hswro.org'; + 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 numsFormatted = nums.map(n => `${n}`).join(' '); const numList = nums.length > 0 ? `| Zapraszamy z numerami: ${numsFormatted}` : ''; const combinedText = `${infoText} | Liczba oczekujących: ${waitingCount} | Pierwszy w kolejce nr ${first} ${numList} `;