{% extends "webapp/base.html" %} {% block title %}{{ match.title }} โ€” FIGHTSKILL{% endblock %} {% block content %} {% macro slot_map(interactive) %} {% for grp in slot_groups %} {% set gname = grp.name if grp.name else '' %} {% set gslots = grp.slots|int %}
๐Ÿ“ {{ gname if gname else t('slots') | default('Slots') }}
{{ gslots }} {{ t('slot') | default('slot') }}{{ 's' if gslots > 1 else '' }} ยท 1 {{ t('player') | default('player') }} / {{ t('slot') | default('slot') }}
{% for i in range(gslots) %} {% set occ = slot_occupants.get(gname ~ '|' ~ i) %}
{% if occ %}
{% if occ.avatar %} {% else %}
{{ occ.name[0]|upper }}
{% endif %}
{{ occ.name }}
{% elif interactive %}
{% else %}
{{ i + 1 }}
{% endif %}
{% endfor %}
{% endfor %} {% endmacro %}
โ† {{ t('back') | default('Back') }}

{{ match.title }}

{{ match.game.name }} {{ match.mode.name }} {{ match.status }}
{% if is_registered and match.credentials_published %}
๐Ÿ”‘ {{ t('room_credentials') | default('Room Credentials') }}
{{ t('room_code') }}
{{ match.room_code }}
{{ t('room_password') }}
{{ match.room_password }}

{{ t('share_with_team') | default('Share these credentials only with your teammates.') }}

{% endif %} {% if already_registered %}
โœ“
{{ t('you_are_registered') | default('You are registered for this room') }}
{{ t('registered_at') | default('Joined at') }} {{ registered_at.strftime('%H:%M %m/%d') if registered_at else 'โ€”' }}
{% if selected_slot_index is not none %}
๐Ÿ“ {{ t('your_slot') | default('Your Slot') }}: #{{ selected_slot_index + 1 }}{% if selected_slot_group %} ({{ selected_slot_group }}){% endif %}
{% endif %}
{% endif %} {% if reg_closed and not already_registered %}
{% if reg_closed_reason == 'not_open_yet' %}๐Ÿ•{% else %}๐Ÿ”’{% endif %}
{% if reg_closed_reason == 'not_open_yet' %} {{ t('reg_not_open_yet') | default('Registration Not Open Yet') }} {% else %} {{ t('reg_closed') | default('Registration Closed') }} {% endif %}
{% if reg_closed_reason == 'started' %} {{ t('reg_closed_started') | default('This match has already started โ€” registration is no longer possible.') }} {% elif reg_closed_reason == 'not_open_yet' %} {{ t('reg_opens_at_line') | default('Registration opens at 12 midnight (00:00) before the match day:') }} {{ reg_opens_at.strftime('%Y-%m-%d') if reg_opens_at else 'โ€”' }} ยท 00:00 {% else %} {{ t('reg_closed') | default('Registration is closed for this match.') }} {% endif %}
{% endif %} {% if not reg_closed and not already_registered and match.status == 'upcoming' %}
โฐ
{% if reg_until_start %} {{ t('reg_open_until_start') | default('Registration is open right up to match start:') }} {{ match.starts_at.strftime('%H:%M') }} โ€” {{ match.starts_at.strftime('%m/%d') }} {% else %} {{ t('reg_open_now_until') | default('Registration is open (opened at 12 midnight before match day) and stays open right up to match start:') }} {{ match.starts_at.strftime('%Y-%m-%d %H:%M') }} {% endif %}
{% endif %} {% if conflict_match %}
โš ๏ธ {{ t('schedule_conflict') | default('Schedule Conflict') }}
{{ t('conflict_explanation') | default('You are already registered in another match at this time:') }} {{ conflict_match.title }} ({{ conflict_match.starts_at.strftime('%H:%M %m/%d') }})
{% endif %}
{{ t('start_time') | default('Start Time') }}
{{ match.starts_at.strftime('%H:%M') }}
{{ match.starts_at.strftime('%Y-%m-%d') }}
{{ t('entry_fee') | default('Entry Fee') }}
{{ match.entry_fee if match.entry_fee > 0 else t('free') | default('FREE') }}
{{ t('prize_pool') | default('Prize Pool') }}
{{ match.prize_pool if match.prize_pool > 0 else 'โ€”' }}
{{ t('players') | default('Players') }}
{{ match.current_players }} : {{ match.capacity }}
{% if match.team_mode %}
{{ t('team_mode') | default('Team Mode') }} โ€” {{ match.mode.squad_size }}v{{ match.mode.squad_size }}
{% endif %}
{% if already_registered and slot_groups and slot_groups|length > 0 %}

๐Ÿ—บ๏ธ {{ t('slot_map') | default('Slot Map') }}

{{ t('slot_map_desc') | default('Each slot holds exactly 1 player โ€” avatar inside, username below.') }}
{{ slot_map(false) }}
{% endif %} {% if not already_registered and not reg_closed %}

{{ t('join_room') | default('Join This Room') }}

{% if match.rules %}
๐Ÿ“‹ {{ t('match_rules') | default('Match Rules') }}
{% for line in match.rules.splitlines() %}{% if line.strip() %}
โ€ข {{ line }}
{% endif %}{% endfor %}
{{ t('rules_gate_hint') | default('You will be asked to accept these rules before your registration is confirmed.') }}
{% endif %} {% if slot_groups and slot_groups|length > 0 %}
{{ t('your_entry_balance') | default('Your Entry Wallet Balance') }}
{{ entry_balance }} {{ currency }}
{{ t('required') | default('Required') }}
{{ match.entry_fee if match.entry_fee > 0 else 0 }} {{ currency }}
{% if insufficient_balance %}
โš ๏ธ {{ t('insufficient_balance') | default('Insufficient Entry Wallet balance.') }} {{ t('charge_wallet') | default('Charge Wallet') }}
{% endif %}
{{ t('choose_mode') | default('How do you want to register?') }}
{% if my_team_members and my_team_members|length > 0 %} {% endif %}
๐Ÿ—บ๏ธ {{ t('select_slot') | default('Select your position on the map') }}
{% if my_team_members and my_team_members|length > 0 and our_team %} {% endif %} {{ slot_map(true) }}
{% elif match.team_mode %}
{{ t('your_entry_balance') | default('Your Entry Wallet Balance') }}
{{ entry_balance }} {{ currency }}
{{ t('required') | default('Required') }}
{{ match.entry_fee if match.entry_fee > 0 else 0 }} {{ currency }}
{% if insufficient_balance %}
โš ๏ธ {{ t('insufficient_balance') | default('Insufficient Entry Wallet balance.') }} {{ t('charge_wallet') | default('Charge Wallet') }}
{% endif %}
{% if user_teams and user_teams|length > 0 %} {% endif %}
{% endif %} {% endif %}
{% if not is_registered and not match.credentials_published %}

{{ t('credentials_hidden') | default('Room credentials will be shown here once the match starts and admin publishes them.') }}

{% endif %}
{% endblock %}