{# Copyright 2024, 2025 New Vector Ltd. Copyright 2023, 2024 The Matrix.org Foundation C.I.C. SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE files in the repository root for full details. -#} {% set consent_page = true %} {% extends "base.html" %} {% block content %} {% set client_name = client.client_name or client.client_id %} {% set user_agent = grant.user_agent | parse_user_agent() %} {% if grant.state == "pending" %}
{% if client.logo_uri %} {% else %} {% endif %}

{{ _("mas.consent.heading") }}

{% if user_agent.device_type == "mobile" %} {{ icon.mobile() }} {% elif user_agent.device_type == "tablet" %} {{ icon.web_browser() }} {% elif user_agent.device_type == "pc" %} {{ icon.computer() }} {% else %} {{ icon.unknown_solid() }} {% endif %}
{% if user_agent.model %}
{{ user_agent.model }}
{% endif %} {% if user_agent.os %}
{{ user_agent.os }} {% if user_agent.os_version %} {{ user_agent.os_version }} {% endif %}
{% endif %} {# If we haven't detected a model, it's probably a browser, so show the name #} {% if not user_agent.model and user_agent.name %}
{{ user_agent.name }} {% if user_agent.version %} {{ user_agent.version }} {% endif %}
{% endif %} {# If we couldn't detect anything, show a generic "Device" #} {% if not user_agent.model and not user_agent.name and not user_agent.os %}
{{ _("mas.device_card.generic_device") }}
{% endif %}

{{ _("mas.device_consent.another_device_access") }} {{ _("mas.consent.this_will_allow", client_name=client_name) }}

{{ _("mas.consent.make_sure_you_trust", client_name=client_name) }} {{ _("mas.consent.you_may_be_sharing") }} {% if client.policy_uri or client.tos_uri %} Find out how {{ client_name }} will handle your data by reviewing its {% if client.policy_uri %} privacy policy{% if not client.tos_uri %}.{% endif %} {% endif %} {% if client.policy_uri and client.tos_uri%} and {% endif %} {% if client.tos_uri %} terms of service. {% endif %} {% endif %}

{{ _("mas.not_you", username=current_session.user.username) }}

{{ logout.button(text=_("action.sign_out"), csrf_token=csrf_token, post_logout_action=action, as_link=true) }}
{% elif grant.state == "rejected" %}
{{ icon.block() }}

{{ _("mas.device_consent.denied.heading") }}

{{ _("mas.device_consent.denied.description", client_name=client_name) }}

{% else %}
{{ icon.check() }}

{{ _("mas.device_consent.granted.heading") }}

{{ _("mas.device_consent.granted.description", client_name=client_name) }}

{% endif %} {% endblock content %}