{% extends "base.html" %} {% block title %}{% if job.is_finished %}{% if job.result.error %}{% trans %}Conversion failed - please try again{% endtrans %}{% else %}{% trans %}Download file - your conversion was successful{% endtrans %}{% endif %}{% else %}{% trans %}Converting your file...{% endtrans %}{% endif %}{% endblock %} {% block head %} {{ super() }} {% if job.is_finished and not job.result.error %} {% elif job.is_finished and job.result.error %} {% else %} {% endif %} {% endblock %} {% block content %}
{% with messages = get_flashed_messages(with_categories=true) %}{% for cat, msg in messages %}{% endfor %}{% endwith %} {% if job.is_finished %} {% if conversion_deleted %}

{% trans %}Conversion deleted{% endtrans %}

{% trans %}This conversion and its files have been permanently deleted.{% endtrans %}

{% trans %}Home{% endtrans %}
{% elif job.result.error %} {% if job.result.get('timeout_exceeded') %}

{% trans %}Processing Time Limit Reached{% endtrans %}

{{ job.result.message }}

{% trans %}What you get with a premium plan:{% endtrans %}

  • {% trans %}Longer processing time limits{% endtrans %}
  • {% trans %}Priority queue – your jobs run first{% endtrans %}
  • {% trans %}Larger file size limits{% endtrans %}
  • {% trans %}More conversions per day{% endtrans %}
{% if current_user and current_user.get('id') %} {% trans %}Upgrade Plan{% endtrans %} {% else %} {% trans %}Get a Paid Plan{% endtrans %} {% endif %}
{% else %}

{% trans %}Something went wrong{% endtrans %}

{{job.result.message}}

{% if retry_available %}
{% else %} {% trans %}Try Again{% endtrans %} {% endif %}
{% endif %} {% else %} {% if job.result.get('output_deleted') %} {% if not upload_available %}

{% trans %}Files Deleted{% endtrans %}

{% trans %}Both the converted output files and the original upload have been permanently removed.{% endtrans %}

{% else %}

{% trans %}Output files deleted{% endtrans %}

{% trans %}The converted output files have been permanently removed. Your original uploaded file may still be available if you want to convert again.{% endtrans %}

{% trans %}Home{% endtrans %} {% if retry_available %}
{% endif %} {% if upload_available %} {% endif %}
{% endif %} {% else %}{# normal success section — output files exist #} {# ---- build a JS-safe list of absolute file URLs ---- #} {% set _file_urls_js = [] %} {% for _fu in sanitized_results %}{% if _file_urls_js.append(static_url(_fu)) %}{% endif %}{% endfor %} {# ---- plan feature flags ---- #} {% set _can_share = current_user and plan and plan.get('share_link_enabled',0)|int %} {% set _can_share_pw = current_user and plan and plan.get('share_link_password',0)|int %} {% set _can_share_ot = current_user and plan and plan.get('share_link_onetime',0)|int %} {% set _can_share_exp = current_user and plan and plan.get('share_link_expiry',0)|int %} {% set _max_exp_hrs = plan.get('share_link_max_expiry_hours',0)|int if plan else 0 %} {% set _can_gdrive = current_user and plan and plan.get('cloud_export_google_drive',0)|int and site_settings.get('google_drive_client_id','') %} {% set _can_dropbox = current_user and plan and plan.get('cloud_export_dropbox',0)|int and site_settings.get('dropbox_app_key','') %} {% set _can_onedrive = current_user and plan and plan.get('cloud_export_onedrive',0)|int and site_settings.get('onedrive_client_id','') %} {% set _can_archive = plan and plan.get('batch_archive_download',0)|int %} {# ---- upload-deleted notice ---- #} {% if job.result.get('upload_deleted') %}

{% trans %}Your original uploaded file has been deleted. The converted output files below are still available for download.{% endtrans %}

{% endif %} {# ===== SUCCESS SECTION ===== #} {# Full-width tab bar (no border-radius, no side borders — goes edge-to-edge) #}
{# ===== TWO-COLUMN LAYOUT: 65% left | 35% right (stacks on mobile) ===== #}
{# ===== LEFT COLUMN (65%) — tab panels + bottom cards ===== #}
{% if permission_required %} {# ---- PERMISSION REQUIRED NOTICE ---- #}

{% trans %}Permission required{% endtrans %}

{% if not current_user %}

{% trans %}You have been invited to view this file. Please{% endtrans %} {% trans %}log in{% endtrans %} {% trans %}to access it.{% endtrans %}

{% else %}

{% trans %}You don't have permission to view this file. Please request access from the file owner.{% endtrans %}

{% endif %}
{% else %} {# ---- FILES PANEL ---- #} {# ---- TOOLS PANEL ---- #} {# ---- FILE LIST PANEL (default) ---- #}
{# Secondary toolbar #}
{# Download Selected split button #}
{% set _pv_ext = (sanitized_results[0] | basename | splitpart(0,'?')).rsplit('.',1)[-1]|lower if sanitized_results else '' %} {% set _pv_exts = ['jpg','jpeg','png','gif','webp','svg','bmp','ico','mp4','webm','mp3','ogg','wav','pdf'] %} {% if _pv_ext in _pv_exts %} {% else %} {% endif %}
{# Select all / none — top #}
{# File rows #} {% for file_url in sanitized_results %} {% set _fname = file_url | basename | splitpart(0, '?') %} {% set _fsize = get_file_size(file_url) %} {% set _fext = _fname.rsplit('.', 1)[-1]|lower if '.' in _fname else '' %}
{# Thumbnail: use actual image if image format, else file-type icon #} {% if _fext in ['jpg','jpeg','png','gif','webp','bmp','tiff','tif','svg','ico','avif'] %} {{ _fname }} {% else %}
{{ _fext[:4] if _fext else '?' }}
{% endif %} {{ _fname }} {% trans %}Download{% endtrans %}
{% endfor %} {# Select all / none — bottom #}
{# Archive modal #} {% if _can_archive and sanitized_results|length > 1 %} {% endif %}
{# /panel-filelist #} {# ===== BOTTOM TWO CARDS: Feedback + Social ===== #}
{# Feedback card #}

{% trans %}Your input matters{% endtrans %}

{% trans %}Share your thoughts, suggestions, or experiences with our services. Your feedback helps us improve. Thank you for being part of our journey!{% endtrans %}

{% trans %}How would you rate us?{% endtrans %}

{% set _emojis = [('😞','Terrible'),('😕','Poor'),('😊','Okay'),('😄','Good'),('🎉','Amazing')] %} {% for _emoji, _label in _emojis %} {% endfor %}
0 / 4000
{# Social share card #}

{% trans %}Want to support us?{% endtrans %}

{% trans %}Let friends in on the secret and share your new favorite tool!{% endtrans %}

{# /bottom two cards #} {% endif %}{# /permission_required #}
{# /tab panels inner #}
{# /left column #} {# ===== RIGHT COLUMN (35%) — download + actions + done + task ===== #}
{# Download split button with cloud-upload dropdown #} {% if permission_required %}

{% trans %}Permission required{% endtrans %}

{% trans %}Please request access from the file owner.{% endtrans %}

{% else %} {% endif %}{# /permission_required sidebar-dl #} {% if not permission_required %} {# Export As (→ Tools tab) | Share | Delete — 3 equal buttons #}
{# Done card #}

{% trans %}Done{% endtrans %}

{% if not current_user or not plan or plan.get('price_monthly', 0)|int == 0 %}

{% trans %}Get a subscription to skip the queue, use PRO features, and process your files faster.{% endtrans %}

{% trans %}Get Premium{% endtrans %} {% else %}

{{ sanitized_results|length }} {% trans %}file{% endtrans %}{% if sanitized_results|length != 1 %}s{% endif %} {% trans %}ready for download{% endtrans %}

{% endif %}
{# Current Task #} {% if input_format or output_format or tool_type %}

{% trans %}Current Task{% endtrans %}

{% if input_format and output_format %}

{% trans %}Convert to{% endtrans %} {{ output_format|upper }}

{% elif tool_type %}

{{ tool_type }}

{% endif %}
{% trans %}Start over{% endtrans %} {% if retry_available %}
{% endif %}
{% endif %} {% endif %}{# /not permission_required #}
{# /right column #}
{# /two-column layout #} {# ---- Share Modal (always rendered) ---- #} {# /share-modal #} {# ---- Export Modal — always rendered, providers locked when unavailable ---- #} {# /export-modal #} {# ---- File Info Modal ---- #} {# ---- Cloud Export JS config (inline, server-rendered) ---- #} {% endif %}{# /if output_deleted #} {% endif %} {% elif job.is_failed %} {% if conversion_deleted %}

{% trans %}Conversion deleted{% endtrans %}

{% trans %}This conversion and its files have been permanently deleted.{% endtrans %}

{% trans %}Home{% endtrans %}
{% else %}{# normal failed card #}

{% trans %}Something went wrong{% endtrans %}

{% trans %}The conversion job failed. Please try again.{% endtrans %}

{% if retry_available %}
{% else %} {% trans %}Try Again{% endtrans %} {% endif %}
{% endif %}{# /if conversion_deleted #} {% else %} {# ===== PROCESSING / WAITING STATE ===== #}
{# ---- Central animated orb + heading ---- #}

{% trans %}Converting your file{% endtrans %}…

{% trans %}Waiting to initiate a process{% endtrans %}

{# ---- Progress bar ---- #}

{% trans %}Processing — please don't close this tab{% endtrans %}

{# ---- Animated bars (visual accent) ---- #}
{# ---- Info cards ---- #}

{% trans %}Secure Processing{% endtrans %}

{% trans %}Your files are encrypted in transit{% endtrans %}

{% trans %}High-Speed Conversion{% endtrans %}

{% trans %}Optimised for fast results{% endtrans %}

{% trans %}100+ Formats{% endtrans %}

{% trans %}Audio, video, image, docs & more{% endtrans %}

{# ---- Notification card ---- #} {% if browser_notif_allowed or email_notif_allowed or push_notif_allowed %}

{% trans %}Get notified when done{% endtrans %}

{% if browser_notif_allowed %}
{% endif %} {% if push_notif_allowed %}
{% endif %} {% if email_notif_allowed %}
{% endif %}
{% endif %} {# ---- Cancel button ---- #}
{# /processing state #} {% endif %}
{% endblock %} {% block footer %} {{super()}} {% if job.is_finished is sameas false %} {% endif %} {% if plan and plan.get('batch_archive_download', 0)|int and job is defined and job.is_finished and not job.result.error and sanitized_results|length > 1 %} {% endif %} {% endblock %}