{% extends "chats/base_detail.html" %} {% load django_bootstrap5 %} {% load bootstrap_helpers %} {% load community_utils %} {% load chats %} {% load members %} {% load e2ee %} {% load static %} {% load sekizai_tags %} {% block title %}Create E2E-Keys for {{ channel }}{% endblock %} {% block headline %}Create missing End-to-End encryption keys{% endblock %} {% block subtitle %}{{ channel }}{% endblock %} {% block breadcrumbs %} {% with all_channels_url=channel.get_list_url|str_add:"/.." %} {% breadcrumbs "Channels"|combine:all_channels_url channel|name_for:user|combine:channel.get_absolute_url "Generate keys"|combine:request.path %} {% endwith %} {% endblock %} {% block content %} {% if not missing_subscriber_keys %}

You're done! Every subscriber has the keys he or she needs.

{% else %}

Please generate end-to-end encryption keys for the following channel

{% channel_item channel %}
{% if not request.session|e2ee_enabled %} {% bootstrap_alert "End to end encryption is not enabled for this session! Please reload the page and enter you passphrase to enable it." alert_type="danger" %} {% endif %}

The following subscribers do not have all the keys they need:

{% with communitymember_row_class="mb-3 mb-md-0 communitymember-list-row" %} {% member_rows missing_subscriber_keys.keys children=False %} {% endwith %}
{% for subscriber in missing_subscriber_keys.keys %} {% if not subscriber.communitymember %}   @{{ subscriber }} {% endif %} {% endfor %}
{% endif %} {% if missing_e2e_subscribers %}

{% with num_miss=missing_e2e_subscribers|length %} There {{ num_miss|pluralize:"is,are" }} {{ num_miss }} subscriber{{ num_miss|pluralize }} that {{ num_miss|pluralize:"does,do" }} not have end-to-end encryption enabled yet. {{ num_miss|pluralize:"This user,They" }} cannot have access to this channel: {% endwith %}

{% with communitymember_row_class="mb-3 mb-md-0 communitymember-list-row" %} {% member_rows missing_e2e_subscribers children=False %} {% endwith %} {% endif %} {% addtoblock "js" %} {% endaddtoblock %} {% addtoblock "js" %} {% endaddtoblock %} {% addtoblock "js" %} {% spaceless %} {% endspaceless %} {% endaddtoblock %} {% endblock %}