{% extends "dashboard/layout.html" %} {% block title %}{{ _('My Dashboard – OnlineConvert') }}{% endblock %} {% set active_page = 'overview' %} {% block dashboard_content %}
{{ _('Current Plan') }}
{{ plan.name if plan else _('Free') }}
{% if user.subscription_status == 'active' %} {{ _('Active') }}{% if user.subscription_expires_at %} · {{ _('Renews') }} {{ user.subscription_expires_at[:10] }}{% endif %} {% else %}{{ _('Free tier') }}{% endif %}
{{ _('Files/Day') }}
{{ _('Unlimited') if plan and plan.max_files_per_day == -1 else (plan.max_files_per_day if plan else 5) }}
{{ _('Max Size') }}
{{ plan.max_file_size_mb|string + ' MB' if plan else '50 MB' }}
{{ _('Auto-Delete') }}
{{ _('Never') if plan and plan.auto_delete_hours == 0 else ((plan.auto_delete_hours|string + 'h') if plan else '24h') }}
{% if plan and plan.price_monthly == 0 %} {{ _('Upgrade') }} {% endif %}
{{ total }}
{{ _('Total Conversions') }}
{{ conversions|selectattr('status','equalto','finished')|list|length }}
{{ _('Completed') }}
{{ referral_count if referral_count is defined else 0 }}
{{ _('Referrals') }}
{{ blog_count if blog_count is defined else 0 }}
{{ _('Blog Posts') }}
{% if today_usage is defined or plan_limits is defined %}

{{ _("Today's Usage") }}

{% set _usage = today_usage if today_usage is defined else {} %} {% set _limits = plan_limits if plan_limits is defined else {} %} {% set tool_info = [ ('converter', 'max_files_per_day', _('Converter'), 'blue', 'fa-exchange-alt'), ('pdf', 'max_pdf_per_day', _('PDF'), 'orange', 'fa-file-pdf'), ('hash', 'max_hash_per_day', _('Hash'), 'purple', 'fa-hashtag'), ('screenshot','max_screenshot_per_day', _('Screenshot'),'teal', 'fa-camera'), ('bg_remove', 'max_bg_remove_per_day', _('BG Remove'), 'pink', 'fa-image'), ] %}
{% for ttype, col, label, color, icon in tool_info %} {% set used = _usage.get(ttype, 0) %} {% set limit = _limits.get(col, 5) %} {% set pct = 0 if limit <= 0 else [100, (used / limit * 100)|int]|min %}
{{ label }}
{% if limit == -1 %}
{{ used }} / ∞
{% else %}
{{ used }} / {{ limit }}
{% endif %}
{% endfor %}
{% endif %}

{{ _('Recent Conversions') }}

{{ _('View all') }} →
{% if conversions %}
{% for c in conversions[:10] %}
{{ c.file_name or _('Unnamed') }}
{{ c.input_format or '?' }} → {{ c.output_format or '?' }} {% set _tc = {'converter':'blue','pdf':'orange','hash':'purple','screenshot':'teal','bg_remove':'pink'} %} {% set _tcolor = _tc.get(c.tool_type or 'converter', 'gray') %} {{ (c.tool_type or 'converter')|replace('_',' ') }} {{ c.status }}
{{ c.created_at[:10] if c.created_at else '' }} {% if c.output_path and c.status == 'finished' %} {{ _('Download') }} {% endif %}
{% endfor %}
{% else %}

{{ _('No conversions yet.') }}

{{ _('Start converting a file') }} →
{% endif %}
{% endblock %}