{% if users %} {% for user in users %}
{{ user.username }} {% if user.is_expired %} {% elif user.is_data_limited or not user.is_active %} {% else %} {% endif %}
{% if user.enable_openvpn or user.enable_l2tp or user.enable_cisco or user.enable_wireguard or user.enable_singbox %}
{% if user.enable_openvpn %}{% endif %} {% if user.enable_l2tp %}{% endif %} {% if user.enable_cisco %}{% endif %} {% if user.enable_wireguard %}{% endif %} {% if user.enable_singbox %}{% endif %}
{% endif %}
{{ user.max_clients }}/{{ user.active_connections }}
{% if user.activation_type == 'flexible_days' and user.first_connection_at == None %} Pending ({{ user.pending_activation_days }}d) {% else %} {{ user.expiry_date | jalali_date if user.expiry_date != "Unlimited" else "Unlimited" }} {% endif %}
{% set usage = get_usage_bar_info(user) %}
{{ user.total_traffic|format_bytes }} {% if user.data_limit %} / {{ (user.data_limit * (1024*1024 if user.data_limit_unit == 'MB' else 1024**3))|format_bytes }} {% else %} / Unlimited {% endif %}
0 B 0 B
{% if user_role == 'main_admin' or user_role == 'sub_admin' %} {% endif %}
{% endfor %} {% else %}
No users found matching your criteria.
{% endif %}