{#- The part of the status page that changes while a sync runs: htmx polls it every two seconds until the sync is over, then the whole page reloads with the new counts. -#} {%- macro fda_row() -%} {% if fda is not none %}
Full Disk Access
{% if fda %}Granted {% else %}Missing iMessage can't be read until it's granted. {% if in_app() %}Choose Allow Access to Messages… in the Memoreei menu{% else %}Run memoreei service grant-access{% endif %}.{% endif %}
{% endif %} {%- endmacro -%} {%- macro whatsapp_row() -%} {% if "whatsapp" in connectors and whatsapp_newest %}
WhatsApp
Newest message {{ whatsapp_newest|ago }}
{% endif %} {% if "signal" in connectors and signal_newest %}
Signal
Newest message {{ signal_newest|ago }}{% if signal_disappearing %} · {{ "{:,}".format(signal_disappearing) }} disappearing message{{ "" if signal_disappearing == 1 else "s" }} not kept{% endif %}
{% endif %} {%- endmacro -%} {%- macro auto_row(label) -%}
{{ label }}
{% if auto_sync %}Every {{ interval_min }} minute{{ "" if interval_min == 1 else "s" }}{% else %}Off{% endif %}
{%- endmacro -%} {%- macro problem_rows() -%} {% if last_run and not running %}{% for name, r in last_run.result.connectors.items() %}{% if r is mapping %}
Problem
{{ name|kind_name }}: {{ r.error }}{% if name|connector_key %} Check its settings{% endif %}
{% endif %}{% endfor %}{% endif %} {%- endmacro -%} {%- macro sync_button() -%} {%- endmacro -%} {% if welcome %}
{% if running %}

Reading your {{ "iMessages" if "imessage" in connectors else "messages" }}…

{{ "{:,}".format(total) }} so far. The first sync reads everything, so make a cup of tea.

{{ sync_button() }}
{% endif %}
{{ fda_row() }} {% if not running %}
Last sync
{% if last_run %}{{ last_run.finished_at|ago|capitalize }} · {{ "{:,}".format(last_run.result.new_messages) }} new{% else %}Not since the server started{% endif %}
{{ problem_rows() }} {{ whatsapp_row() }} {% endif %} {{ auto_row("Automatic sync") }}
Server
Running on port {{ port }}
{% if not running and connectors %}
{{ sync_button() }}
{% endif %}
{% else %}

Sync

Last sync
{% if running %}Syncing now… {{ "{:,}".format(total) }} memoreeis so far {% elif last_run %}{{ last_run.finished_at|ago|capitalize }} · {{ "{:,}".format(last_run.result.new_messages) }} new {% else %}Not since the server started{% endif %}
{{ auto_row("Automatic") }} {{ problem_rows() }} {{ whatsapp_row() }} {{ fda_row() }}
Data
{{ home|tilde }}
{{ sync_button() }}
{% endif %}