{% extends "utilities/_base.html" %} {% from "components/page_header.html" import page_header %} {% from "components/collapsible_panel.html" import collapsible_panel %} {% from "components/modal.html" import render_modal with context %} {% from "components/switch.html" import switch %} {% from "macros/automation_forms.html" import render_edit_automation_form with context %} {% from "macros/local_datetime.html" import local_datetime %} {% from "utilities/_sign_in_fields.html" import api_key_field, server_address_field %} {# A sync automation's page. The setup steps are Settings-style cards; a finished step folds to its heading and a one-line summary, so a running sync shows what it does, its run history and its Items. Every form posts to the sync routes (routes/utilities/sync_views.py) and comes back here. #} {% macro option_field(field) %}
{{ field.problem }}
{% endif %} {% elif field.type == 'select' %}{{ field.help }}
{% endif %}{{ account.problem_text }}
{% endif %} {% if account.uses_form %}{{ _("Connect Yaffo to %(service)s with a key from your account. Yaffo only uses it for this service.", service=account.provider_label) if account.auth_kind == 'api_key' else _("Sign in to %(service)s with a username and password.", service=account.provider_label) }}
{{ secret_form(account, _("Connect to %(service)s", service=account.provider_label)) }} {% else %}{{ _("Sign in to %(service)s in your browser. Yaffo only reads from it; your password never reaches Yaffo.", service=account.provider_label) }}
{{ _("Sign in first: the folder is chosen from your account.") }}
{% else %} {% if sync.role != 'source' %}{{ _("Where the copies go, and in what form.") }}
{% elif sync.peer_source %}{{ _("Choose a paired device and one of its shared folders or albums.") }} {{ _("Pair a device on the Sharing page") }}.
{% endif %} {% endif %} {% endcall %} {% if sync.peer_source %} {% set filtered = config.selection is not none and config.selection.kind == 'query' %} {% call collapsible_panel('sync-step-import', _('What to import'), is_open=false, done=true, value=sync.import_summary) %}{{ _("Photos the device adds to the share later are imported too.") }}
{% endcall %} {% endif %} {% if sync.role == 'target' %} {% call collapsible_panel('sync-step-where', _('What to send'), is_open=not sync.where_done, done=sync.where_done, value=sync.where_summary) %}{{ _("Photos added later are sent too; photos taken out are removed.") }}
{% endcall %} {% else %} {% call collapsible_panel('sync-step-where', _('Where to put them'), is_open=not sync.where_done, done=sync.where_done, value=sync.where_summary) %} {% endcall %} {% endif %} {% include "utilities/automations_trigger_panel.html" %} {# Test's result: what a run would do, computed without doing it (sync.js renders it). #}{{ _("Turning this sync on lets Yaffo do this, on its schedule, until you turn it off:") }}
{{ _("Changing the device, what it shares, or where photos go turns the sync off until you review it again.") }}
{% else %}{{ _("Changing the account, folder, or where photos go turns the sync off until you review it again.") }}
{% endif %} {% endmacro %} {{ render_modal('syncEnableModal', _('Turn on this sync?'), url_for('sync_turn_on', slug=selected.slug), render_enable_review, _('Enable')) }} {% endif %} {{ render_modal('editAutomationModal', _('Edit automation'), url_for('automations_update_details', slug=selected.slug), render_edit_automation_form, _('Save')) }} {% endblock %} {% block scripts %} {% endblock %}