{% extends "base.html" %} {% from "_partials/icon.html" import icon %} {% from "_partials/forms.html" import error_slot, invalid %} {% from "_partials/city_field.html" import city_field with context %} {% from "_partials/subscribe_form.html" import subscribe_form with context %} {#- Кабинет подписчика (design-system/1astro/pages/account.md §4). Только для вошедшего (cookie сессии). user — accounts.User; sub — статус подписки (key, badge, text, tone); can_manage — портал провайдера (Stripe); can_cancel — отмена кнопкой на сайте (WayForPay); renew — {date}: отменённую подписку WayForPay можно оформить заново с новой картой, новый месяц начнётся date; billing_open — оплата подключена; subscriber — billing.entitlement; notice — итог (text, ok); birth — {summary, values, errors, time_choice, open}; city — {summary, tz, values, errors, open}; calendar — {links: {https, webcal, google} у подписчика или None, no_birth}; letters — {daily, weekly}; subscribe — {values, errors}; delete_errors — ошибка удаления. -#} {% block title %}{{ t("account.title") }}{% endblock %} {% block preload %} {% if cyrillic %} {% endif %} {% endblock %} {% block head %} {% endblock %} {% block content %}
{{ t("account.signed_in", email=user.email) }}
{{ notice.text }}
{{ sub.badge }} {{ sub.text }}
{%- if can_manage %} {%- endif %} {%- if can_cancel %} {%- endif %} {%- if renew and billing_open %}{{ t("account.renew_note", date=renew.date) }}
{{ subscribe_form("account-renew", values=subscribe["values"], errors=subscribe.errors, email=user.email, locked=True) }}{{ t("account.off") }}
{%- endif %}{{ t("account.calendar_text") }}
{%- if calendar.no_birth %}{{- icon("warning-circle", "account-card__icon") }}{{ t("account.calendar_no_birth") }}
{%- endif %}{{ t("account.calendar_secret") }}
{{- icon("lock-simple", "account-card__icon") }}{{ t("account.calendar_locked") }}
{%- endif %}{{ t("account.birth_text") }}
{{ birth.summary or t("account.birth_none") }}
{{ t("account.city_text") }}
{%- if city.summary %}{{ city.summary }} {{ t("account.city_tz", tz=city.tz) }} {%- else %}{{ t("account.city_none") }}{% endif -%}
{{ t("account.letters_text") }}
{%- if not subscriber %}{{- icon("lock-simple", "account-card__icon") }}{{ t("account.letters_locked") }}
{%- endif %}{{ t("account.delete_text")|inline(href="/" ~ lang ~ "/terms/") }}