From 2ebe02a5ed4710a7200414ada77f59cf67f10e30 Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Thu, 20 Aug 2026 23:43:15 +0000 Subject: [PATCH] Add a bit of text to various spots explaining that raw IDs are accepted when the feature is enabled. --- bemani/frontend/app.py | 6 ++++++ .../static/controllers/account/cards.react.js | 12 ++++++++++++ bemani/frontend/templates/account/recover.html | 10 ++++++++++ bemani/frontend/templates/account/register.html | 10 ++++++++++ bemani/frontend/templates/base.html | 1 + 5 files changed, 39 insertions(+) diff --git a/bemani/frontend/app.py b/bemani/frontend/app.py index 288dd8c..f326259 100644 --- a/bemani/frontend/app.py +++ b/bemani/frontend/app.py @@ -353,6 +353,9 @@ def navigation() -> Dict[str, Any]: for f in os.listdir(os.path.join(static_location, "components")) if re.search(r"\.react\.js$", f) ] + custom_config = {} + if g.config.server.allow_raw_ids: + custom_config['allow_raw_ids'] = True # Look up the logged in user ID. try: @@ -366,6 +369,7 @@ def navigation() -> Dict[str, Any]: "assets": f"themes/{config.theme}/", "theme_url": jinja2_theme, "cache_bust": f"v={FRONTEND_CACHE_BUST}", + "custom_config": custom_config, } except AttributeError: # If we are trying to render a 500 error and we couldn't even run the @@ -377,6 +381,7 @@ def navigation() -> Dict[str, Any]: "assets": f"themes/{config.theme}/", "theme_url": jinja2_theme, "cache_bust": f"v={FRONTEND_CACHE_BUST}", + "custom_config": custom_config, } pages: List[Dict[str, Any]] = [] @@ -985,4 +990,5 @@ def navigation() -> Dict[str, Any]: "assets": f"themes/{config.theme}/", "theme_url": jinja2_theme, "cache_bust": f"v={FRONTEND_CACHE_BUST}", + "custom_config": custom_config, } diff --git a/bemani/frontend/static/controllers/account/cards.react.js b/bemani/frontend/static/controllers/account/cards.react.js index 5a8aa8c..d899a3c 100644 --- a/bemani/frontend/static/controllers/account/cards.react.js +++ b/bemani/frontend/static/controllers/account/cards.react.js @@ -85,6 +85,18 @@ var card_management = createReactClass({

Add Card

+ { + window.config['allow_raw_ids'] ? +

+ Enter the 16 digit code found on the back of an e-AMUSEMENT card or displayed + in-game when you scan an Amusement IC card. For convenience, you can also enter + the raw 16 digit card ID usually starting with E004. +

: +

+ Enter the 16 digit code found on the back of an e-AMUSEMENT card or displayed + in-game when you scan an Amusement IC card. +

+ }
E004. + {% else %} + The card number is the 16 digit code found on the back of an + e-AMUSEMENT card or displayed in-game when you scan an Amusement + IC card. + {% endif %}

{% endif %}
diff --git a/bemani/frontend/templates/account/register.html b/bemani/frontend/templates/account/register.html index ac1927c..c30c1c2 100644 --- a/bemani/frontend/templates/account/register.html +++ b/bemani/frontend/templates/account/register.html @@ -9,6 +9,16 @@ one credit on a game linked to this network. If you have not done so you cannot register an account. Enter the card number and PIN of the card you have used to play on this network. + {% if custom_config.get("allow_raw_ids", False) %} + The card number is the 16 digit code found on the back of an + e-AMUSEMENT card or displayed in-game when you scan an Amusement + IC card. For convenience, you can also enter the raw 16 digit card + ID usually starting with E004. + {% else %} + The card number is the 16 digit code found on the back of an + e-AMUSEMENT card or displayed in-game when you scan an Amusement + IC card. + {% endif %}

Card Number (found on back of e-AMUSEMENT card)
diff --git a/bemani/frontend/templates/base.html b/bemani/frontend/templates/base.html index f4c09ca..3a17cbd 100644 --- a/bemani/frontend/templates/base.html +++ b/bemani/frontend/templates/base.html @@ -152,6 +152,7 @@ {% endfor %} {% endif %} window.assets = {{ assets|tojson|safe }}; + window.config = {{ custom_config|tojson|safe }};