{% import "components.html" as c with context %} {# the card about a conversation, drawn over the chat from its right edge: who is in it - read off the messages loaded, so it grows as more are - what wakes the agent in it, and at the bottom the way to turn it away #} {# once htmx has taken the card in, it reads who spoke off the chat's turns, and keeps reading as the chat takes more in - paged up or arriving - until it is closed; and it listens for a click outside itself to close: the click that opened it is still on its way, so the listener waits a tick #}
{{ t.text("profile.title") }}
{{ contact.thread_id|identicon|safe }}
{{ contact.name }}
{{ c.channels((contact.channel,)) }}{{ t.text("contacts." ~ contact.kind) }} · id {{ contact.target.split(":", 1)[1] }}
{# a group has members; a direct message is the two of them #} {% if contact.kind == "group" %}
{{ c.icon("users") }} {{ t.text("profile.members") }} ·
{# each turn in the chat carries its speaker; the grid is those, once each #}
{% endif %}
{{ c.icon("alarm-clock") }} {{ t.text("profile.reminders") }} · {{ reminders.items|length }}
{% for item in reminders.items %}
{{ c.icon("repeat" if item.repeat_rule else "calendar") }}
{{ item.title }}{% if item.repeat_rule %}{{ item.repeat_rule|repeat }} · {% endif %}{% if item.next_fire_at_ms %}{{ item.next_fire_at_ms|due }}{% endif %}
{% endfor %} {% if reminders.answer == "offline" %}
{{ t.text("contacts.offline") }}
{% elif reminders.answer != "listed" %}
{{ t.text("contacts." ~ reminders.answer, {"code": reminders.code}) }}
{% elif not reminders.items %}
{{ t.text("profile.no_reminders") }}
{% endif %}
{% include "remove_ask.html" %}