{% extends 'base.html' %} {% block content %}

{{ _('Browsers') }}

{% if browser_config_locked() %}

{{ _('These are the available browsers. Adding, editing and removing browsers is locked on this instance — you can still choose the default browser below.') }}

{% else %}

{{ _('These are the available browsers. Save a variation of one (its screen size, language, timezone…) with + Add variation and reuse it on any watch or group — your variations appear nested (↳) under the browser they extend.')|safe }}

{% endif %}

{{ _('The Default browser (chosen with the radio button) is used by every watch unless the watch — or its group — picks another one. This is the same value shown on the Settings → Fetching page.', url=url_for('settings.settings_page'))|safe }}

{# One table: each available base browser, with its user-created variations nested directly beneath it as child rows (↳). No separate "Your browsers" table. #} {% if base_fetchers %} {% for f in base_fetchers %} {# ---- Base browser (parent) row ---- #} {# ---- User variations of this base (child rows) ---- #} {% for v in f.variations %} {% set bc = v.get('browser_config') or {} %} {% endfor %} {% endfor %}
{{ _('Default') }} {{ _('Browser') }} {{ _('Capabilities') }}
{# Only ready-to-use engines can be the default (base-only engines aren't usable directly) #} {% if f.ready_to_use %}
{% endif %}
{{ f.description }} {% if not f.ready_to_use %}{{ _('needs setup') }}{% endif %} {% if f.ready_to_use and f.name == default_browser_id %}{{ _('Default') }}{% endif %} {% for cap, on in f.capabilities.items() %} {% if on %}{{ cap.replace('supports_', '')|replace('_', ' ') }}{% endif %} {% endfor %} {% if not f.is_browser %}{{ _('plain text, no JavaScript') }}{% endif %} {# When browser config is locked, only setting the default is allowed - hide edit/add. #} {% if not browser_config_locked() %} {# Engines with configurable behaviour can be edited (browser fields, or HTTP options). #} {% if f.ready_to_use and f.configurable %} {{ _('Edit') }} {% endif %} {# "Add variation" for any configurable engine - browsers or the plain client. #} {% if f.configurable %} + {{ _('Add variation') }} {% endif %} {% endif %}
{{ v.get('label') }} {% if v.id == default_browser_id %}{{ _('Default') }}{% endif %} {% if bc.get('browser_type') %}{{ bc.browser_type }}{% endif %} {% if bc.get('viewport_width') %}{{ bc.viewport_width }}×{{ bc.viewport_height or '?' }}{% endif %} {% if bc.get('locale') %}{{ bc.locale }}{% endif %} {% if bc.get('timezone_id') %}{{ bc.timezone_id }}{% endif %} {% if bc.get('block_resource_types') %}{{ _('no') }} {{ bc.block_resource_types|join(', ') }}{% endif %} {% if not browser_config_locked() %} {{ _('Edit') }}
{% endif %}
{% else %}

{{ _("No interactive browser is available.") }}

{{ _('Connect a Chrome/Playwright browser (e.g. set PLAYWRIGHT_DRIVER_URL) or install the Playwright library to configure browsers here.')|safe }}

{% endif %}
{% endblock %}